5 ms·
What is the point of making the data structure any more complex than: 2011/03/15 Trader Joe's Expenses:Groceries $100.00 Assets:Checking 20
by dumpsterlid 3y ago
What is the point of making the data structure any more complex than:
2011/03/15 Trader Joe's
Expenses:Groceries $100.00
Assets:Checking
2011/03/15 Whole Food Market
Expenses:Groceries $75.00
Assets:Checking
I don't even need to explain the data structure to you, it is self evident. Any number of sophisticated functions can be built into an interpreter of the ledger data, but all of those complex functions never obscure the basic data which can be edited by hand in a plain text editor if desired. Or you can use ledger-mode in emacs and enter transactions through prompts so you don't have to manually structure the whitespace for it to look nice. However complex you desire, you can use ledger in that fashion, that is the strength of its minimalism.
Like I said elsewhere in this thread, I like to use ledger inside codeblocks in org mode (org-babel) in a simplistic application of literate programming. The extremely human readable nature of ledger's data structure is a natural fit for the similarly human readable org format, and in export of an org file into a website, html document, pdf or other media (via pandoc) ledger codeblocks remain human readable, even to someone who has never heard of ledger-cli. This means that an org file tracking a complex project with associated costs at each step (though ledger can track anything with units, including time) can be easily converted into a professional quality document that can be used in any number of contexts.
The professional outward facing document used for conveying information about a project to others can thus originate out of the same org file that is being used to work on the project itself. In other words, your notes are only a step or two away from a presentation in any number of formats.
When you want only the finances from the project file, just tangle it out and treat it like a normal ledger file.