You can get the options map, like this:
https://github.com/beancount/beancount/blob/master/beancount/plugins/check_average_cost.py#L37



On Sat, May 14, 2022 at 7:16 PM Ben L <[email protected]> wrote:

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

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN0jk4TF7uhVyyXn0E-agkXJJGRzaRKyMMrq8LTgmsqwg%40mail.gmail.com.

Reply via email to