Hi. I’m struggling to get ‘import from the CSV rules file’ working and I’ve tracked it down to file names. I hope someone can help me get over the final hurdle.
I’m running hledger version 1.32.3, linux-x86_64 (Linux Mint Debian Edition 13)
The bank download is Project Income.CSV containing four new transactions
my rules file is pi.csv.rules
Attempt 1:
$ hledger import ~/Downloads/Project\ Income.CSV --rules-file=pi.csv.rules --dry
; no new transactions found in “home/marko/Downloads/Project Income.CSV”
Attempt 2:
$ hledger import '~/Downloads/Project Income.CSV' --rules-file=pi.csv.rules --dry
The hledger journal file "~/Downloads/Project Income.CSV" was not found.
Please create it first, eg with "hledger add" or a text editor.
Or, specify an existing journal file with -f or LEDGER_FILE.
Attempt 3
$ hledger import ~/Downloads/'Project Income.CSV' --rules-file=pi.csv.rules --dry
; no new transactions found in "/home/marko/Downloads/Project Income.CSV"
Attempt 4 (sanity check!)
- rename bank file to
Project-Income.CSV
$ hledger import ~/Downloads/Project-Income.CSV --rules-file=pi.csv.rules --dry
; would import 4 new transactions from /home/marko/Downloads/Project-Income.CSV:
...
And using source ~/Downloads/Project-Income*.CSV in the rules file lets me run what I ultimately want:
$ hledger import pi.csv.rules --dry
; would import 4 new transactions from pi.csv.rules:
...
I can’t find anything in the hledger docs about parsing filenames, so I’m really stumped. I know I can pre-process the CSV file and rename it, but I assume I am making a beginner error somewhere! ![]()