public
Description: Open Congress
Homepage: http://www.opencongress.org
Clone URL: git://github.com/opencongress/opencongress.git
agp (author)
Tue Nov 03 19:41:21 -0800 2009
commit  80993b733abc5bcc286f3609128ec969ed529e03
tree    1edf37cf54b2515d996ccebcbb5eb2282c22dd1e
parent  212c03b853d6b076bf635426456e46447ab20be0
name age message
file CREDITS Mon Aug 17 16:05:33 -0700 2009 Knuston to Knutson [morganknutson]
file Capfile Mon Aug 17 12:43:12 -0700 2009 more fixes [d2d]
file LICENSE Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
file README Tue Sep 01 18:23:21 -0700 2009 testing readme2 [agp]
file Rakefile Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory app/ Loading commit data...
file banned_users_test.txt Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory bin/
directory components/ Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory config/
directory db/
directory doc/ Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory features/ Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory lib/
file parsed_reports.txt Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory public/
directory script/ Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory test/ Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory vendor/ Tue Sep 08 17:45:51 -0700 2009 openid fixes [d2d]
README
# OpenCongress - a Ruby on Rails application for displaying information about Congress
#
# Copyright (C) 2005-2009 Participatory Politics Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA

== OpenCongress Rails Project

-- Installing OpenCongress --

First of all, the OpenCongress project is a PostgreSQL only project.  Don't have delusions of using MySQL with it or you 
will be hurtin.  Since I personally had little experience with Postgres before this, I will include some tips for all 
you Mysql only guys and gals out there.

Here is what you have to do to get OpenCongress close to working on your personal machine :

  1. install postgresql

  2. install tsearch in contrib

  3. gem install ferret, bluecloth, simple-rss, postgres-pr

  4. copy config/database.sample to config/database.yml and edit it

  5. create the databases
  createdb opencongress_dev
  opencongress_dev < db/tsearch2.sql
    createdb opencongress_test

  6. rake migrate

--

Next, you will have to get the data from govtrack and fill in your database with the parsed govtrack data

  mkdir /data/govtrack/111
  cd /data/govtrack/111
  rsync -az govtrack.us::govtrackdata/us/111/bills .
  rsync -az govtrack.us::govtrackdata/us/111/repstats .
  rsync -az govtrack.us::govtrackdata/us/111/bills.index.xml .
  rsync -az govtrack.us::govtrackdata/us/111/committeeschedule.xml .
  rsync -az govtrack.us::govtrackdata/us/111/rolls .

Now, you will have to actually parse the data

  ruby bin/govtrack_parse_people.rb
  ruby bin/govtrack_parse_bills.rb 
  ruby bin/govtrack_parse_committees.rb 
  ruby bin/govtrack_parse_committee_schedules.rb 
  ruby parse_individual_bills.rb 

--

Now, just run 'mongrel_rails start' and you should have something going on localhost:3000 - have fun!

Lastly, some Postgres tips:
  
  starting pg:  pg_ctl -D data -l logfile start
  accessing pg from the command line : psql opencongress_dev