StepKie / MtgCsvHelper

csv format conversion tool for MtG collections
Apache License 2.0
24 stars 1 forks source link

Any chance for adding MTGGoldfish format support? #3

Closed Asag321 closed 7 months ago

Asag321 commented 7 months ago

Is your feature request related to a problem? Please describe. I would like to import my MTGA collection to Moxfield but I can only export my collection to MTGGoldfish.CSV with the MTGArenaPro Tracker. Moxfield does not support this format and I have no idea how to convert MTGGoldfish to Moxfield.

Describe the solution you'd like Add support for converting MTGGoldfish.CSV to Moxfield format.

Describe alternatives you've considered Using some other tools that can generate CSV file usable on Moxfield but I did not found anything so far.

StepKie commented 7 months ago

@Asag321 let me know if the conversion works for you (don't forget to clear the browser cache via Ctrl+F5, you should see Version 1.0.0 (cdbc89b) in the upper right corner.

Please close this issue if the output is satisfactory. Otherwise you should provide me with your mtggoldfish csv input file, and what you are expecting to see.

Best regards

Asag321 commented 7 months ago

I see version 1.0 and theres now MTGGoldfish option in the dropdown menu but I'm getting this error:

`Unexpected error converting file: Header with name 'Collector Number'[0] was not found. Headers: 'Card', 'Set ID', 'Set Name', 'Quantity', 'Foil' Headers: 'Card', 'Set ID', 'Set Name', 'Quantity', 'Foil' Headers: 'Card', 'Set ID', 'Set Name', 'Quantity', 'Foil' Headers: 'Card', 'Set ID', 'Set Name', 'Quantity', 'Foil' Headers: 'Card', 'Set ID', 'Set Name', 'Quantity', 'Foil' If you are expecting some headers to be missing and want to ignore this validation, set the configuration HeaderValidated to null. You can also change the functionality to do something else, like logging the issue.

IReader state: ColumnCount: 0 CurrentIndex: -1 HeaderRecord: ["Card","Set ID","Set Name","Quantity","Foil"] IParser state: ByteCount: 0 CharCount: 35 Row: 1 RawRow: 1 Count: 5 RawRecord: Card,Set ID,Set Name,Quantity,Foil

at CsvHelper.Configuration.ConfigurationFunctions.HeaderValidated(HeaderValidatedArgs args) at CsvHelper.CsvReader.ValidateHeader(Type type) at CsvHelper.CsvReader.ValidateHeader[PhysicalMtgCard]() at CsvHelper.CsvReader.d__871[[MtgCsvHelper.Models.PhysicalMtgCard, MtgCsvHelper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at System.Collections.Generic.List1[[MtgCsvHelper.Models.PhysicalMtgCard, MtgCsvHelper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]..ctor(IEnumerable1 ) at System.Linq.Enumerable.ToList[PhysicalMtgCard](IEnumerable1 ) at MtgCsvHelper.MtgCardCsvHandler.ParseCollectionCsv(Stream csvFilePath) at MtgCsvHelper.BlazorWebAssembly.Pages.MtgCsvProcessor.Convert()`

StepKie commented 7 months ago

@Asag321 it is expecting a column named "Collector Number", which is present in the csv I am testing with:

https://github.com/Hottemax/MtgCsvHelper/blob/9d83138f9ed5429f57d003d5097738790ad87cc9/MtgCsvHelper/Resources/SampleCsvs/Collection/mtggoldfish-collection.csv

this is a csv I exported from MtG Goldfish via https://www.mtggoldfish.com/portfolio/export

I am not sure why the csv you have does not have the "Collector Number"? Can you share it in this issue?

The MtgGoldfish documentation is somewhat confusing, it doesn't say anything about Collector Number, but all three types (Paper, Online, Arena) I did an export for had this column.

I am not sure if the parsing in the context of a collection will be at all useful if such a collector number is absent, since it uniquely identifies the card (there might be for example multiple printings of a card in a certain set, like a special treatment.

Let me know if there is anything else I can do. You can share your own csv if you'd like, but I'd be interested where that was exported from - as I said, all my exports did come with that column...

Asag321 commented 7 months ago

I'm not using MtGGoldfish site. I'm exporting collection from mtgarena.pro site because thats the only site that allows me to import my MtGA cards with tracker tool. When I download collection from mtgarena.pro it says its a MTGGoldfish CSV format (and only this one is available). So it seems its somehow different compared to the "original" site? Below is my collection from mtgarena.pro.

collection.csv

StepKie commented 7 months ago

I'm not using MtGGoldfish site. I'm exporting collection from mtgarena.pro site because thats the only site that allows me to import my MtGA cards with tracker tool. When I download collection from mtgarena.pro it says its a MTGGoldfish CSV format (and only this one is available). So it seems its somehow different compared to the "original" site? Below is my collection from mtgarena.pro.

collection.csv

There is really nothing I can do if the arena tracker does not export in a format that contains the necessary information. This tool is really geared towards paper cards, i.e. ones that have a collector number (in the lower left corner of the card). If you browser your collection in MtG Arena, you will notice that the digital cards don't have such a number printed on them.

If I check mtgarena.pro, I can see that the collector number is "generated" for most cards based on card / set combination:https://mtgarena.pro/collection/#showtable-true;rulings-1;srt-11;direct-0

But if their export does not export this number, then there is really nothing my tool can do. Determining missing collector numbers by querying the scryfall api is currently out-of-scope, and would take a long time for large collections anyway.

Sorry if I can not give a more satisfactory answer.

StepKie commented 7 months ago

@Asag321 I marked the collector number as optional, and converting your csv and importing it into Moxfield works now.

Check that the version is

image
Asag321 commented 7 months ago

It works now!

Just converted the file and uploaded it to Moxfield and I can see all my owned cards from MTGA. I really appreciate your patience and help. I can finally move to using this site because with the collection on it making usable decks is so much easier.

Again thx alot!