From e64df7d3099c95404e253a13a10101b37063c164 2013-12-18 17:41:53 From: Joar Wandborg Date: 2013-12-18 17:41:53 Subject: [PATCH] [doc] Updated README and included it in docs --- diff --git a/README.rst b/README.rst index 3be2d046a9dec96b53e0651154b3ea1e000017ba..bac27874dceac9b1477f15e4b02578979e2befbe 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,5 @@ +.. vim: textwith=80 + ==================== The Accounting API ==================== @@ -6,9 +8,69 @@ Dependencies -------------- -- ledger-cli version 3 (I have not tried with version 2.x) -- Flask (install by running ``pip install -r requirements.txt``). +- Python >=3.3 +- ledger version 3 (I have not tried with version 2.x) +- Python packages: Flask, etc. (install by running ``pip install -r + requirements.txt``) + +~~~~~~~~~~~~~~~~~~~~~~~~~ + GTK Client Dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~ + +To run the GTK client you need to have ``gi.repository`` avaiable in the python +environment, this means that if you use virtualenv to install the dependencies +of accounting-api you need to set it up with the ``--system-site-packages`` +flag. + +--------------------------------------- + Installation (i.e. Development Setup) +--------------------------------------- + +accounting-api does not yet have a method for end-user installation. This +section describes how you would set up accounting-api for development purposes, +which can also be used as an environment to try out the functionality of +accounting-api. + +See the sections below on how to install the dependencies. Then run the +following in your shell. + +.. code-block:: bash + + # Get the source code + git clone git://gitorious.org/conservancy/accounting-api.git + cd accounting-api + + # Set up the python 3.3 virtualenv (this will make the GTK client not work) + mkvirtualenv -p /usr/bin/python3.3 accounting-api + # OR If you want the GTK client to work + mkvirtualenv -p /usr/bin/python3.3 --system-site-packages accounting-api + + # If your terminal prompt does not say "(accounting-api)", run + workon accounting-api + # Install the python packages + pip-3.3 install -r requirements.txt + +If all went well, head to :ref:`usage`. If not, head to the channel ``#npoacct`` +on ``irc.freenode.net``. + +~~~~~~~~ + Ubuntu +~~~~~~~~ + + +.. code-block:: bash + + # git python 3.3 and virtualenvwrapper + sudo apt-get install git-core python3.3 virtualenvwrapper + + # ledger 3 + sudo apt-add-repository ppa:mbudde/ledger + sudo apt-get update + sudo apt-get install ledger + + +.. _usage: ------- Usage @@ -21,3 +83,10 @@ # Get a balance report via the web service ./bin/client balance + + # Get the transaction log + ./bin/client register + + # Insert a simple transaction, currency will be autodetected from your + # locale, for another currency, use ``--symbol USD`` + ./bin/client insert "January rent" Assets:Checking Expenses:Rent 654.32 diff --git a/doc/source/README.rst b/doc/source/README.rst new file mode 120000 index 0000000000000000000000000000000000000000..c768ff7d970600e1009b304bc9bfe15a1064147e --- /dev/null +++ b/doc/source/README.rst @@ -0,0 +1 @@ +../../README.rst \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst index 20a2b93c87f0422f1f169325a5c9d98a7861bbc1..d8e58a77516450013ab3230143e7c75319f88ba3 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -11,6 +11,7 @@ Contents: .. toctree:: :maxdepth: 2 + README api/accounting.rst