On Fri, Feb 24, 2012 at 10:34:23PM -0700, Zack Williams wrote: > > Typos in account names, metadata tags (ER #'s, categories, etc), > > missing links to receipts, or myriads of other kinds of parseable but > > slightly broken transactions have cropped up and always cost me money > > in lost reimbursements. > > > > This is a key item I need to fix immediately, and is closely related > > to using a UI for data entry instead of a text editor. > > I'm thinking this might depend greatly on how you're dealing with the > input data. This might not work for you but my CSV conversion method > goes as follows, from a new file: > > 1. I create a basic rules file for hledger, tell it which is the date > column, amount column, etc. > 2. I feed the CSV data into hledger, creating an ledger file. hledger > uses an "unknown" account for each of the unidentifiable records. > 3. I run the generated ledger file into ledger (John's C version, 3.x > compiled from git), doing the following command:
Actually, the CSV conversion is flawless. It's typing that messes things up. All of my txns get "default" values for mandatory tags and they are easy to search for. Replacing them I can often use M-/ too, but it doesn't seem to stop the occasional typo getting through. > > ledger3 -f file.ledger -w reg unknown | cut -d " " -f 2-4 | sort | uniq > > This gives me a list of the first 3 words in the description for each > unknown transaction. Usually I can determine an account > classification from this info. CSV2Ledger does fancy regexp based matching, no need for cycles here. > > 4. I modify my hledger rules file and go back to step 2, repeating > until I have no more unknown transactions, and everything looks right. > > > I need to be able to ensure that data is entered (or altered) > > consistently and correctly. A UI can really help by limiting the kinds > > of edits and allowed values, or potentially constraints can be placed > > in ledger (John's assert statements). > > IIRC, but Beancount had a similar feature where it would throw errors > if you didn't predefine accounts before performing operations on them. > > A single purpose "check ledger file for only valid accounts" utility > would be kind of handy... > > - Zack > That's what I was thinking. John mentioned a new --strict mode, but I haven't had a chance to look at it. ------------------------------------------------------------------ Russell Adams [email protected] PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
