Comments (6)
Thanks for the report @alecStewart1. Can you add sample csv records, eg for the rules that don't work (and the headings).
from hledger.
Ah, yup. That'll do it.
Thanks Simon!
I have a few CSV other rules to iron out and I'll be good to go! Appreciate the help!
from hledger.
Here's some samples that I fudged some stuff for security for privacy purposes. Entry/row/record 1 and 3 don't work, entry/row/record 2 and 4 will.
Date,Description,Category,Amount,Account,Account #,Institution,Month,Week,Transaction ID,Account ID,Check Number,Full Description,Date Added,,
6/28/24,"Big Company Name Des:payroll, Ln:Stewart, Fn:Alec, EmId:XXXX",,"$3,041.21",Checking Account,xxxxXXXX,Bank of America,6/1/24,6/24/24,XXXXXXXXXX,XXXXXXXXXX,,"BIG COMPANY NAME DES:PAYROLL, LN:STEWART, FN:ALEC, EMID:XXXX",7/1/24,,
6/3/24,"Movement City 1, City 2, XX",,-$98.04,Really Long Credit Card Name,xxxxXXXX,Bank of America,6/1/24,6/3/24,XXXXXXXXXX,XXXXXXXXXXX,,MOVEMENT CITY 1 CITY 2 XX,7/1/24,,
5/23/24,"Sq *coffee Coffee Co, CITY, XX",,-$5.81,Really Long Credit Card Name,xxxxXXXX,Bank of America,5/1/24,5/20/24,XXXXXXXXXX,XXXXXXXXXX,,SQ *COFFEE COFFEE CO CITY XX,7/1/24,,
5/2/24,"Kroger #XXXX, City, XX",,-$80.11,Really Long Credit Card Name,xxxxXXXX,Bank of America,5/1/24,4/29/24,XXXXXXXXXX,XXXXXXXXXX,,KROGER #XXXX CITY XX,7/1/24,,
from hledger.
Your date-format should use %y not %Y (manual -> https://hackage.haskell.org/package/time-1.14/docs/Data-Time-Format.html#v:formatTime).
And, avoid same-line comments in rules files, they are currently not supported.
The currency rule is not needed since these Amount values already include a currency symbol.
Simple catchall, get all transactions that match the regex .[cC]offee*, tag the transaction as an excess expense,
and have account1 be expenses:foodstuff:coffee
This doesn't work.
It's working here..
I would assume this "compounds" with the earlier .[cC]offee* matcher
It doesn't, the last assignment wins (https://hledger.org/dev/hledger.html#how-csv-rules-are-evaluated).
Do these explain what you're seeing ?
from hledger.
It explains a lot yes.
I have an issue though. None of these work
if %Account ^Checking\sAccount$
account2 assets:checking
comment2 bank:my bank
if %Account ^Some\sstupid\slong\sname\sfor\scredit\scard$
account2 liabilities:credit
comment2 bank:my bank
if %Account ^Savings\sAccount$
account2 liabilities:savings
comment2 bank:my bank
I'm no regexp wizard, but all of these regexp will work with the actual names of the accounts if I test them out in a Node.js REPL against the actual account names I want to match.
from hledger.
Ah, \s is not supported (https://hledger.org/dev/hledger.html#matchers). A space worked for me.
from hledger.
Related Issues (20)
- date2-format for date2, CSV import HOT 1
- Project level default configuration should be possible without user intervention HOT 6
- Inconsistent Decimal Mark Handling after CSV Import with Rules HOT 2
- 1.25: balance reports' HTML output stopped showing digit group marks HOT 1
- roi command includes unwanted amounts when given a period and dates on postings. HOT 6
- `stack8.10.yaml`, build failure `NonEmpty` does not export `singleton` HOT 3
- incorrect prices for "daily" roi HOT 8
- Install instruction under Linux with release 1.34 HOT 1
- tldr clients and documentation HOT 4
- Account type tag inconsistently recognized when declared in multiple files HOT 8
- `check` command should not stop after the first error HOT 4
- `--historical` uses period-end valuations of prices, while `--cumulative` doesn't HOT 15
- Ledger file formatting tool HOT 3
- Code for Postings HOT 3
- ledger import not assigning default account2 as per manual HOT 3
- aregister -P, -C and -U miscalculate initial balance HOT 5
- UI bug in hledger web - autocomplete not working on the 5th account field and beyond HOT 1
- NBSP parsing seems to be broken (at least in CSV) HOT 1
- "every Nth day" periodic rule violating start date HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hledger.