Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ELEX-FTP-LOADER

A simple script for loading AP elections results only into a Postgres database using the COPY function and CSV.

Prerequisites

Installation

Clone the repository, create a virtualenvironment and install requirements.

git clone git@github.com:newsdev/elex-ftp-loader.git
mkvirtualenv elex-ftp-loader
cd elex-ftp-loader
pip install -r requirements.txt

Export environment variables you need.

export RACEDATE=<YYYY-MM-DD>
export AP_FTP_USER=<YOUR AP FTP USERNAME>
export AP_FTP_PASS=<YOUR AP FTP PASSWORD>

Usage

If you're using something like The New York Times's AP election loader, elex-ftp-loader is a drop-in replacement.

To initialize your database with races, reporting units and candidates:

./init.sh

To get results one time:

./update.sh

To run a daemon which inserts results into the database every 60 seconds:

./daemon.sh

About

A simple loader for AP FTP elections results.

Topics

Resources

License

Releases

No releases published
You can’t perform that action at this time.