beancount / fava

Fava - web interface for Beancount
https://beancount.github.io/fava/
MIT License
1.97k stars 285 forks source link

Export Fava as a static webpage #1424

Closed rougeth closed 1 year ago

rougeth commented 2 years ago

Hi all, I'm using Beancount to do accounting for a community around open source software. I have to deal with conferences, meetups, sponsorships, etc. We are going to publish all the .beancount files publicly on Github and I'd love to have an export of fava for read-only use (idea is a static webpage hosted in Github pages). Do you know a way of doing that? Maybe a plugin?

Cheers.

rougeth commented 2 years ago

Frozen-Flask might be an option, I'll check if that can be done as an extension.

yagebu commented 2 years ago

Since Fava has many interactive parts that require data that needs to be calculated on-demand, exporting it as a static webpage is not really feasible

rougeth commented 2 years ago

What about a read-only mode, an option for disabling import, editor, options and help?

daneoshiga commented 2 years ago

One option would be craft file permissions so the user running fava has only read on .beancount files..

something like .beancount files with 644 permissions and fava running with other user besides the .beancount files owner

yagebu commented 2 years ago

What about a read-only mode, an option for disabling import, editor, options and help?

Even without making any changes to the Beancount file, Fava is not "static": filters and queries for instance

rougeth commented 2 years ago

One option would be craft file permissions so the user running fava has only read on .beancount files..

something like .beancount files with 644 permissions and fava running with other user besides the .beancount files owner

Good idea, I'm gonna try it later. Thanks Shiga :)

Even without making any changes to the Beancount file, Fava is not "static": filters and queries for instance

Read-only, even if not static, would be enough for my use case. With a static option, it'd be just cheaper to host (but yeah, losing filters, queries, etc)

garyp commented 2 years ago

I wonder if this could be implemented by compiling fava to WASM and running it from the browser? See for example https://simonwillison.net/2022/May/4/datasette-lite/. If something like Datasette can be made to work with WASM with only minor modifications then perhaps fava could as well.

Rudd-O commented 2 years ago

Add a link in the .beancount files to your organization's Web page where users can browse a live Fava which has a checkout of your repo that's read only from the perspective of the UNIX user running Fava.

yagebu commented 1 year ago

I'll close this issue as I do not see a viable way to enable this without tons of complexity. If someone else wants to explore the viability, feel free to.