magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.8k stars 749 forks source link

Deck import/export feature must be reviewed #12304

Open JayDi85 opened 1 month ago

JayDi85 commented 1 month ago

Looks like some services removed deck formats support (or the new one do not have it). Import deck with set info is important feature of xmage.

TODO:

Example: https://www.moxfield.com/

It’s uses own text format like MTGA, but other format options ignore set info (even MTGA). So users can’t easy to import deck to xmage without info lost.

IMG_0420

sprangg commented 1 month ago

For reference, a couple years ago in pull request https://github.com/magefree/mage/pull/9321 I added a way to import mtga decks through the clipboard importer menu, to be able to get a deck + set info from Draftmancer with its export to clipboard function. It's worked well for the draft groups I've been a part of.

It could definitely be more robust though - it just checks whether the first line of the import contains only the word "Deck" and treats it as an mtga import if that's the case. Most mtga exporters are formatted in such a way that the first line is "Deck", or at least were back then when I checked.

Better way could be to try various regex patterns to find out the format of the clipboard import, and then use the according importer.

tiera3 commented 1 month ago

I don't remember from where I was trying to import from, but awhile back I had something that began with Sideboard and then followed with Deck. Manipulating in the import-from-clipboard screen is a little touchy, so I pasted into a notepad file, adjusted there, recopied to the copy buffer then used import-from-clipboard and it worked fine.

Normally when I am importing from draftmancer, I edit the displayed clipboard buffer directly - because I'm only editing the card number of basic lands.

tiera3 commented 1 month ago

I suppose I should elaborate on the touchy editing in the displayed buffer. It is because it is combined with the info at the top. It would be easier if that info was external.