Open jonestristand opened 1 year ago
My only question would be why we would need to go the extra step to import the content of the include reference. This could be that I misunderstand the purpose of the cooked types. Retaining as much of the original journal as possible is always a good idea.
Are you thinking of a new top level function that reads multiple files and uses parseLedgerToCST
under the hood? We would need to store information on the relationship between the journals in addition to preserving the original file path, which is only usable on the user's machine and treated as metadata otherwise.
It might save people a step. For instance if they load their _main.acct file or something that just includes a variety of other journal files (e.g. chequing, credit card, savings, etc.), they'd most likely be interested in parsing that to a form with all transactions available?
On Wed, Sep 13, 2023 at 2:00 PM Daryl Wright @.***> wrote:
My only question would be why we would need to go the extra step to import the content of the include reference. This could be that I misunderstand the purpose of the cooked types. Retaining as much of the original journal as possible is always a good idea.
Are you thinking of a new top level function that reads multiple files and uses parseLedgerToCST under the hood? We would need to store information on the relationship between the journals in addition to preserving the original file path, which is only usable on the user's machine and treated as metadata otherwise.
— Reply to this email directly, view it on GitHub https://github.com/jonestristand/hledger-parser/issues/9#issuecomment-1718311273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOGK3ZIAH2UOEO2CXOB2R3X2INHPANCNFSM6AAAAAA4WXCO5U . You are receiving this because you authored the thread.Message ID: @.***>
I'm submitting a ... [ ] bug report [x] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
Summary Needs to respect include statements. My idea would be that the raw version of the ledger just indicates that there is an include statement in the syntax tree, while the cooked version would include all of the syntax tree from the included file attached at the node where the include statement is located. Any thoughts about alternatives?
Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)