Skip to content

Commit

Permalink
Reorder flags in USAGE message.
Browse files Browse the repository at this point in the history
And update docs accordingly.
  • Loading branch information
Kraymer committed Oct 24, 2016
1 parent 087f438 commit 83becdb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ Usage

::

usage: qifqif.py [-h] [-a | -b] [-c CONFIG] [-d | -o DEST] [-f] [-v] QIF_FILE
usage: qifqif.py [-h] [-a | -b] [-c CONFIG] [-d] [-f] [-o DEST] [-v] QIF_FILE

Enrich your .QIF files with tags. See https://github.com/Kraymer/qifqif for
more infos.
more infos.

positional arguments:
QIF_FILE .QIF file to process
QIF_FILE .QIF file to process

optional arguments:
-h, --help show this help message and exit
Expand All @@ -69,11 +69,11 @@ Usage
configuration filename in json format. DEFAULT:
~/.qifqif.json
-d, --dry-run just print instead of writing file
-o DEST, --output DEST
output filename. DEFAULT: edit input file in-place
-f, --force discard transactions categories if not present in
configuration file. Repeat the flag (-ff) to force
editing of all transactions.
-o DEST, --output DEST
output filename. DEFAULT: edit input file in-place
-v, --version display version information and exit

More infos on the `documentation`_ website.
Expand Down
5 changes: 4 additions & 1 deletion docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CLI usage

::

qifqif.py [-h] [-a | -b] [-c CONFIG] [-d | -o DEST] [-v] QIF_FILE
qifqif.py [-h] [-a | -b] [-c CONFIG] [-d] [-f] [-o DEST] [-v] QIF_FILE

qifqif inserts a ``L your_category`` line for each transaction
of given QIF_FILE based on your existing matching history stored in CONFIG.
Expand All @@ -20,6 +20,9 @@ Optional flags:
files eg one per family member.
- ``-d, --dry-run``: print the result of qifqif work on the standard output
only, leaving the qif file untouched. Mutually exclusive with ``--output``
- ``-f, --force``: turn it on if you want to edit transactions having a
category that hasn't been set by qifqif. Repeat the flag (-ff) to force
editing of all transactions.
- ``-o DEST, --output``: by default input file is edited in-place. Use that
switch to write in another output file instead.
- ``-v, --version``: display version information and exit
6 changes: 3 additions & 3 deletions qifqif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ def parse_args(argv):
dest_group = parser.add_mutually_exclusive_group()
dest_group.add_argument('-d', '--dry-run', dest='dry-run',
action='store_true', help=('just print instead of writing file'))
dest_group.add_argument('-o', '--output', dest='dest',
help=('output filename. DEFAULT: edit input file in-place'),
default='')
parser.add_argument("-f", "--force", action="count",
help=("discard transactions categories if not present in "
"configuration file. Repeat the flag (-ff) to force editing of "
"all transactions."))
dest_group.add_argument('-o', '--output', dest='dest',
help=('output filename. DEFAULT: edit input file in-place'),
default='')
parser.add_argument('-v', '--version', action='version',
version='%(prog)s ' + __version__,
help='display version information and exit')
Expand Down

0 comments on commit 83becdb

Please sign in to comment.