Skip to content

Commit

Permalink
Add Windows executable
Browse files Browse the repository at this point in the history
  • Loading branch information
flywire committed Sep 12, 2023
1 parent 50f550e commit 37d2579
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ reworked using the example file as a template before loading the csv file.

## Installation

Windows users should look for `etf2cb.exe` and download it if it is available
Most Windows users will download `etf2cb.exe` and the `*.csv` files
then skip to the next section.

---
Expand Down Expand Up @@ -45,14 +45,12 @@ Java [here](https://www.java.com/download/).

Start a command prompt.

If you downloaded `etf2cb.exe` it is run without the `python` prefix or `.py`
extension, but otherwise it is the same.

Alternatively,
* run `etf2cb` if you downloaded the Windows executable
* Alternatively, run under python, for example:
`python etf2cb.py`

```
python etf2cb.py -h
usage: etf2cb.py [-h] filename [area]
usage: etf2cb [-h] filename [area]
Extract ETF Annual Statement transaction component splits
Expand All @@ -70,6 +68,13 @@ Many things can fail with this automated process so users should validate the
output manually.
Firstly, check the total of all deposit amounts is zero.

## Advanced Commands

* wildcards for a folder:
`for %f in (tax\v*.pdf) do etf2cb %f vanguard`
* concatenate files with manual confirm:
`copy tax\*split.csv tax\all_splits.csv`

## Customising

Amounts will be extracted from the pdf using the area reference unless run on
Expand All @@ -78,18 +83,24 @@ a `.csv` file.
1. `tabula-area.csv` must be specified to extract data from pdf
1. `tax-acc.csv` must be configured for each label

The `tabula-area.csv` file in the distribution is user-configurable.
The `tabula-area.csv` file in the distribution is user-configurable,
For example,
change the second line to read the address entity instead of the HIN.

Tax account configuration is required in a user-configurable `tax-acc.csv`
file containing the following fields:

1. `Label` - first part uses tax codes, second part uses strings in pdf labels
1. `Description` - details are optional
1. `Type` - 'CR' or 'DB' account
1. `Type` - `CR` or `DB` account
1. `Account` - users cashbook chart of account code

## Sample Output

Look at the sample in the `Tax` folder.

etf2cb tax\VAS-annual-tax-statement-2018 vanguard

```csv
Entity,Date,Description,Account,Deposit
X0123456789,30/06/2018,VAS,Income:Distribution:13U,-3606.42
Expand All @@ -105,6 +116,8 @@ X0123456789,30/06/2018,VAS,Income:Distribution:Rounding,-0.01
```

There are many ways to accumulate the splits for all ETFs by entity and year.
A simple way is to concatenate all csv files then open it in a spreadsheet
and do a pivot table.

In GnuCash use:
1. File, Import, Import Transactions from csv,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added etf2cb.exe
Binary file not shown.

0 comments on commit 37d2579

Please sign in to comment.