ledger hledger
https://hledger.org/5-minute-quick-start.html#setup
Ledger is a command-line accounting tool that provides double-entry accounting based on a text journal. It provides no bells or whistles, and returns the user to the days before user interfaces were even a twinkling in their father’s CRT. What it does offer is a double-entry accounting ledger with all the flexibility and muscle of its modern day cousins, without any of the fat. An important difference between Ledger and other finance packages is that Ledger will never alter your input file. You can create and edit that file in any way you prefer, but Ledger is only for analyzing the data, not for altering it.
The basic syntax of any ledger command is:
ledger [OPTIONS...] COMMAND [ARGS...]
Command options must always precede the command word. After the command word there may appear any number of arguments. For most commands, these arguments are regular expressions that cause the output to relate only to transactions matching those regular expressions. For the entry command, the arguments have a special meaning, described below.
The regular expressions arguments always match the account name that a transaction refers to. To match on the payee of the entry instead, precede the regular expression with ‘–’. For example, the following balance command reports account totals for rent, food and movies, but only those whose payee matches Freddie:
ledger bal rent food movies -- freddie
Для баланса без виртуальных транзакций и с переводом всего в основные единицы измерения:
ledger --real -B bal
The totals reported by the balance command are only the topmost parent accounts. To see the totals of all child accounts as well, use the -s option:
ledger --real -B -s bal
Sometimes you may have a lot of children, nested very deeply, but only want to report the first two levels. This can be done with a display predicate, using a value expression. In the value expression, T represents the reported total, and l is the display level for the account:
ledger --real -B -d "T&l<=2" bal
To review the display predicate used — T&l<=2 — this rather terse expression means: Display an account only if it has a non-zero total (T), and its nesting level is less than or equal to 2 (l<=2).
Про org-babel
Чтобы был ob-ledger, надо org-contrib.
Пример про получение результатов одного блока в другом. В смысле, это к теме устроения файла. Закомментировано, а то орг запутывается.
# #+name: clean # #+begin_src ... # ... # #+end_src # #+name: plot # #+begin_src :var data=clean # ... # #+end_src
Всякие ссылки
- http://ledger-cli.org/ - занятно отметить, как давно попала на эту тему более-менее впервые.
- https://hledger.org/ledger.html - о разнице и совместимости
- https://hledger.org/
- https://hledger.org/accounting.html
- file:///usr/share/doc/ledger/ledger3.html
- http://plaintextaccounting.org/
- http://matthewturland.com/category/ledger/
- https://ledger-ru.github.io/tutorial/
- http://s.arboreus.com/search/label/ledger
- https://bronevichok.ru/blog/2014/09/27/personal-finances-with-ledger-1/ или https://habrahabr.ru/post/308434/
О финансах вообще
