strict metadata and tags

22 views
Skip to first unread message

Stefano Zacchiroli

unread,
Apr 14, 2019, 8:15:26 AM4/14/19
to bean...@googlegroups.com
Heya, has anyone already written a Beancount plugin that emulates what
ledger --strict does? Namely, that tags and metadata fields must be
predefined in order to be allowed?[^]

It's trivial to do with a plugin, but if someone has already done it,
I'll avoid re-implementing it :-)

TIA,
Cheers

[^]: ledger's --strict also requires commodities to be pre-declared, but
Beancount is strict by default in that respect, so there is no need
to emulate it.
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

Martin Blais

unread,
Apr 14, 2019, 9:51:06 AM4/14/19
to Beancount
On Sun, Apr 14, 2019 at 8:15 AM Stefano Zacchiroli <za...@upsilon.cc> wrote:
Heya, has anyone already written a Beancount plugin that emulates what
ledger --strict does? Namely, that tags and metadata fields must be
predefined in order to be allowed?[^]

You'd like some input syntax that allows one to declare what tags and metadata are allowed, and to constrain to those?
Indeed you could use a plugin for that.
You could also do something looser, l like allow a particular syntax (via regexp) to constrain them.


It's trivial to do with a plugin, but if someone has already done it,
I'll avoid re-implementing it :-)

TIA,
Cheers

[^]: ledger's --strict also requires commodities to be pre-declared, but
     Beancount is strict by default in that respect, so there is no need
     to emulate it.
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director  . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

--
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 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/20190414121519.gufl6g5tkoiqflfx%40upsilon.cc.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages