6 ms·
Also see: hledger, a Haskell-based clone. The main benefit of using hledger seems to be better documentation, but I haven't tried ledger. Comparison of the two
by skulk 3y ago
Also see: hledger, a Haskell-based clone. The main benefit of using hledger seems to be better documentation, but I haven't tried ledger.
Comparison of the two: https://hledger.org/ledger.html https://hledger.org/ledger.html
I'm trying to start using hledger.
- jesusofnazarath 3y agoHledger has a more sane query language, but its not as powerful as ledger's. Also probably less bugs than ledger. Ledger, however, lets you do pretty much anything you want and thats why i prefer it. of course its easier to make mistakes with it, but i prefer the freedom it offers.
- lvass 3y agoMy ledger file works in both ledger and hledger, I tend to mostly use ledger as it's worked better within emacs for me. It's very rare that I even have to use the CLI. Ledger's docs are great.
- notfed 3y agoCan hledger be run in a Haskell repl? That sounds way more useful than a command line terminal. (Otherwise I'm not sure why it matters whether it was written in Haskell?)
- whateveracct 3y agoYep it has a Haskell interface! That's one common feature of many Haskell CLIs - they tend to be a statically typed library thinly wrapped into a CLI.
- wbadart 3y agoMy favorite part of the (extensive) Haskell API is `Hledger.Cli.Script` [0]. It re-exports all the most commonly used functions and data types, meaning you're just one import away from everything you need to get started. [0]: https://hackage.haskell.org/package/hledger-1.32.3/docs/Hledger-Cli-Script.html https://hackage.haskell.org/package/hledger-1.32.3/docs/Hled...
- maxcoder4 3y ago>Otherwise I'm not sure why it matters whether it was written in Haskell? It's a common trope with less popular languages. Often when I check out some project on GitHub, the first "feature" in the readme is "written in rust".
- chromatin 3y agoA key advantage of hledger, and why I migrated from ledger, is that hledger internally orders transactions chronologically, whereas ledger inexplicably orders them in the order they appear int he file, irrespective of the date attached to them. This [ledger's approach] totally breaks the ability to break different transaction types into different files and then import all files into a master file.
- lvass 3y agoYou can get this behavior with --sort d in argument or ledgerrc or setting LEDGER_SORT=d in your environment. Or merge files sorted by date with ledger -f file1 -f file2 --sort d print. I agree the default sorting is quite jarring, but practically every single time if some entry is out of place chronologically, for me it's because I input-ed the wrong date and the default sort makes more sense. The reason I have hledger installed is for check ordereddates.
- speleding 3y agoMy solution is to pick the file names in such a way that `include *.ledger` imports them in the right order (you need the latest version of ledger for that to work, in older versions the order was indeterminate)
- peterhajas 3y agoThe other nice part of `hledger` is the web UI (`hledger-web`), which is handy for checking out your transactions.
- faustlast 3y agoIn summary for me: hledger has better csv importing system and ledger has support for lots. I use both.
- speleding 3y agoledger has a few powerful features that hledger lacks, for example in ledger you can create an "assert" statement that checks all your journal entries fall in the correct time period (easy to mess up if you copy/paste journal entries). But it's pretty easy to move between the two.
- yencabulator 3y agohledger can validate date order, that seems to eliminate copy-paste-fail-to-update-date for me.