- In a text editor
- At the command line
- By converting data
There are many ways to create hledger journal entries. Here are some options:
- With one of the mobile apps
- Write the entry in full, using journal format.
- As above, but also use editor addons to assist (like Emacs ledger-mode's TAB account completion and M-q alignment).
- In Emacs with yasnippet configured (eg), enter the name of a snippet and complete with TAB
- Find, copy and modify a past entry in the journal
- Or in Emacs ledger-mode, enter a date and partial description and complete with C-c TAB
- Move the entry from a separate file where you prepared it ahead of time (eg future.journal)
- Write the entry using journal format, eg
$ cat >>$LEDGER_FILE 2023-01-01 expenses:food $10 assets:cash <CTRL-D>
printf >>$LEDGER_FILE '2023-01-01\n expenses:food $10\n assets:cash\n\n'
- Install Ledger and use ledger xact DESC
- Convert a periodic transaction rule (eg in future.journal) to an entry with
- As above, plus generate extra postings from auto posting rules with
- If you have custom scripts to help with tasks, make them print or append journal entries when appropriate. Eg have your invoicing script add an invoice transaction to the journal.
- hledger import plus CSV conversion rules (and a pre-cleaning script if needed)
- Or keep the CSV files forever and read them with
- Or regenerate journals from them with Full-fledged hledger or hledger-flow
- Just read them directly with
- Or, hledger import them to main journal
- Look for conversion tools and tips at https://hledger.org/cookbook.html#other-software
- Or at https://plaintextaccounting.org/#data-importconversion
- Or write a conversion script that prints hledger journal entries (or other supported format)
- As above, but save the output to a file and
importfrom that to get only new entries