pypel¶
pypel
is a simple tool to manage receipts. It uses XMP to store metatada
inside receipts so you can share them in a very easy way.
The name is in homage to Pel of Star Trek DS9.
Installing pypel¶
Dependencies¶
pypel
requires GExiv2
Python binding version 0.6.1 or superior and
Six version 1.3.0 or superior.
Optionally you can also install Pygments version 1.5 or superior (for console coloured output) and python-gnupg version 0.3.0 or superior (for signing and verifying receipts).
To run the testsuite you need Pillow version 2.0.0 or superior.
Installation¶
Simply install pypel
using pip
:
$ pip install pypel
Alternatively you can directly install from the git repository using pip
.
For example, if you want to install version 0.3 from the git repository you have to do:
$ pip install -e git+https://github.com/eriol/pypel/@0.3#egg=pypel
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¶
- show: Show receipts’ metadata
- set: Set receipts’ metadata
- del: Delete receipts’ metadata
- sum: Sum receipts’ price
- gpg: Sign or verify receipts
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.
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.
Changelog¶
Release 0.4 (in development)¶
- Enable travis CI.
Release 0.3 (June 26, 2015)¶
- Add Python3 support.
- Switch to GExiv2 for XMP metadata management.
- Switch to Pillow for testing.
Release 0.2 (September 12, 2013)¶
- Refactor Receipt class to use a class based model.
- Add note field to Receipt model.
- Enhance version handling.
- Add __version_info__ tuple and switch to __version__ for human readable form.
Release 0.1 (November 02, 2012)¶
- First public release.
Licensing¶
Copyright (c) 2012-2015, Daniele Tricoli <eriol@mornie.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the of the author nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Release: | 0.3 |
---|