Skip to content

Commit

Permalink
degiroConverterV3: recover simple broken CSV records
Browse files Browse the repository at this point in the history
  • Loading branch information
ikruglov committed Jan 5, 2025
1 parent 5fdaf7c commit b711ee5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/converters/degiroConverterV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export class DeGiroConverterV3 extends AbstractConverter {
* @inheritdoc
*/
public processFileContents(input: string, successCallback: any, errorCallback: any): void {
// my exported file contained many broken records like this. It's easy to recover them. So, why not?!
// 13-04-2016,09:00,13-04-2016,ABN AMRO BANK NV,NL0011540547,"Koop 10 @ 18,3 EUR",,EUR,-183.00,EUR,,df134e52-2753-4694-
// ,,,,,,,,,,,947b-418f08d4a352
input = input.replace(/(,[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-)\n,{11}([a-f0-9]{4}-[a-f0-9]{12})$/mg, '$1$2');

// Parse the CSV and convert to Ghostfolio import format.
parse(input, {
Expand Down

0 comments on commit b711ee5

Please sign in to comment.