Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
bdheath committed Mar 21, 2017
1 parent 7f6238f commit 8cdf00a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Desktop.ini
*.pyc

# Private settings file
bigcases_settings.py


# Recycle Bin used on file shares
$RECYCLE.BIN/
Expand Down
2 changes: 1 addition & 1 deletion bigcases_scrape_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def getDocument(pid, url):

# Now fish out the most recent file and stick it where you want it

files = glob.glob(settings.file_temp_path + '*')
files = glob.glob(settings.file_temp_path + '/*')
files.sort(key=os.path.getmtime, reverse=True)
if len(files) >= 2:
newfn = settings.file_archive_path + '/document-' + str(pid) + '.pdf'
Expand Down
34 changes: 34 additions & 0 deletions bigcases_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

class settings:

# Scrape settings
multitask = False # Use multiprocessing for scraping RSS?
multitask_threads = 5
http_timeout = 30.0 # How long to wait for http requests
file_temp_path = '' # Set a temporary path for working with PDFs (i.e., /data/pacer)
file_archive_path = '' # Set a folder to archive downloaded PDFs (i.e., /data/pacer/archive)
max_files_to_scrape = 10

# Database settings (MySQL server)
db_host = '' # MySQL host name
db_user = '' # MySQL username
db_pass = '' # MySQL password
db_port = 3306 # MySQL port

# PACER settings
pacer_user = '' # PACER username
pacer_pass = '' # PACER password
pacer_client = '' # PACER client code
pacer_max_price = 3.00 # Maximum amount to pay for PACER record

# DocumentCloud credentials
dc_user = '' # DocumentCloud username
dc_pass = '' # DocumentCloud password
dc_project_id = '' # Numeric ID of DocumentCloud project to which to post

# Twitter credentials
twitter_app_key = ''
twitter_app_secret = ''
twitter_oauth_key = ''
twitter_oauth_secret = ''

0 comments on commit 8cdf00a

Please sign in to comment.