fava icon indicating copy to clipboard operation
fava copied to clipboard

Export Fava as a static webpage

Open rougeth opened this issue 2 years ago • 7 comments

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 avatar May 18 '22 21:05 rougeth

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

rougeth avatar Jun 09 '22 09:06 rougeth

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

yagebu avatar Jul 02 '22 10:07 yagebu

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

rougeth avatar Jul 17 '22 14:07 rougeth

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

daneoshiga avatar Jul 17 '22 21:07 daneoshiga

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

yagebu avatar Jul 24 '22 09:07 yagebu

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)

rougeth avatar Jul 24 '22 18:07 rougeth

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.

garyp avatar Jul 24 '22 21:07 garyp

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.

Rudd-O avatar Oct 13 '22 23:10 Rudd-O

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.

yagebu avatar May 26 '23 16:05 yagebu