To install pyenv on Centos: https://gist.github.com/ysaotome/7956676
Download all USC releasepoints into a directory called USC_RELEASEPOINTS with:
`$ python downloadusc.py `
This does two things:
-
Download the releasepoints, each in its directory, to the
constants.USC_RELEASEPOINTSdirectory -
Create a file in JSON format at constants.USC_RELEASEPOINT_JSON_PATH (
USC_RELEASEPOINTS/uscreleasepoints.json) This JSON is an array of objects, each of the form:```json {"name": "116-91", "date": "12/19/2019", "titlesAffected": ["18", "20", "26"], "url": "https://uscode.house.gov/download/releasepoints/us/pl/116/91/xml_uscAll@116-91.zip"}, ```
`$ python loaduscxcite.py `
This reads the releasepoints list from uscreleasepoints.json and loads the titles from each directory to XCiteDB
-
Copy this directory (the top level
loadusc) into/main/loaduscThe path tosetup.pywill be/main/loadusc/setup.pyand the shell script will be/main/loadusc/updateusc.sh -
Check if cron package is installed:
$dpkg -l cron (Ubuntu)
-
If cron is not installed, install the cron package:
$ apt-get install cron (Ubuntu)
-
Verify if cron service is running:
systemctl status cron -
Configure cron job:
Edit /etc/crontab ($ crontab -e)
Add the following line to run the script every day at 2a.m.:
0 2 * * * /path/to/updateusc.sh