1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-03-28 21:16:20 +01:00
tldr/pages/common/hledger-import.md
Simon Michael 8abd5ee6fc
hledger-*: add pages for seven hledger subcommands (#12828)
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
Co-authored-by: spageektti <git@spageektti.cc>
2024-05-24 20:57:36 +02:00

874 B

hledger import

Import new transactions from one or more data files to the main journal. More information: https://hledger.org/hledger.html#import.

  • Import new transactions from bank.csv, using bank.csv.rules to convert:

hledger import {{path/to/bank.csv}}

  • Show what would be imported from these two files, without doing anything:

hledger import {{path/to/bank1.csv}} {{path/to/bank2.csv}} --dry-run

  • Import new transactions from all CSV files, using the same rules for all:

hledger import --rules-file {{common.rules}} *.csv

  • Show conversion errors or results while editing bank.csv.rules:

watchexec -- hledger -f {{path/to/bank.csv}} print

  • Mark bank.csv's current data as seen, as if already imported:

hledger import --catchup {{path/to/bank.csv}}

  • Mark bank.csv as all new, as if not yet imported:

rm -f .latest.bank.csv