Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

English language? #277

Open
fugkco opened this issue Jul 26, 2024 · 8 comments
Open

English language? #277

fugkco opened this issue Jul 26, 2024 · 8 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@fugkco
Copy link

fugkco commented Jul 26, 2024

Any chance for English language support?

Example:

Date,Time,Value date,Product,ISIN,Description,FX,Change,,Balance,,Order Id
04-07-2024,07:40,03-07-2024,HP INC,US40434L1052,Dividend Tax,,USD,-0.21,USD,1.17,
04-07-2024,07:40,03-07-2024,HP INC,US40434L1052,Dividend,,USD,1.38,USD,1.38,
06-11-2023,15:33,06-11-2019,HP INC,US40434L1052,FX Credit,1.2868,USD,106.55,USD,0,dbe4ec4d-6a6e-4315-b661-820dd1f1d58d
06-11-2023,15:33,06-11-2019,HP INC,US40434L1052,FX Debit,,GBP,-82.8,GBP,138.89,dbe4ec4d-6a6e-4315-b661-820dd1f1d58d
06-11-2023,15:33,06-11-2019,HP INC,US40434L1052,DEGIRO Transaction and/or third party fees,,GBP,-0.43,GBP,221.69,dbe4ec4d-6a6e-4315-b661-820dd1f1d58d
06-11-2023,15:33,06-11-2019,HP INC,US40434L1052,DEGIRO Transaction and/or third party fees,,GBP,-0.02,GBP,222.12,dbe4ec4d-6a6e-4315-b661-820dd1f1d58d
06-11-2023,15:33,06-11-2019,HP INC,US40434L1052,Buy 5 HP [email protected] USD (US40434L1052),,USD,-106.55,USD,-106.55,dbe4ec4d-6a6e-4315-b661-820dd1f1d58d
@VibeNL
Copy link
Owner

VibeNL commented Jul 27, 2024

Hey @fugkco ,

Of course we can add support for English since you provided an example 😀.

I'll put it on top of my Todo list.

@VibeNL VibeNL added enhancement New feature or request good first issue Good for newcomers labels Jul 27, 2024
@VibeNL
Copy link
Owner

VibeNL commented Aug 1, 2024

@fugkco , I have made a change to parse the files. Could give it a try and lets me know if it works 👼 :
docker pull vibenl/ghostfoliosidekick:pr-278

@VibeNL
Copy link
Owner

VibeNL commented Aug 10, 2024

Merged it the the main branch, in case there are issues let me know

@VibeNL VibeNL closed this as completed Aug 10, 2024
@fugkco
Copy link
Author

fugkco commented Aug 26, 2024

@VibeNL sorry it took so long to look at this. I'm unable to test it (or maybe it's a bug?). I get the following error:

sidekick-1  | fail: GhostfolioSidekick.FileImporter.FileImporterTask[0]
sidekick-1  |       Error The input string '' was not in a correct format.
sidekick-1  |       System.FormatException: The input string '' was not in a correct format.
sidekick-1  |          at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
sidekick-1  |          at System.Number.ParseDecimal[TChar](ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
sidekick-1  |          at System.Decimal.Parse(String s, IFormatProvider provider)
sidekick-1  |          at GhostfolioSidekick.Parsers.DeGiro.DeGiroRecordEN.GetQuantity() in /src/Parsers/DeGiro/DeGiroRecordEN.cs:line 85
sidekick-1  |          at GhostfolioSidekick.Parsers.DeGiro.DeGiroParserBase`1.ParseRow(T record, Int32 rowNumber) in /src/Parsers/DeGiro/DeGiroParserBase.cs:line 41
sidekick-1  |          at GhostfolioSidekick.Parsers.RecordBaseImporter`1.ParseActivities(String filename, IHoldingsCollection holdingsAndAccountsCollection, String accountName) in /src/Parsers/RecordBaseImporter.cs:line 62
sidekick-1  |          at GhostfolioSidekick.FileImporter.FileImporterTask.DoWork() in /src/GhostfolioSidekick/FileImporter/FileImporterTask.cs:line 87
sidekick-1  | info: GhostfolioSidekick.TimedHostedService[0]
sidekick-1  |       Service FileImporterTask has executed.

I'm unsure which line is causing the problem, or what to look for to see what might be the issue.

@VibeNL VibeNL reopened this Aug 26, 2024
@VibeNL VibeNL added bug Something isn't working and removed good first issue Good for newcomers labels Aug 26, 2024
@VibeNL
Copy link
Owner

VibeNL commented Aug 27, 2024

It seems not to be able to parse the description in a file to get the quantity correctly.
You can view the testfiles I have added to view if there are any lines different from your file:

https://github.com/VibeNL/GhostfolioSidekick/blob/master/Parsers.UnitTests/TestFiles/DeGiro/EN/BuyOrders/single_buy_usd.csv?plain=1
https://github.com/VibeNL/GhostfolioSidekick/blob/master/Parsers.UnitTests/TestFiles/DeGiro/EN/CashTransactions/single_dividend.csv?plain=1

@fugkco
Copy link
Author

fugkco commented Aug 27, 2024

I think I've narrowed it down to the following bit:

Date,Time,Value date,Product,ISIN,Description,FX,Change,,Balance,,Order Id
09-08-2024,16:10,09-08-2024,MORGAN STANLEY GBP LIQUIDITY FUND,LU0904784781,Money Market fund conversion: Buy 0.5 at 1 GBP,,,,GBP,116.31,
08-08-2024,15:27,31-07-2024,MORGAN STANLEY GBP LIQUIDITY FUND,LU0904784781,Fund Distribution,,GBP,0.50,GBP,116.31,
07-08-2024,15:30,06-08-2024,MORGAN STANLEY GBP LIQUIDITY FUND,LU0904784781,Money Market fund conversion: Sell 0.02 at 1 GBP,,,,GBP,115.81,
03-08-2024,06:42,02-08-2024,,,FX Debit,,GBP,-0.02,GBP,115.81,
03-08-2024,06:42,02-08-2024,,,FX Credit,1.1706,EUR,0.02,EUR,0.00,

It seems to be specifically the money market funds distribution. It's a weird way they've done the fund distributions. It seems the error comes up for all three records if I put them there individually.

@VibeNL
Copy link
Owner

VibeNL commented Aug 28, 2024

I think I've narrowed it down to the following bit:

Date,Time,Value date,Product,ISIN,Description,FX,Change,,Balance,,Order Id
09-08-2024,16:10,09-08-2024,MORGAN STANLEY GBP LIQUIDITY FUND,LU0904784781,Money Market fund conversion: Buy 0.5 at 1 GBP,,,,GBP,116.31,
08-08-2024,15:27,31-07-2024,MORGAN STANLEY GBP LIQUIDITY FUND,LU0904784781,Fund Distribution,,GBP,0.50,GBP,116.31,
07-08-2024,15:30,06-08-2024,MORGAN STANLEY GBP LIQUIDITY FUND,LU0904784781,Money Market fund conversion: Sell 0.02 at 1 GBP,,,,GBP,115.81,
03-08-2024,06:42,02-08-2024,,,FX Debit,,GBP,-0.02,GBP,115.81,
03-08-2024,06:42,02-08-2024,,,FX Credit,1.1706,EUR,0.02,EUR,0.00,

It seems to be specifically the money market funds distribution. It's a weird way they've done the fund distributions. It seems the error comes up for all three records if I put them there individually.

This wasn't in the provided examples 👼 . Will see if I can get the parser to cooperate.

@VibeNL
Copy link
Owner

VibeNL commented Sep 3, 2024

@fugkco , you could try the new build:

docker pull vibenl/ghostfoliosidekick:pr-290

Let me know if there are any issues (or misinterpertations 👼 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants