Feature request: show balance sheets over date range

I submitted the following ledger-cli feature request:

If this already exists in other PTA systems, feel free to mention them below!

hledger has it: https://hledger.org/hledger.html#report-intervals

hledger balancesheet --monthly
hledger bs -MATS

2 Likes

Thank you for pointing this out, @simonmic!

2 Likes

Here's a workaround that uses the ledger Python API:

Script is concise since it uses minimal_ledger.py:

import ledger
from core import *
from history_of_balances import *

ls = [xact for xact in ledger.read_journal('tmp.ledger').xacts()]

ledger_ = Ledger()

for transaction in ls:
    ledger_.transactions.append(
        Transaction(
            transaction.date, 
            transaction.payee,
            [Entry(str(post.account), float(post.amount)) for post in transaction.posts()]))

history_of_balances(ledger_)

Example output:

1 Like