Skip to content

Commit

Permalink
Merge branch 'release/1.0.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelTVMS committed Apr 14, 2023
2 parents 239ab59 + e1f16c9 commit 87a2ed4
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: pub
directory: /
target-branch: develop
schedule:
interval: "weekly"
92 changes: 83 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,85 @@
# Alpha 0.10.0
# Version 1.0.0

> **Warning**
> Use this application at you own risk. This is a hobby project. I'm not responsible for the correctness of the correctness of the data generated by this application and personal fiscal damage it may incur.
>This application is on a very early development phase.
> **Warning**
> Use this application at you own risk. This is a hobby project. I'm not a tax expert. I'm not a lawyer. I'm not a financial advisor. I'm just a guy that likes to code and likes to invest. I'm not responsible for any damage this application may cause. If you have any doubts about your taxes, please consult a professional.
- Ability to generate the output in a format that easily apply to the portugal IRS system..
- Transactions grouped by country for stocks and ETFs.
- Transactions grouped by crypto currency.
- Transactions grouped by CFD.
- Added testing for the full commands.
## How to use it

Download it form the [releases page](https://github.com/MiguelTVMS/broker_to_tax/releases). It's strongly recommended to use the latest version.

The tool is very simple, you must provide the file where the source operations are available in csv format. Read the [eToro section](#etoro) in [Supported Brokers](#supported-brokers) to know how to generate the csv.

Heres an example of how to use it to generate the csv for eToro stock operations grouped by source country.

```shell
brokertotax etoro stock -f "path/to/etoro_closed_positions.csv" -g source-country
```

This will generate a csv file with stock operations grouped by country. The file will be named `stock_gains_grouped_by_source_country.csv`. This file is ready to be used as base for the Portuguese IRS form categories G or E.

The application support these kinds of operations, `stock`, `crypto`, `CFD`, and `ETF`. The `stock` operations can be grouped in `source-country` and `operations` by using the `-g` or `--group-by` parameter. Other operations can be grouped in other ways, see the help for more information.

```shell
brokertotax etoro -h
```

Will output something like this:

```text
Convert eToro data to a format that can be imported into tax software
Usage: brokertotax etoro <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
cfd Convert CFD data to a format that can be imported into tax software
crypto Convert crypto data to a format that can be imported into tax software
etf Convert ETF data to a format that can be imported into tax software
stock Convert stock data to a format that can be imported into tax software
Run "brokertotax help" to see global options.
```

Each command has it own help. For example:

```shell
brokertotax etoro stock -h
```

Will output something like this:

```text
Convert stock data to a format that can be imported into tax software
Usage: brokertotax etoro stock [arguments]
-h, --help Print this usage information.
-f, --file The file to parse.
--exchange-directory The directory containing the exchange rates
(defaults to "data/exchange")
-c, --currency The currency to use for the gains.
[usd, eur (default)]
-g, --group-by The grouping to use in the gains.
[none (default), source-country, operation]
Run "brokertotax help" to see global options.
```

Check the full help for know more about about the available options.

## Supported Brokers

This first version is being developed to support [eToro](https://www.etoro.com/). But the idea is that new brokers can be added by pull requests. The code is being created to be simple to add a broker.

### eToro

How to get the operations in eToro:

1. Go to the [Account Statement](https://www.etoro.com/documents/accountstatement) page.
2. Select the last year option.
3. Click on create.
4. Click on the green document icon with "xls" written inside it.
5. Save the file.
6. Open the file using excel and go to the Closed Positions sheet.
7. Go to File » Save As and choose CSV as format.
8. Click on save. An alert will rise telling that it will only save the current sheet since CSV doesn't support multiple sheets, click Ok.
9. Run the command as specified in [How to use it](#how-to-use-it) section.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@
A simple cli application that transforms information from brokers to the Portuguese tax information.

> **Warning**
> Use this application at you own risk. This is a hobby project. I'm not responsible for the correctness of the correctness of the data generated by this application and personal fiscal damage it may incur. I'm not a tax expert. I'm not a lawyer. I'm not a financial advisor. I'm just a guy that likes to code and likes to invest. I'm not responsible for any damage this application may cause.

> Use this application at you own risk. This is a hobby project. I'm not a tax expert. I'm not a lawyer. I'm not a financial advisor. I'm just a guy that likes to code and likes to invest. I'm not responsible for any damage this application may cause. If you have any doubts about your taxes, please consult a professional.
## How to use it

> **Warning**
> This application is on a very early development phase.
Download it form the [releases page](https://github.com/MiguelTVMS/broker_to_tax/releases).
Download it form the [releases page](https://github.com/MiguelTVMS/broker_to_tax/releases). It's strongly recommended to use the latest version.

The tool is very simple, you must provide the file where the source operations are available in csv format. Read the [eToro section](#etoro) in [Supported Brokers](#supported-brokers) to know how to generate the csv.

Expand All @@ -27,9 +22,7 @@ brokertotax etoro stock -f "path/to/etoro_closed_positions.csv" -g source-countr

This will generate a csv file with stock operations grouped by country. The file will be named `stock_gains_grouped_by_source_country.csv`. This file is ready to be used as base for the Portuguese IRS form categories G or E.

The application support these kinds of operations, `stock`, `crypto`,`CFD` and `ETF`. The `stock` operations can be grouped in `source-country` and `operations` by using the `-g` or `--group-by` parameter.

Other operations can be grouped in other ways. Check the help for more information.
The application support these kinds of operations, `stock`, `crypto`, `CFD`, and `ETF`. The `stock` operations can be grouped in `source-country` and `operations` by using the `-g` or `--group-by` parameter. Other operations can be grouped in other ways, see the help for more information.

```shell
brokertotax etoro -h
Expand Down
16 changes: 13 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
name: broker_to_tax
description: A simple cli application that transforms information from brokers to the Portuguese tax information.
version: 0.10.0
repository: https://github.com/MiguelTVMS/broker_to_tax
description: >-
A simple cli application that transforms information from brokers to the Portuguese tax information.
version: 1.0.0
homepage: https://github.com/MiguelTVMS/broker_to_tax
repository: https://github.com/MiguelTVMS/broker_to_tax.git
issue_tracker: https://github.com/MiguelTVMS/broker_to_tax/issues
documentation: https://github.com/MiguelTVMS/broker_to_tax#readme

platforms:
linux:
macos:
windows:

publish_to: none

environment:
sdk: ">=2.19.5 <3.0.0"
Expand Down

0 comments on commit 87a2ed4

Please sign in to comment.