hledger/tests/convert-with-in-and-out-fields.test
2011-09-19 03:10:16 +00:00

17 lines
614 B
Plaintext

# Conversion from CSV to Ledger with in-field and out-field
rm -rf 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$$ ; bin/hledger convert --rules-file convert.rules$$ - ; rm -rf *$$
<<<
10/2009/09,Flubber Co,50,
11/2009/09,Flubber Co,,50
>>>
2009/09/10 Flubber Co
income:unknown $-50
Assets:MyAccount $50
2009/09/11 Flubber Co
expenses:unknown $50
Assets:MyAccount $-50
>>>2 /using conversion rules file convert.rules[0-9]*.$/
>>>=0