On Sat, Feb 25, 2012 at 7:19 AM, Zack Williams <[email protected]> wrote: > I'll have to try CSV2Ledger.
Just tried CSV2Ledger, had a few comments: - running it on my system via MacPorts requires the following ports of modules installed, and changing the shebang line to use /usr/bin/env perl rather than a hardcoded path: p5-digest p5-smart-comments p5-template-toolkit p5-text-csv p5-timedate p5-yaml - I had some trouble importing my input file until I realized it was a character set issue. Changing everything to utf8, then changing the filehandle to read in in utf8 mode solved the issue - previously it was showing a mismatch in the number of columns. - It appears that ledger files it writes work fine in ledger 2.6.x and hledger 0.17, but throw this error in ledger 3: Error: There cannot be null amounts after balancing a transaction I'm assuming this is because ledger 3 is trying to balance the metadata lines - is there a reason they're in round brackets before the semicolon ala automated transactions? Am I missing something obvious here? - There doesn't seem to be a way to not use check numbers - some of the imports I've been doing lack a transaction/check number, and importing them if omitting CheckNum in the FileMatches.yaml file results in an "Use of uninitialized value in string ne at ./CSV2Ledger.pl line 434, <FH> line ##" error. - One interesting difference - hledger csv conversion is that I can match more than one regex into a one destination account, whereas CSV2Ledger can set both the source/destination accounts but would need a more complex regex to match unrelated lines. Maybe a sort format that assumes that un-regex-quoted lines are regexes that start with '^', and quoted start with 'm', and have the last line specify source/destination accounts ala this: Bank /.*tax/ Assets:Checking => Expenses:Business - I really like the preprocess directive. Some of my CSV files have consecutive spaces in the description fields, which messes up ledger, and fixing this previously required an additional step. - The dedupe works great. Thanks, Zack
