How to hide metadata

48 views
Skip to first unread message

Thomas den Hollander

unread,
Jan 13, 2022, 12:39:40 PM1/13/22
to Beancount
I am in the process of publishing some beangulp importers that I have been using. I was wondering: aren't metadata entries starting with '__' supposed to be hidden? When looking at the beangulp output or using `printer.format_entry` these entries do appear. Am I doing something wrong?

I am using the `metadata` method from the beangulp importer (but I've tried other things):
```
def metadata(self, filepath, lineno, row):
        meta = super().metadata(filepath, lineno, row)
        meta[BOOKING_CODE_KEY] = row.booking_code
        return meta
```

Daniele Nicolodi

unread,
Jan 13, 2022, 4:08:57 PM1/13/22
to bean...@googlegroups.com
On 13/01/2022 18:39, Thomas den Hollander wrote:
> I am in the process of publishing some beangulp importers that I have
> been using. I was wondering: aren't metadata entries starting with '__'
> supposed to be hidden? When looking at the beangulp output or using
> `printer.format_entry` these entries do appear. Am I doing something wrong?

I suspect you are calling into an old version of beancount.printer.
Ignoring all metadata with keys starting with '__' is a recent-ish
addition (in Beancount v3 only). Before, only 'filename' and 'lineno'
were ignored.

Cheers,
Dan
Reply all
Reply to author
Forward
0 new messages