-
Notifications
You must be signed in to change notification settings - Fork 47
Billy commands
Examples from OpenStates are given, but these commands work with any Billy deployment.
You must set the following settings in your billy_settings.py:
AWS_KEYAWS_SECRETAWS_BUCKET
billy-util download-photos ak al ar ...billy-util mongo-index --purgeIf you create your own indexes, either omit --purge or remember to recreate your indexes.
Not sure exactly what you need in terms of setting up ElasticSearch.
billy-util elasticsearch-push ak al ar ...You must set the following settings in your billy_settings.py if you use the --upload switch:
AWS_KEYAWS_SECRETAWS_BUCKET
billy-util dumpcsv --upload ak al ar ...You must set the following settings in your billy_settings.py:
-
API_BASE_URL, e.g.http://openstates.org/api/v1/for OpenStates -
API_KEYan API key if your API is authenticated
You can also use the --apikey API_KEY option, but it will expose your API key in your shell's history.
Set the following settings if you use the --upload switch:
AWS_KEYAWS_SECRETAWS_BUCKET
billy-util dumpjson --novalidate --upload ak al ar ...- You can remove the
--novalidateswitch if you want to validate all API data. - You can set the
--schema_dir SCHEMA_DIRoption to validate against your own schema.
Updates a legislator's Influence Explorer ID. Not sure when you need to run this command.
Matches a bill's sponsors and a vote's voters to a legislator document. Not sure when you need to run this command.