Manual journals
Not every transaction in your life comes with CSV statements.
Sometimes you just need to add a transaction for that time you loaned a friend some money.
hledger-flow independently discovers _manual_/YYYY/pre-import.journal
and _manual_/YYYY/post-import.journal during import. You can place
_manual_ directly under import, an owner, a bank, or an account.
Either file establishes that year’s include files, even when there are no
statements for that year or no statements anywhere in the ledger.
Put a transaction shared by the whole household in a root journal such as
import/_manual_/2019/post-import.journal. After hledger-flow import,
run hledger-flow report. The annual and monthly income statements and
the balance sheet under reports/all/2019/ include that transaction,
even with a single owner or a ledger made up entirely of root manual entries.
If an owner is named all (in any letter case), the aggregate reports go
under reports/_all_/2019/.
For a transaction that belongs to John alone, use import/john/_manual_/2019/
so it appears in both John’s reports and the aggregate reports.
You can run hledger-flow import --verbose to see exactly which files
are being looked for.
As an example, assuming that the relevant year is 2019 and
one or both of the following files will cause
import/john/2019-include.journal to be generated and included in the
root ledger:
import/john/_manual_/2019/pre-import.journalimport/john/_manual_/2019/post-import.journal
The pre-import.journal will be included just before the other included
entries, while the post-import.journal will be included just after the
other entries in that include file.
An include file may look like this:
cat import/john/2019-include.journal### Generated by hledger-flow - DO NOT EDIT ###
include _manual_/2019/pre-import.journalinclude mybank/2019-include.journalinclude otherbank/2019-include.journalinclude _manual_/2019/post-import.journalStability
Section titled “Stability”It works, but the naming of _manual_ looks a bit weird. Should it be
changed?