Skip to content
janderse edited this page Aug 30, 2014 · 2 revisions

Juriscraper on OSX in 10 Easy Steps

  • These instructions assume you have pip as an install manager
  • You will also want to install iPython to test your code against the sample scraper

--- Lets get your GitHub account and personal Juriscraper repo setup first ---

1 - Use your favorite browser to set up a GitHub account: https://github.com/

  • Login
  • Confirm your email

2 - On the GitHub site, fork FreeLawProject's Juriscraper repo to your account: https://github.com/freelawproject/juriscraper

--- Now we re going to get GitHub / Git set up on your computer ---

3 - Download and follow the install instructions for git: https://mac.github.com/

--- Open a fresh Terminal window ---

4 - Create a folder / directory where you want to save all your Juriscraper work
- The project is about 22 MB in size - Navigate to where you want the file using $ ls and $ cd, then $ mkdir Repositories

6 - Navigate (cd into) to your new Repositories directory and clone your Juriscraper repo to your local computer.

    $ git clone https://github.com/YOURUSERNAME/juriscraper.git juriscraper
    $ cd juriscraper
    $ git remote add upstream https://github.com/freelawproject/juriscraper.git

7 - Install juriscraper dependencies

	$ sudo pip install libxml2-dev libxslt-devel
	$ sudo pip install chardet==1.0.1
	$ sudo pip install requests==1.2.3
	$ sudo pip install lxml==3.0.1
	$ sudo mkdir /var/log/juriscraper/

If you have trouble getting lxml to compile install, you can also install py27-lxml using MacPorts. See https://www.macports.org/.

8 - Get started! Navigate to where the state scrapers are saved.

       $ cd juriscraper/opinions/united_states

Open a state scraper file in your favorite text editor (here I m using Sublime Text ).

       $ open -a Sublime\ Text stateName.py

9 - Edit away. Save your work. Return to your juriscraper repo in your Terminal window to submit your code for review.

       $ git status        # You should see a little M next to the file you've been working on
       $ git commit -m "your commit message here" stateName.py 
       $ git push

--- Re-open your browser and login to your GitHub account ---

10 - Go to your online GitHub account in your browser and confirm your changes have been uploaded correctly by clicking on the Commits tab. If your edits are in order (look for the Compare options), submit a Pull Request to the original freelawproject/juriscraper repo (look for the button in the upper right). The more detail you can leave in the comments section the better.

  • Celebrate! Your code will be reviewed by the FreeLaw Team.
Clone this wiki locally