howeyc / ledger

Command line double-entry accounting program
https://howeyc.github.io/ledger/
ISC License
461 stars 43 forks source link

Support including dat files #14

Closed prestonvanloon closed 6 years ago

prestonvanloon commented 6 years ago

The error I received with lweb:

journal.dat:4: Unable to parse date: include

Consider a file structure that looks like this:

.
├── 2016.dat
├── 2017.dat
├── 2018.dat
├── accounts.dat
├── commodities.dat
├── journal.dat
├── price.db

Where journal.dat serves as the entry point to include all of the other dat files. Example:

include accounts.dat
include commodities.dat

; Annual journals
include 2016.dat
include 2017.dat
include 2018.dat
howeyc commented 6 years ago

I most likely will not do this. I intentionally do not support a large majority of ledger-cli directives because they add complexity and honestly, I don't use them.

I could add include, but judging from the rest of the files you have I'd have to add support for:

And then I don't know if you do that reconcile * thing, and maybe you have some periodic transactions. Plus I know ledger-cli has some special comment to pre/post-date transactions or something.

I like the simplicity of just supporting a list of transactions, it allows for accomplishing a lot of tracking and reporting. What's in the README is all I really intend to support.

Having said all that, pull-requests are welcome, I will accept you doing all of that, but I will likely not do it myself, because it's a bunch of work and additional complexity for no gain for me.

kalafut commented 6 years ago

I plan to work on basic include support (which I need too) and #10 in the near future.