2011-06-03 21:40:49 +04:00
|
|
|
# Conversion from CSV to Ledger with in-field and out-field
|
2011-06-28 02:59:07 +04:00
|
|
|
rm -rf unused.journal$$ convert.rules$$; printf 'base-account Assets:MyAccount\ndate-field 0\ndate-format %%d/%%Y/%%m\ndescription-field 1\nin-field 2\nout-field 3\ncurrency $\n' >convert.rules$$ ; touch unused.journal$$ ; bin/hledger -f unused.journal$$ convert --rules convert.rules$$ - ; rm -rf *$$
|
2011-06-03 21:40:49 +04:00
|
|
|
<<<
|
|
|
|
10/2009/09,Flubber Co,50,
|
|
|
|
11/2009/09,Flubber Co,,50
|
|
|
|
>>>
|
|
|
|
2009/09/11 Flubber Co
|
|
|
|
expenses:unknown $50
|
|
|
|
Assets:MyAccount $-50
|
|
|
|
|
|
|
|
2009/09/10 Flubber Co
|
|
|
|
income:unknown $-50
|
|
|
|
Assets:MyAccount $50
|
|
|
|
|
2011-06-28 02:59:07 +04:00
|
|
|
>>>2 /using conversion rules file convert.rules[0-9]*.$/
|
2011-06-03 21:40:49 +04:00
|
|
|
>>>=0
|