Re: Issue #422: Allow importers to specify formatting of postings (blais/beancount)

2023-09-14 Thread Frederick Zhu
Hi!

I'd love to reopen this conversation. I think an easy way to go is to 
provide a way to set up the displaycontext when we write an Importer.

Any thoughts?

Thanks!
On Tuesday, February 25, 2020 at 2:07:51 AM UTC-8 tbm13 wrote:

> New issue 422: Allow importers to specify formatting of postings
>
> https://bitbucket.org/blais/beancount/issues/422/allow-importers-to-specify-formatting-of
>
> Martin Michlmayr:
>
> By default, bean-extract generates transactions like this:
>
> ```
> 2019-12-07 * "Anonymous" "Donation"
> Assets:Receivable 100.00 USD
> Income:Donations -100.00 USD
> ```
>
> I know I can just pipe it into bean-format but I’m wondering if it would 
> be possible to allow importers to format the postings, including spacing 
> and amounts? \(I know I can do amounts by just rounding to the precision I 
> want\).
>
> In any ideal world, this would be per-posting? I like to align different 
> postings with different spacing depending on their nature.
>
> Good idea? Bad idea? Maybe I should just pipe the output to a script that 
> formats it \(that’s actually what I do now\)
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/12633e0c-af59-434b-80e4-c34ad9c92789n%40googlegroups.com.


Re: beancount > prometheus > grafana

2023-09-14 Thread Andreas Gerstmayr

Am 12.09.23 um 04:52 schrieb Josh D:
Is anyone utilizing a Prometheus exporter to track, store, and graph 
your financial metrics in Grafana? It would be interesting to (1) store 
/ track them over time, (2) do all sort of maths, like savings rate, 
runway (how long can you last without income), how long it will take to 
pay off your mortgage, etc. - as a dashboard.


I don't see the value of duplicating the financial data from a beancount 
ledger (which is already a database, and supports BQL queries) to 
Prometheus (a time-series database).


Grafana dashboards would definitely be a cool idea though.
I think it would be nice to have a Grafana data source, which can run 
BQL queries against a Beancount ledger. It could work with either:

* a custom Grafana backend datasource [1]
* some daemon (standalone or Fava extension) exposing a HTTP API which 
accepts BQL queries and returns Grafana Data frames [2], then we could 
use some already existing general-purpose data source, e.g. [3].



For my personal dashboards I wanted something integrated in Fava, 
therefore I created a little Fava extension fava-dashboards [4], which 
renders charts from BQL queries. Not as fancy as Grafana, but simple to 
implement and extensible.



[1] 
https://grafana.com/docs/grafana/latest/developers/plugins/create-a-grafana-plugin/develop-a-plugin/build-a-data-source-backend-plugin/
[2] 
https://grafana.com/docs/grafana/latest/developers/plugins/introduction-to-plugin-development/data-frames/

[3] https://grafana.com/grafana/plugins/simpod-json-datasource/
[4] https://github.com/andreasgerstmayr/fava-dashboards

Cheers,
Andreas



Josh

--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/a5517d33-09a9-4be5-a3fe-7315b991cff7n%40googlegroups.com .


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/2b3b5f63-5abb-4fab-98f4-32c7747084aa%40gerstmayr.me.