EchoMTG / mtg-csv-reader

A multi-purpose CSV reader that prepares magic card CSV or TSV lists from various sources to import into echomtg.com
https://us-central1-echo-csv.cloudfunctions.net/echo-csv/upload
1 stars 0 forks source link

CSV importer #16

Closed RokerEcho closed 1 year ago

RokerEcho commented 2 years ago

https://github.com/EchoMTG/mtg-csv-reader/blob/75bf05a2dace4d900ead7c108c5801b1fd592536/src/card_parsers/card_parser.ts#L61-L122

Above section appears to validate set code/expansion, or move expansion headers into set code if the headers are different?

https://github.com/EchoMTG/mtg-csv-reader/blob/75bf05a2dace4d900ead7c108c5801b1fd592536/src/card_parsers/card_parser.ts#L207-L294

This section is his parser, I'm not sure if there is a clear way to use either section to try and look at TcgID# prior to name/set? This is all def a little bit beyond me, I can sorta read through it and I understand what it does, but not how it does things.

Only other question for ID# vs name/set is how would it work if someone provides ID#s for some cards but not all, it seems like the parsers going on headers, not individual data, but I could be wrong.

I'll link up the sections where I think it is taking the parsed info and comparing to echo IDs

RokerEcho commented 2 years ago

https://github.com/EchoMTG/mtg-csv-reader/blob/75bf05a2dace4d900ead7c108c5801b1fd592536/src/card_parsers/card_parser.ts#L299-L332

Lines where the parsed info looks at Echo IDs I believe