mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-14 02:14:14 +03:00
21 lines
879 B
Plaintext
21 lines
879 B
Plaintext
# 1. convert from CSV to hledger journal format
|
|
rm -rf t.rules$$; printf 'date-field 0\ndate-format %%d/%%Y/%%m\ndescription-field 1\namount-field 2\ncurrency $\nbase-account assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50' | bin/hledger convert --rules-file t.rules$$; rm -rf t.rules$$
|
|
>>>
|
|
2009/09/10 Flubber Co
|
|
income:unknown $-50
|
|
assets:myacct $50
|
|
|
|
>>>2 /using conversion rules file t.rules/
|
|
>>>=0
|
|
|
|
# 2. report rules parse error
|
|
# rm -rf t.rules$$; printf 'date-fiel 0\ndate-format %%d/%%Y/%%m\ndescription-field 1\namount-field 2\ncurrency $\nbase-account assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50' | bin/hledger convert --rules-file t.rules$$; rm -rf t.rules$$
|
|
# >>>
|
|
# 2009/09/10 Flubber Co
|
|
# income:unknown $-50
|
|
# assets:myacct $50
|
|
|
|
# >>>2 /using conversion rules file t.rules/
|
|
# >>>=0
|
|
|