I am on the verge of creating a front-end app for SailfishOS. I am trying to figure out the best approach for folders.
An imperative note here is that it relies on the separation of transaction folders as per the user's definition. This could be based accounts, sub-accounts, monthly, yearly...the lots.
Example:
- ledger.beancount
- ledgers
- 2023
- income.beancount
- expenses.beancount
- etc...
Or
The structure of the documents folder will mirror 'ledgers'
The idea is to regex the entry type and commit the entry to the appropriate file; for example if the entry type is `open` or `pad`, these will go to the main ledger(defined as `ledger.beancount` in the example above) and so on.
Is this folder structure method considered acceptable?
If not, is there a best-practices structure that I can use?
As for my generic transaction question, following the documentation; I couldn't find how to exactly to register a `buy` trade and match it to a `sell` order. Previously I had to implement this ugly function(
https://github.com/Logic-gate/cryptodash/blob/main/operations/beancount.py#L153) and I seem to have written a note to the effect of "there is currently no programmatic way to match the sell transaction with the initial buy trade".
Is this still true? if not, mind sharing a snippet of how it's done as per the documentation here(
https://beancount.github.io/docs/api_reference/beancount.core.html).
And thank you very much for beancount, it has saved me a lot of money and headache.