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' On Sun, Jul 2, 2017 at 3:09 PM, Zhuoyun Wei <[email protected]> wrote: > 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. > > > -- > 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 post to this group, send email to [email protected]. > 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. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CA%2B48HpsaYW5HucyG6nprtkZpqX2UFZBZ9L0mzZB9-zhtxrC47Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
