Re: use of plugins

53 views
Skip to first unread message

Martin Blais

unread,
May 4, 2018, 9:07:51 AM5/4/18
to Beancount
On Tue, May 1, 2018 at 2:40 PM, <adamj....@gmail.com> wrote:
Very new to the game here and looking for a bit of help to close the loop on plugin usage.  I apologize in advance for what it, I think, a very remedial question but I haven't been able to figure it out in the existing documentation.

As far as I can tell, to enable the unrealized plugin I should add the plugin directive to my beancount file. 

Correct.

 
However when I perform various operations on this file, I don't see the expected output of the plugin. 

The plugins modify the streams of transactions/directives. They don't do anything else. You should be able to find transactions that were inserted by this plugin.

In fact, internally (in the code), the entire result of parsing the Beancount file produces three things: a stream of transactions/directives, a read-only mapping of global options, and a list of errors produced during parsing. That's it. There is no tree of objects, no complex data structure, and especially no giant "application" class containing all sorts of mutable things. The purpose of loading a Beancount file is to ascertain the double-entry constraint, book sales/reductions to the contents of accounts ("inventories") and produce that stream of transactions. Even the price mapping is derived from the stream of directives after the fact.

 
Is there another bean tool I should be using to generate the output? 

No.

 
or are plugins meant to be used solely for scripting and I should be using/generating outputs from a python script?

Scripting is optional, to be used when you can't extract info using the SQL client or web interface, or want to do something custom.

 

Thanks in advance!


--
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/8c9d4feb-721e-4c97-a629-47d7c56bc854%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages