Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
Removed mentions about CSV. Updated instructions in README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMakarov committed Aug 28, 2023
1 parent f529e97 commit fca64d3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 320 deletions.
41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# aggregate-inecobank-statement
[CLI yet] tool to aggregates data from Armenian's Inecobank "statement" per month
into groups which allows to get insights into your budget.
Local tool to aggregates data from Armenian's [Inecobank](https://online.inecobank.am)
"statements" from multiple accounts monthly, into groups which allows to get insights into your budget.

Example of output (numbers are made up, sum may not match):
```
2023-08-01..2023-08-31:
Income (2, sum=1,493,878.00):
Main salary : 1,345,343.00
unknown : 148,535.00
Expenses (13, sum=1,020,636.38):
Other account : 456,000.00
Expenses (13, sum= 920,636.38):
Rent : 300,000.00
Tom's health : 240,000.00
Cash : 178,000.00
Cash withdrowal : 178,000.00
Groceries : 112,831.00
Hotels : 90,000.00
Kindergarten : 90,000.00
Kate's health : 61,000.00
unknown : 19,370.00
Taxi : 17,600.00
Entertainment : 14,000.00
Subscriptions : 7,787.78
Expand All @@ -25,45 +23,42 @@ Example of output (numbers are made up, sum may not match):
Income (2, sum=1,516,629.00):
...
```
Where "unknown" is group-s of "not classified yet" transactions.

Works with XML statements only, for CSV outputs failed to complete.
All Golang libraries I found are based on "encoding/csv" stdlib package which can't
parse CSV not compliant with [RFC 4180](https://www.ietf.org/rfc/rfc4180.txt).
But world is full of "don't care/know" developers and CSV-s with rows formatted as `cell1,"ce,ll2",3`.

# How to use

1. Download binary ("aggregate-inecobank-statements-\*-\*" file) for your operating system from
[Releases](https://github.com/AlexanderMakarov/aggregate-inecobank-statement/releases) page.
2. Download "Statement ....xml" file from https://online.inecobank.am.
Click of account from which you want analyze expenses,
next put into 'From' and 'To' fields dates you want to analyze,
2. Download "Statement ....xml" files from https://online.inecobank.am for interesting period and
put them near the "aggregate-inecobank-statements-\*-\*" file.
In details, on [main page](https://online.inecobank.am) click on the chosen account,
specify into 'From' and 'To' fields dates you want to analyze,
press 'Search', scroll page to bottom and here at right corner will be 5 icons to download statement.
Press XML button and save file as "Statement.xml" near the binary.
Press XML button and save near "aggregate-inecobank-statements-\*-\*" file.
3. Download example of configuration
[config.yaml](https://github.com/AlexanderMakarov/aggregate-inecobank-statement/raw/master/config.yaml).
Don't need to update it yet, see step 5.
4. Run binary ("aggregate-inecobank-statements-\*-\*" file).
It would open text file with list from a lot of groups where (most probably)
It would open text file with the list from a lot of groups where (most probably)
a lot of names would be taken from "Details" field of transactions but some of them
would be from the example config groups.
5. Investigate your personal transaction information and update configuration file groups with some unique
5. Investigate your personal transaction information and update configuration file groups with unique
for specific transaction substrings to aggregate transaction into these groups.
See example in configuration file - you may remove not needed and add your own groups.
See examples in configuration file - you may remove not needed and add your own groups.
Be careful about syntax and indentations.
6. Run binary again, and repeat configuration changes if need.
When number of transactions in "unknown" group would decrease to small enough number
set `detailedOutput` to `false` in configuration file to hide detalization by transactions.
If you still want to see all these "unknown" transactions then consider to set
`groupAllUnknownTransactions` to `false` - it will cause to put new groups with name equal to "Details" field value.
7. Run binary again - it should provide clean report for manual investigation, comparing months, etc.
On new month it is enough to downloan "Statements" with new transactions and run binary again.

# TODO
- [x] Add support of statements from different accounts.
- [x] Parse settings from the file.
- [x] Configure way to skip transactions from other file.
- [x] Provide good start config.
- [x] Add CI/CD with builds for Unix/Windows/MacOS.
- [ ] Clean extra tags from the repo.
- [ ] Update README.
- [x] Clean extra tags from the repo.
- [x] Update README.
- [ ] Create video "How to use".
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ go 1.20
require (
github.com/alexflint/go-arg v1.4.3
github.com/go-playground/validator/v10 v10.15.1
github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d
golang.org/x/text v0.11.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -19,4 +17,5 @@ require (
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.11.0 // indirect
)
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.15.1 h1:BSe8uhN+xQ4r5guV/ywQI4gO59C2raYcGffYWZEjZzM=
github.com/go-playground/validator/v10 v10.15.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04vbmDOc3yuruGvVO+LOa7cVER3yWw=
github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
220 changes: 0 additions & 220 deletions ineco_csv_parser.go

This file was deleted.

Loading

0 comments on commit fca64d3

Please sign in to comment.