jonestristand / hledger-parser

A parser for ledger/hledger journal files based on Chevrotain
MIT License
13 stars 2 forks source link

File imports #9

Open jonestristand opened 1 year ago

jonestristand commented 1 year ago
darylwright commented 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.

jonestristand commented 1 year ago

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: @.***>