-
-
Notifications
You must be signed in to change notification settings - Fork 111
LinuxDevEnvironment
Note: These instructions are deprecated now that we have moved from BitBucket to GitHub.
Juriscraper on Linux in 10 Easy Steps
--- Let's get your virtual BitBucket account and personal Juriscraper repo setup first ---
-
Use your favorite browser to set up a BitBucket account: https://bitbucket.org/ Login Confirm your email
-
On the BitBucket site, fork mlissner’s Juriscraper repo to your account: https://bitbucket.org/mlissner/juriscraper
--- Now we're going to get BitBucket / Mercurial set up on your computer ---
- Install Mercurial http://mercurial.selenic.com/
--- Open a fresh Terminal window ---
sudo apt-get install mercurial
- Configure Mercurial by creating a config file that should work for all your Mercurial repos using vim be sure to use the email and username you used to create your BitBucket account
$ vim ~/.hgrc (press ESC then "i" to insert text)
#!python
[ui]
username = yourUsername <email@account.com>
merge = meld
[auth]
bb.prefix = http://bitbucket.org/yourUsername/
bb.username = yourUsername
bb.password = yourPassword
[merge-tools]
meld-args = $base $local $other
use ESC and then ":wq" to write the file and quit.
-
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 repos (or bitbucket or whatever you want to call it) -
Navigate to your new directory and clone your BitBucket Juriscraper repo to your local computer. Reminder: Unlike GitHub, Mercurial uses 'hg' not 'git' at the beginning of all it's commands. Otherwise it's very similar $ hg clone https://bitbucket.org/yourUsername/juriscraper
-
Install juriscraper dependencies
#!python
$ sudo apt-get install python-pip libxml2-dev libxslt1-dev python-dev zlib1g-dev
$ 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/
- 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
- Edit away. Save your work. Return to your juriscraper repo in your Terminal window to submit your code for review. $ hg status (you should see a little "M" next to the file you’ve been working on) $ hg commit -m "your commit message here" stateName.py (you’ll be asked to enter your BitBucket account password) $ hg push
--- Re-open your browser and login to your BitBucket account ---
- Go to your online BitBucket 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 mlissner/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 someone with Free Law Project.