Command line

The pypel script is the main tool of the pypel package. It simplifies receipts management providing several commands.

Command line usage

$ pypel --help
usage: pypel [-h] [-v] {show,set,del,sum,gpg} ...

Easy receipts management.

positional arguments:
  {show,set,del,sum,gpg}
                        commands
    show                Show receipts' metadata
    set                 Set receipts' metadata
    del                 Delete receipts' metadata
    sum                 Sum receipts' price
    gpg                 Sign or verify receipts

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

pypel commands

Note

Receipts’ supported extensions are: jpg, jpeg, png, eps.

Show receipts’ metadata

pypel show [-h] [-v] [-c] receipt [receipt ...]
-c, --color

Colorize the output. Useful only if you use --verify option.

Note

Pygments version 1.5 or superior is required.

-v, --verify

Verify receipts.

Note

python-gnupg version 0.3.0 or superior is required.

Set receipts’ metadata

pypel set [-h] [-p PRICE] [-r RETAILER] [-n NOTE] receipt [receipt ...]
-p PRICE, --price PRICE

Set receipt’s price to PRICE.

-r RETAILER, --retailer RETAILER

Set receipt’s retailer to RETAILER.

-n NOTE, --note NOTE

Set receipt’s note to NOTE.

Delete receipts’ metadata

pypel del [-h] [-p] [-r] [-n] receipt [receipt ...]
-p, --price

Delete receipt’s price.

-r, --retailer

Delete receipt’s retailer.

-n, --note

Delete receipt’s note.

Sum receipts’ price

Sum receipts’ price and print the result.

pypel sum [-h] receipt [receipt ...]

Sign or verify receipts

Note

python-gnupg version 0.3.0 or superior is required.

The GPG Key pypel will use is specified by the PYPELKEY environment variable.

pypel gpg [-h] [-s | -v] receipt [receipt ...]
-s, --sign

Sign receipts.

-v, --verify

Verify receipts.