Let's publish Colorado State bills.
- Turn on the cron jobs.
- Update the README to reference the year of the current session.
- Update the lines in the repo marked with
***HC
to reference or include the current session. You can look at commits 8bcafdaf5da58a2790fa5e1c2950681135c646b5 62cf06eee511fea4efbc605d251af8920724286f to see the changes made to ready it for 2017 (there were other changes made, but those were permanent site fixes).
- Turn off the cron jobs.
- Run
python legquery.py --archive
to archive the committee and legislator data.
- List of Senate bills: http://www.leg.state.co.us/CLICS/CLICS2015A/csl.nsf/BillFoldersSenate?openFrameset
- How they present PDFs: http://www.leg.state.co.us/clics/clics2015a/csl.nsf/fsbillcont3/BED55652BAA579B987257D9000780984?Open&file=SB002_00.pdf
legquery.py expects an environment variable named SUNLIGHT_API_KEY
set with your sunlight foundation API key in it. You can get a key at http://sunlightfoundation.com/api/accounts/register/
About the Sunlight API: https://sunlightlabs.github.io/openstates-api/bills.html
About the python bindings for the Sunlight API: http://python-sunlight.readthedocs.org/en/latest/services/openstates.html
See how the Sunlight foundation publishes this data: http://openstates.org/co/
Here's the third draft of instructions:
- Check out / update the repo.
- Create a virtual environtment, activate it.
- Download the project requirements:
pip install -r requirements.txt
- Download all the bills:
python legquery.py --verbose
- Download the bill details for the current session:
python legquery.py --session 2016a --details
- Open a new terminal window, cd to the project, activate the virtualenv
python runserver.py
, then open up http://localhost:5000/- To get previous legislative sessions to work, you'll need the bill details for the prior sessions.
for s in "2015a" "2014a" "2013a" "2012b" "2012a" "2011a"; do python legquery.py --session $s --details --verbose; done
should do that for you.
Note: --freeze
takes a snapshot of the current templates. If you haven't made any template- or data-level changes since the last time you froze, you don't need to --freeze
.
- Deploy everything:
python deploy.py --freeze --ftp
- Deploy the homepage
python deploy.py --nosession --freeze --ftp
- Deploy the current session's files
python deploy.py --session 2016a --freeze --ftp
- Deploy a previous session's files
python deploy.py --session 2012a --freeze --ftp
Copyright © 2015-2017 The Denver Post
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.