From 6cea9dc906e383adbaebdd9cb218ec67789137c3 Mon Sep 17 00:00:00 2001 From: Mauro Scomparin Date: Wed, 18 Jul 2018 21:04:29 +0200 Subject: [PATCH] changed readme format --- README.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 51 ---------------------------------- 2 files changed, 81 insertions(+), 51 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 0000000..57a97f9 --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +# money + +**Money** is a python script I run on my phone to log my expenses and incomes. + +## Usage + +After installation 2 commands are available: + +* money-insert +* money-latest + +### money-insert + +Asks the user for the values to save to **dataFile**. + +### money-latest + +Shows the latest **latestMovementsNumber** +movements from **dataFile**. + +## Installation + +To install the lastest version just clone the git repo and run the setup script. + + $ git clone http://code.scompo.it:3000/scompo/money.git + $ cd money + $ python3 setup.py install + ... lots of stuff ... + +## Configuration + +The application looks for the following configuration +file `$HOME/.config/money.conf` + +The file supported file formats are: + +* [JSON](https://www.json.org/) (Javascript object notation) + +You can configure the **data file** *dataFile* +and **the maximum number of movements** *latestMovementsNumber* shown. + +### Default values + +The application uses some sensible defaults, and the default configuration +it's equivalent to the following: + + { + "dataFile":"movimenti.dat", + "latestMovementsNumber": 5 + } + +## File format + +The **dataFile** contains all the movements inserted with money-insert and the +row format it's pretty straight-forward. + + VALUE;DATE;HOUR;DESCRIPTION\n + +Look at the `test_write_movement_to_stream` test in +the `money/tests/test_money.py` file for more info. + +### Example of a row + + -100.00;18/04/2017;00:01;a movement\n + +## Localization + +The project it's documented using the gnu gettext utilities. +Documentation it's available on the [GNU gettext documentation page](https://www.gnu.org/software/gettext/manual/gettext.html) + +### New language translation + + xgettext money/money.py --output=money/translations/money.pot + msinit --input=money/translations/money.pot --locale=it --output=money/translations/it/LC_MESSAGES/money.po + msgfmt --output=money/translations/it/LC_MESSAGES/money.mo money/translations/it/LC_MESSAGES/money.po + +### Update of an existing translation + + xgettext money/money.py --output=money/translations/money.pot + msgmerge --update money/translations/it/LC_MESSAGES/money.po money/translations/money.pot + msgfmt --output=money/translations/it/LC_MESSAGES/money.mo money/translations/it/LC_MESSAGES/money.po diff --git a/README.rst b/README.rst deleted file mode 100644 index cfd8b4c..0000000 --- a/README.rst +++ /dev/null @@ -1,51 +0,0 @@ -money -===== - -python script I run on my phone to log my expenses. - -Installation -************ - -To install the latest version just - -:: - - $ git clone http://code.scompo.it:3000/scompo/money.git - $ cd money - $ python3 setup.py install - -Configuration -************* - -Config file location: $HOME/.config/money.conf - -Default values -************** - -The default configuration it's equivalent to: - -:: - - { - "dataFile":"movimenti.dat", - "latestMovementsNumber": 5 - } - -Translation -*********** - -Example of the command used to create a new translation - -:: - - xgettext money/money.py --output=money/translations/money.pot - msinit --input=money/translations/money.pot --locale=it --output=money/translations/it/LC_MESSAGES/money.po - msgfmt --output=money/translations/it/LC_MESSAGES/money.mo money/translations/it/LC_MESSAGES/money.po - -Example of the commands used to update an existing translation - -:: - - xgettext money/money.py --output=money/translations/money.pot - msgmerge --update money/translations/it/LC_MESSAGES/money.po money/translations/money.pot - msgfmt --output=money/translations/it/LC_MESSAGES/money.mo money/translations/it/LC_MESSAGES/money.po -- 2.25.1