<commit_before>.. highlight:: bash

Installation
============

1. Install system components
----------------------------

BtB should work on unix systems; it has been tested on Linux and OS X.

System requirements:
 
 * Python 2.6 or 2.7 (Python 3 not supported), and development headers
 * `poppler-utils <http://poppler.freedesktop.org/>`_
 * `pdftk <http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/>`_
 * `imagemagick <http://www.imagemagick.org>`_
 * `wkhtmltopdf <https://code.google.com/p/wkhtmltopdf/>`_ >= 0.10
 * `rubber <https://launchpad.net/rubber/>`_
 * `rabbitmq-server <http://www.rabbitmq.com/>`_
 * `git <http://git-scm.com>`_ (for obtaining the codebase)
 * `mercurial <http://mercurial.selenic.com>`_ (for installing python dependencies)
 * `python-virtualenv <http://www.virtualenv.org/en/latest/>`_

System-specific instructions:
 
 * Ubuntu::

    sudo apt-get install poppler-utils pdftk imagemagick rubber rabbitmq-server python-dev

    cd /tmp
    curl -O https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-i386.tar.bz2
    tar xjvf wkhtmltopdf-0.11.0_rc1-i386.tar.bz2
    sudo cp wkhtmltopdf /usr/local/bin
 
 * OS X (using `MacPorts <http://www.macports.org/>`_ -- install that first)::

    sudo port install \
        python26 \
        py26-virtualenv \
        git-core \
        mercurial \
        sqlite3 py26-sqlite \
        poppler \
        pdftk \
        rubber \
        imagemagick \<commit_msg>add postgres-server-dev dependency which is needed by the pip install (psycopg2==2.4.1)<commit_after>.. highlight:: bash

Installation
============

1. Install system components
----------------------------

BtB should work on unix systems; it has been tested on Linux and OS X.

System requirements:
 
 * Python 2.6 or 2.7 (Python 3 not supported), and development headers
 * `poppler-utils <http://poppler.freedesktop.org/>`_
 * `pdftk <http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/>`_
 * `imagemagick <http://www.imagemagick.org>`_
 * `wkhtmltopdf <https://code.google.com/p/wkhtmltopdf/>`_ >= 0.10
 * `rubber <https://launchpad.net/rubber/>`_
 * `rabbitmq-server <http://www.rabbitmq.com/>`_
 * `git <http://git-scm.com>`_ (for obtaining the codebase)
 * `mercurial <http://mercurial.selenic.com>`_ (for installing python dependencies)
 * `python-virtualenv <http://www.virtualenv.org/en/latest/>`_

System-specific instructions:
 
 * Ubuntu::

    sudo apt-get install poppler-utils pdftk imagemagick rubber rabbitmq-server python-dev postgresql-server-dev-all

    cd /tmp
    curl -O https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-i386.tar.bz2
    tar xjvf wkhtmltopdf-0.11.0_rc1-i386.tar.bz2
    sudo cp wkhtmltopdf /usr/local/bin
 
 * OS X (using `MacPorts <http://www.macports.org/>`_ -- install that first)::

    sudo port install \
        python26 \
        py26-virtualenv \
        git-core \
        mercurial \
        sqlite3 py26-sqlite \
        poppler \
        pdftk \
        rubber \
        imagemagick \
{'fraction_non_alphanumeric': 0.15990691489361702, 'fraction_numerical': 0.023936170212765957, 'mean_word_length': 2.74719800747198, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, 'https://': 6, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '880538', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1027, 'n_words': 227}