Skip to content

Commit 61529c4

Browse files
Improved user experience and added support for more CSV structures
1 parent 8950751 commit 61529c4

File tree

3,109 files changed

+926688
-407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,109 files changed

+926688
-407
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
/start.bat

.idea/modules.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vorn-finance-tracker.iml

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+39-22
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ to Santander themselves to sort. Sorry folks.
1010

1111
## Prerequisite Software
1212

13-
- [Python 3](https://www.python.org/)
13+
### Windows
14+
15+
None! Everything is provided in the `venv` folder. However, if you don't want to run it that way, you can install the
16+
prerequisites using `install_prerequesites.bat` after installing Python.
17+
18+
### Mac and Linux
19+
20+
- [Python 3](https://www.python.org/) (make sure to add Python to PATH/environment variables when installing)
1421
- [pandas 1.2.0 or newer](https://pandas.pydata.org/)
1522
- [openpyxl 3.0.5 or newer](https://pypi.org/project/openpyxl/)
1623
- [colorama 0.4.4 or newer](https://pypi.org/project/colorama/) (optional, enables colours in command line output)
1724

18-
Once Python is installed, pandas and openpyxl can be installed by running `install_prerequesites.bat` (Windows) or
19-
`install_prerequisites.sh` (Linux/macOS) once Python is installed or from the command line using
20-
[pip](https://pypi.org/project/pip/):
25+
Once Python is installed, pandas and openpyxl can be installed by running `install_prerequisites.sh` or from the command
26+
line using [pip](https://pypi.org/project/pip/):
2127

2228
```commandline
2329
pip install -r requirements.txt
@@ -42,17 +48,39 @@ In order to use Vorn Finance Tracker, you need two things:
4248
like. See [Using Custom Categories](#using-custom-categories) for info on how to use categories other than the
4349
default, so you can customise the spreadsheet to your liking.
4450

45-
Once you have these, run `vorn_finance_tracker.py`. This can either be done by running it from your favourite text
46-
editor or IDE, at which point the program will ask to be pointed towards the above files, or you can run it from the
47-
command line with the following arguments:
51+
Now follow the instructions for your operating system below.
52+
53+
### Windows
54+
55+
Run the `start.bat` file. That's it. Bish bash bosh.
56+
57+
Alternatively, follow the instructions for Mac and Linux, making sure to use Windows file paths in the command. Only do
58+
this if you ran `install_prerequisites.bat` earlier.
59+
60+
### Mac and Linux
61+
62+
Run `vorn_finance_tracker.py`. This can either be done by running it from your favourite text editor or IDE, at which
63+
point the program will ask to be pointed towards the above files, or you can open the terminal on your machine (_not_
64+
the Python shell!) and run it with the following arguments:
4865

4966
```commandline
50-
python -m vorn_finance_tracker.py <csv_path> <spreadsheet_path>
67+
python vorn_finance_tracker.py <csv_file_path> <spreadsheet_file_path>
68+
```
69+
70+
For example:
71+
72+
```commandline
73+
python vorn_finance_tracker.py ~/transactions.csv spreadsheet.xlsx
5174
```
5275

5376
If the above code throws a SyntaxError, replace `python` with `python3` and run it that way.
5477

55-
If it's your first time running the program, it will ask you who you bank with and what curency symbol to use. This is
78+
The file paths are both optional, too, and the code will just ask you to select your files them later if they're not
79+
present in the command.
80+
81+
### Using the program
82+
83+
If it's your first time running the program, it will ask you who you bank with and what currency symbol to use. This is
5684
so that the program can parse the data from your CSV file correctly. There are a few banks pre-programmed, but if yours
5785
isn't included, type `other` and follow the steps in the command terminal.
5886

@@ -64,19 +92,7 @@ Starling
6492
The reason there aren't more is because I don't have accounts with other banks that allow me to easily access a CSV file
6593
of transactions. If you want your bank supported by default, see [Contribute](#contribute).
6694

67-
If you have changed bank or currency, and wish to reset either to default (where the program will ask for your input),
68-
navigate to `files/user_and_bank_data.json`. Towards the top of the file, you'll see a snippet of code that looks
69-
something like this:
70-
71-
```json
72-
"user": {
73-
"bank": "monzo",
74-
"currency": "$"
75-
}
76-
```
77-
78-
In order to reset the bank, just remove whatever is written between the double quotes following `"bank":` and the same
79-
applies for currency. Make sure to leave the quotes where they are though!
95+
If you have switched bank or currency, press `2` or `3` respectively when the menu appears.
8096

8197
The program will then guide you through the rest of the process yourself, but should you have any issues, please raise
8298
them with [@isaacharrisholt](https://github.com/isaacharrisholt).
@@ -156,6 +172,7 @@ anything you'd like added, please let me know!
156172
- [x] Make category customisation more user-friendly
157173
- [x] Expand support to all banks
158174
- [x] Better utilise the pandas library to optimise program speed
175+
- [x] Improve user experience
159176
- [ ] Expand spreadsheet customisation options
160177
- [ ] Add a GUI
161178
- [ ] \(Maybe) Integrate with banking APIs so transactions can be obtained programmatically

files/user_and_bank_data.json

+18-4
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,33 @@
66
"banks": {
77
"monzo": {
88
"date": "Date",
9-
"date_format": "%d/%m/%Y",
109
"vendor": "Name",
11-
"amount": "Amount",
10+
"amount": {
11+
"type": 1,
12+
"header": "Amount"
13+
},
1214
"reference": "Notes and #tags",
1315
"transaction_id": "Transaction ID"
1416
},
1517
"starling": {
1618
"date": "Date",
17-
"date_format": "%d/%m/%Y",
1819
"vendor": "Counter Party",
19-
"amount": "Amount (GBP)",
20+
"amount": {
21+
"type": 1,
22+
"header": "Amount (GBP)"
23+
},
2024
"reference": "Reference",
2125
"transaction_id": ""
26+
},
27+
"ran": {
28+
"amount": {
29+
"type": 1,
30+
"header": "Amount"
31+
},
32+
"date": "Date",
33+
"vendor": "Name",
34+
"reference": "Notes and #tags",
35+
"transaction_id": "Transaction ID"
2236
}
2337
}
2438
}

install_prerequisites.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python -m pip install -r requirements.txt || python3 -m pip install -r requirements.txt || sudo python -m pip install -r requirements.txt || sudo python3 -m pip install -r requirements.txt
1+
python3 -m pip install -r requirements.txt || python -m pip install -r requirements.txt || sudo python3 -m pip install -r requirements.txt || sudo python -m pip install -r requirements.txt

0 commit comments

Comments
 (0)