Hi all,

I'd like to share a small Python project I've been developing on and off 
over the last year or so to scratch my own itch when it comes to Beancount: 
Pinto <https://pypi.org/project/pinto/>.
Unlike the developer of Beancount, I log most of my cash transactions 
manually, mainly for my own interest so I can track where I spend the most 
money. Adding these transactions manually became a bit of a pain - having 
to write out or copy-and-paste the same syntax over and over while changing 
only a few fields like dates and values - so I made some CLI scripts to 
make this process easier. I've recently cleaned up the scripts and put them 
on PyPI so others can use them.

The main feature that Pinto provides is a command called pinto add. This is 
an interactive command line interface which prompts the user for various 
information about the new transaction, then enters it into the correct 
position in the accounts file (ordered by date).

In order to be able to write transactions into the correct file, Pinto 
insists on a particular account file structure. There must be a directory 
containing main.beancount and transactions.beancount. I am open to change 
this requirement to some other type later, or allow different types of file 
layout, but this is the one I use so that's what it currently expects. You 
can define an environment variable PINTO_DIR which should point towards the 
directory containing these files, and you then don't need to specify it in 
the calls to pinto.

There is also a templating system where you can define common transactions. 
If you call pinto add with the -t flag, you can specify a template to use 
during the interactive prompt. This pre-populates certain parts of the 
transaction so you don't get asked for them. You can also define lists of 
possible accounts in the template, and you then only get prompted to choose 
from that list. I find this is mainly useful for when I'm adding 
transactions to my beancount transaction file from supermarkets where I've 
maybe got 20 receipts to add. I can quickly run pinto add -t rewe for 
example and fire in the dates and values taking about 5 seconds each, 
limited by the speed of my eyes to find the dates and values on the 
receipts themselves!

See the readme on the PyPI page for some examples of the pinto add process 
with and without templates.

This project is somewhere between alpha and beta, but it has worked for me 
for the past year without too much fuss. I am sure there will be bugs, but 
I am happy to let others play with it now and get any feedback you might 
have. I am also open to integrating this more deeply with Beancount itself 
if there is a will. Please if you do use this, please please ensure your 
account files are backed up on a version control system so that any bugs 
that may be present in the way Pinto writes to your account files do not 
cause irreparable loss.

If you are interested in using it, please see the PyPI page linked above. 
Note that it requires Python 3, so don't install it in shells where Python 
2 is the default interpreter (e.g. on Debian). I personally use a conda 
environment with Python 3.7 to run it. I think it might work with Python 
3.6 too. 

Best wishes,


Sean Leavey

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/8824e024-d979-4ee3-b9cf-d5005408d3b7o%40googlegroups.com.

Reply via email to