Skip to content

Commit

Permalink
Add control to force DEGIRO V2 in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dickwolff committed Feb 6, 2024
1 parent 1675446 commit 8563634
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ The following parameters can be given to the Docker run command.
| `--env GHOSTFOLIO_ACCOUNT_ID=xxxxxxx` | N | Your Ghostolio account ID <sup>1</sup> |
| `--env USE_POLLING=true` | Y | When set to true, the container will continously look for new files to process and the container will not stop. |
| `--env DEBUG_LOGGING=true` | Y | When set to true, the container will show logs in more detail, useful for error tracing. |
| `--env FORCE_DEGIRO_V2=true` | Y | When set to true, the converter will use the DEGIRO V2 converter (currently in beta) when a DEGIRO file was found. |

1: You can retrieve your Ghostfolio account ID by going to Accounts > select your account and copying the ID from the URL.

Expand Down
5 changes: 4 additions & 1 deletion sample-degiro-export.csv
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ Datum,Tijd,Valutadatum,Product,ISIN,Omschrijving,FX,Mutatie,,Saldo,,Order Id
01-08-2023,10:03,01-08-2023,ISHARES NASDAQ US BIOTECHNOLOGY ETF,IE00BYXG2H39,DEGIRO Transactiekosten en/of kosten van derden,,EUR,-1.00,EUR,5.54,4c29dd81-bb01-40fa-8dda-aae3d05dae79
01-08-2023,10:03,01-08-2023,ISHARES NASDAQ US BIOTECHNOLOGY ETF,IE00BYXG2H39,"Verkoop 1 @ 5,416 EUR",,EUR,5.42,EUR,6.54,4c29dd81-bb01-40fa-8dda-aae3d05dae79
25-07-2023,14:31,25-07-2023,ISHARES KOREA,IE00B0M63391,DEGIRO Transactiekosten en/of kosten van derden,,EUR,-1.00,EUR,44.92,d4f45240-d763-4b95-8590-2ba158d38207
25-07-2023,14:31,25-07-2023,ISHARES KOREA,IE00B0M63391,"Koop 1 @ 42,53 EUR",,EUR,-42.53,EUR,45.92,d4f45240-d763-4b95-8590-2ba158d38207
25-07-2023,14:31,25-07-2023,ISHARES KOREA,IE00B0M63391,"Koop 1 @ 42,53 EUR",,EUR,-42.53,EUR,45.92,d4f45240-d763-4b95-8590-2ba158d38207
15-05-2019,09:05,15-05-2019,ISHARES MSCI WOR A,IE00B4L5Y983,"Compra 6 ISHARES MSCI WOR A@49,785 EUR (IE00B4L5Y983)",,EUR,-298.71,EUR,0.64,a47e2746-bfbd-4654-bd6c-5e58e470d32f
02-01-2024,14:42,02-01-2024,ISHARES MSCI WOR A,IE00B4L5Y983,Comissões de transação DEGIRO e/ou taxas de terceiros,,EUR,-1.00,EUR,2.54,7b377a93-5695-4131-8954-5c78996fbed4
02-01-2024,14:42,02-01-2024,ISHARES MSCI WOR A,IE00B4L5Y983,"Compra 1 ISHARES MSCI WOR A@82,055 EUR (IE00B4L5Y983)",,EUR,-82.06,EUR,3.54,7b377a93-5695-4131-8954-5c78996fbed4
12 changes: 10 additions & 2 deletions src/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ chokidar
converterKey = closestMatch[0];
}

const converter = headers.get(converterKey);
console.log(`[i] Determined the file type to be of kind '${converter}'.`);
let converter = headers.get(converterKey);

// Temporary control to force DEGIRO V2 converter while in beta.
if (process.env.FORCE_DEGIRO_V2 && converter === "degiro") {
converter = "degiro-v2"
console.log(`[i] Determined the file type to be of kind '${converter}' (overidden by environment variable).`);
}
else {
console.log(`[i] Determined the file type to be of kind '${converter}'.`);
}

// Determine convertor type and run conversion.
createAndRunConverter(converter, filePath, outputFolder,
Expand Down

0 comments on commit 8563634

Please sign in to comment.