← 返回命令列表

Linux command

hledger-import 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Import transactions

hledger import [file.csv]

Dry run import

hledger import --dry-run [file.csv]

Import with rules

hledger import --rules-file [bank.rules] [file.csv]

Import to specific file

hledger import -f [ledger.journal] [file.csv]

说明

hledger import adds transactions from CSV or other files to a journal. It uses rules files to map CSV columns to journal fields. The command detects duplicates and only imports new transactions by default. Rules files define field mappings and transformations.

参数

--dry-run
Show what would be imported.
--rules-file _FILE_
CSV rules file.
-f, --file _FILE_
Target journal.
--new
Import only new entries.
--help
Display help information.

FAQ

What is the hledger-import command used for?

hledger import adds transactions from CSV or other files to a journal. It uses rules files to map CSV columns to journal fields. The command detects duplicates and only imports new transactions by default. Rules files define field mappings and transformations.

How do I run a basic hledger-import example?

Run `hledger import [file.csv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --dry-run do in hledger-import?

Show what would be imported.