Issue #172: How to override "HEADER" in bean-extract? (blais/beancount)

36 views
Skip to first unread message

Zhuoyun Wei

unread,
Jul 2, 2017, 4:09:41 PM7/2/17
to bean...@googlegroups.com
New issue 172: How to override "HEADER" in bean-extract?
https://bitbucket.org/blais/beancount/issues/172/how-to-override-header-in-bean-extract

Zhuoyun Wei:

Hi,

in `extract.py` I could see this comment:

```
# The format for the header in the extracted output.
# You may override this value from your .import script.
HEADER = ';; -*- mode: beancount -*-\n'
```

However, defining `HEADER` in .import script does not seem to work. It seems that `output.write(HEADER)` in `extract.py` writes the hard-coded header directly to the output.


Shane Koster

unread,
Jul 4, 2017, 12:45:12 PM7/4/17
to bean...@googlegroups.com
It's been a while since I've used it so I'm not sure if it still works, but this is what I ended up adding to my .import file:

import beancount.ingest.extract
beancount.ingest.extract.HEADER = ';vim: set ft=beancount sw=4 :\n'



--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20170702200939.10213.17467%40celery-worker-106.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages