public
Description: Open Congress
Homepage: http://www.opencongress.org
Clone URL: git://github.com/opencongress/opencongress.git
agp (author)
Fri Nov 06 15:28:53 -0800 2009
commit  911c205755721b74f2962f513234f75f99c31786
tree    2f32073def09a415f0a61c941dc32023090fc13b
parent  80993b733abc5bcc286f3609128ec969ed529e03
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/ Fri Nov 06 15:28:53 -0800 2009 #2147 maplight linkback [agp]
file banned_users_test.txt Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory bin/ Sun Oct 25 22:39:23 -0700 2009 fixed bugs with action dates, compare people, v... [Andrew Ross]
directory components/ Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory config/ Thu Oct 22 10:52:53 -0700 2009 bunch of fixes: new vote URLs fixed booking im... [Andrew Ross]
directory db/ Wed Sep 09 19:14:12 -0700 2009 cleaning up past migrations [agp]
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/ Tue Oct 20 21:20:15 -0700 2009 fixed people parser file [Andrew Ross]
file parsed_reports.txt Mon Aug 17 06:00:38 -0700 2009 Added initial Rails app [d2d]
directory public/ Fri Nov 06 15:28:53 -0800 2009 #2147 maplight linkback [agp]
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