Thanks for sharing, Ben, Broadly speaking this approach will work if you don't have to match cost basis and if you have only a single currency. Note that export to SQL has existed for a while, but I think to be able to most generally replace the functionality from Beancount one would need a custom aggregator implementation (to accumulate positions with a variety of commodities and track individual lots, i.e., the Inventory class).
On Mon, Apr 22, 2024 at 2:46 PM Ben Gerdemann <[email protected]> wrote: > Hi Everyone, > > I hope this email finds you well. I've been using Beancount for many > years. It's been an amazing tool, and I'm grateful to this community and > especially to Martin Blais for maintaining such a fantastic project. > > I'm sharing a project I've been working on called Beanpost, which you can > find on GitHub at https://github.com/gerdemb/beanpost. This started as an > experiment to see if I could recreate plain text accounting functionality > using a PostgreSQL database, and it turned out more successful than I > expected. I thought the Beancount community might find it useful and > interesting. > > Beanpost consists of a PostgreSQL schema and import/export commands that > let you transfer data between a beancount file and a PostgreSQL database. > Much of Beancount's functionality is implemented using custom PostgreSQL > functions, allowing for complex queries and data manipulation. This setup > provides a flexible backend that can integrate with other tools like web > apps or reporting systems. > > One of the reasons I created Beanpost was to build a mobile-friendly > custom front-end. Fava is a fantastic tool, but it's not very > mobile-friendly, isn't intuitive for beginners, and is hard to customize. > With Beanpost, you have more flexibility to create a custom front-end that > suits your needs. > > The included functionality is as follows: > > - Functions to calculate account balances or changes over a specific > period. > - Support for calculations on individual accounts or account > hierarchies (e.g., "Assets"). > - Check balance assertions. > - Verify that transactions balance. > - Support for explicit precisions for each currency to use for balance > tolerances. > - Display the running balance of an account by posting. > - Convert between currencies, including converting baskets of > currencies. > - Store documents as byte-data in the database. > > I'm curious to hear your thoughts on this approach. Would love to hear any > feedback. I think I've implemented the majority of the required features, > but maybe I'm missing a few things? > > Maybe we could call this "database-based accounting" instead of "plain > text accounting." 🙂 > > Thank you for your time, and I look forward to hearing from you. > > Best regards, > > Ben > > -- > 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/143e6263-3db3-4532-ae0e-eac6d7e6ffebn%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/143e6263-3db3-4532-ae0e-eac6d7e6ffebn%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%2BhO1JLNPorhm3qweWGcHX%2BdyAJ-kjxLMbT10rh96oKgzag%40mail.gmail.com.
