Specifying beancount file when ingesting

46 views
Skip to first unread message

Sam Bragg

unread,
Nov 3, 2020, 12:31:41 PM11/3/20
to Beancount
I've written my own importer.py file which does the following:
  • defines an importer class (containing an extract method only - it's consuming an API response, not a file)
  • a call to a http client to download transactions via API
  • a call to scripts_utils.ingest([MyImporter(api_response)])
I use the following command to run my importer script:
python importer.py extract

I just can't seem to figure out how to specify my .beancount file so that transactions can actually be posted to it!


Martin Blais

unread,
Nov 6, 2020, 12:38:10 AM11/6/20
to Beancount
python importer.py --downloads=$HOME/Downloads extract -f ledger.beancount


--
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 beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/0b4360d5-8acc-492f-8e1c-3b61291bfe6dn%40googlegroups.com.

Sam Bragg

unread,
Nov 6, 2020, 3:40:19 AM11/6/20
to bean...@googlegroups.com
Thank you Martin!

To take this one step further, is there a way I can specify arguments in the importer file itself, so I don't have to specify them on the command line?

Then I can just run the importer without any args.


You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/vD5Gyv4ZccI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhOQ6DK56HTUmVyyvsa0HCV%2B7Yg9JXVFwqkNKEJiLaet6w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages