diff --git a/README.rst b/README.rst index fde7c35..2137416 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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. diff --git a/docs/cli.rst b/docs/cli.rst index 17dc591..8fec91c 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -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. @@ -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 diff --git a/qifqif/__init__.py b/qifqif/__init__.py index 61a34d2..6b8b334 100644 --- a/qifqif/__init__.py +++ b/qifqif/__init__.py @@ -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')