Can Plugin read options?

41 views
Skip to first unread message

Ben L

unread,
May 14, 2022, 7:16:14 PM5/14/22
to Beancount
Is there a way for a plugin to access the global options in a file? If my main.beancount file has

option "booking_method" "FIFO"
option "operating_currency" "USD"
option "documents" "TheDocs"

is there a way a plugin can read what the book_method or the documents location? As far as I can tell, a plugin has access to all the entries, and you can pass plugin-specific options to it, but I don't see a way to read the global options?

Thanks,

Martin Blais

unread,
May 14, 2022, 9:31:20 PM5/14/22
to Beancount

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3a850b39-d433-4fdb-a802-2c2694a7e293n%40googlegroups.com.

Ben L

unread,
May 14, 2022, 9:46:53 PM5/14/22
to Beancount
Ok, moving too fast and I misread the documentation. 

def plugin(entries, options, config):

works great to get the entries, global options and plugin-specific parameters. 

Sorry for the noise.
Reply all
Reply to author
Forward
0 new messages