Code Monkey home page Code Monkey logo

mtgcsvhelper's Introduction

MtG Csv Helper

The purpose of this tool is to automate the conversion between several collection formats for Magic the Gathering used by popular tools.

TL;DR

You are welcome to try out the web app here.

ATTENTION: Since this is a client-side Blazor app, the browser may cache data. and this cache needs to be cleared in order to load the latest version of the app. The version displayed in the upper right corner should match the last commit id displayed on the main branch.

  1. Upload input csv file
  2. Select input and output format
  3. Click "Convert". In case of a larger collection, please allow for some processing time.
  4. Download converted output csv file
  • Currently supported:

    • Moxfield
    • DragonShield
    • Manabox
    • Topdecked
    • Deckbox
    • Mtggoldfish
    • Cardkingdom (Low info, only 4 columns - Export only)
  • Potentially added by demand

    • TcgPlayer
    • ???

Project Info

  • Created this tool for my own use since I like to keep my MtG collection up-to-date by using a card scanner.

  • The best ones I found for this purpose are Manabox and MtG DragonShield Card Manager

  • You can export data from their site, but there is no easy way to import it to some of the most popular other collection managers such as Moxfield or Deckbox

  • The other use case, unrelated to card scanners, is to keep your collection in sync across multiple sites

  • The manual conversion process is quite cumbersome, one always has to replace the corresponding Csv Headers, and replace some values that are slightly different. For example

    • Card name: infuriatingly, some sites do not properly encode the full name of double-faced cards, but only front-side.
    • Set information: set name or set code missing, non-standard set names
    • Foil status;: encoded widely different across formats *Card condition: some sites use a scale of 6, some of 7 conditions. These need to be mapped. Loss of information is inevitable when mapping to lower resolution, though.
    • Language: (code vs full name)
    • Price: (various formats with various currencies, with or without currency symbol, leading or trailing position)
    • etc
  • Some columns which are not common to most tools are not supported

This tool defines configurable mappings addressing the above issues in appsettings.json

How to use

Browser

  • A static webapp is available at https://stepkie.github.io/MtgCsvHelper/
  • As opposed to the console version, there is currently no way to access the configuration (appsettings) and customize the app's behavior
  • However, it is more user-friendly and should work across a wide range of default scenarios

Console

  • Prerequisite: Installed .NET Runtime, Version >= 7.0.

  • You can download from the Releases tab on the right, or you can build from source yourself

    • For building from source, unzip the source folde, and run dotnet build in the root directory of the unzipped folder
  • Run the provided MtgCsvHelper.

    • Usage info can be found running it with the --help flag
  • Some additional configurability for end user via appsettings.json etc. *

Troubleshooting

You can report bugs and issues on Github by creating a new issue. After the release of a new version, the browser data/cache should to be cleared to force the new version of the site to be loaded, since static webapps are kept in the browser's cache. The version displayed in the upper right corner should match the last commit id displayed on the main branch.

Current state

  • In appsettings.json, there are a lot of predefined mappings for popular sites

    • DRAGONSHIELD
    • MOXFIELD
    • DECKBOX
    • MANABOX
    • TCGPLAYER
    • MTGGOLDFISH
    • CARDKINGDOM
  • You can add a new configuration for a site that is not yet supported, or even better, create a pull request for it.

  • The format should be self-documenting. This is an example configuration for MOXFIELD:

"MOXFIELD": {
  "Quantity": "Count",
  "CardName": {
    "HeaderName": "Name",
    "ShortNames": false
  },
  "SetCode": "Edition",
  "SetName": null,
  "SetNumber": "Collector Number",
  "Finish": {
    "HeaderName": "Foil",
    "Normal": "",
    "Foil": "foil",
    "Etched": "etched"
  },
  "Condition": {
    "HeaderName": "Condition",
    "Mint": "Mint",
    "NearMint": "Near Mint",
    "Excellent": "Near Mint",
    "Good": "Good (Lightly Played)",
    "LightlyPlayed": "Played",
    "Played": "Heavily Played",
    "Poor": "Damaged"
  },
  "Language": {
    "HeaderName": "Language",
    "ShortNames": false
  },
  "PriceBought": {
    "HeaderName": "Purchase Price",
    "Currency": "EUR",
    "CurrencySymbol": "Absent"
  }
}
  • The left hand side of the mappings should be adapted to match the desired format (csv header row)
  • For some columns, there is additional configuration needed (for example, how the Finish is encoded
  • For the Condition category, note that different sites use different scales (sometimes 6, sometimes 7 different values, as well as different naming schemes). Hence, there is no canonical mapping
  • Some formats (e.g. CARDKINGDOM) should not be used for imports, since they contain very few columns

TODOs

  • Support more formats by popular demand
  • Add support for token cards (widely different encodings)

Examples:

Token: (TODO)

Moxfield:		"1","1","Clue","tmh2","Near Mint","English","","","2022-11-15 13:00:49.057000","14"
DragonShield:	1,Clue Token,Modern Horizons 2 Tokens,TMH2,14,NearMint,German,Normal
Deckbox:		1,0,Clue,Extras: Modern Horizons 2,14,Near Mint,German,,,,,,,,$0.00

Double-sided: (FIXED)

Moxfield:		"1","1","Ambitious Farmhand // Seasoned Cathar","mid","Near Mint","German","","","2022-11-14 16:57:33.500000","2"
DragonShield:	Other,1,0,Ambitious Farmhand,MID,Innistrad: Midnight Hunt,2,NearMint,Normal,German,0.01,2022-01-29,0.08,0.02,0.14
Deckbox:		1,0,Ambitious Farmhand // Seasoned Cathar,Innistrad: Midnight Hunt,2,Near Mint,German,,,,,,,,$0.00

Basically, we would want to default to Scryfall's syntax (which would mean using the full double-sided name, and omitting the "Token"

mtgcsvhelper's People

Contributors

stepkie avatar

Stargazers

Aitor Balmaseda avatar Eve 🏳️‍⚧️ avatar Arthur Fücher avatar mboy avatar Rubén de Miguel Recio avatar Steven Uy avatar  avatar  avatar Louis Petrik avatar  avatar Adriel Méndez avatar  avatar Gabriel De Souza avatar Grant Hicks avatar npesavento avatar  avatar Raoul-M Couture avatar William.T avatar  avatar  avatar Botza69 avatar Tommy Kearns avatar

Watchers

 avatar

Forkers

digitalnomad29

mtgcsvhelper's Issues

MTG Goldfish Support

Hello! It would be wonderful if you could support the CSV format used by MTG Goldfish. The only way to import Goldfish csv's is with their paid subscription. So if there was a way to translate that format into another site's CSV with a free import plan that would be very useful.

Any chance of adding support for the urzagatherer format?

Is your feature request related to a problem? Please describe.
I want to import my collection from urzagatherer (the web application) into Manabox, but the .csv format from urzagatherer is a bit weird for Manabox. For example, I have 4 Battle-Scarred Goblin and urzagatherer tracks them in there .csv export as follows:

(one Column); (anotherColumn)
Count; Foil Count
4; 1

This means I have 4 cards in total, one is foil and the rest are normal. I think this is maybe the biggest problem in the converting process.

I added a .csv export from urzagatherer with only 9 cards for reference.
MTG.csv

Describe the solution you'd like
Add support for converting urzagatherer .csv to Manabox format.

Describe alternatives you've considered
I searched but didnt find any converter, so if this feature request is turned down I will have to do it by hand.

Tried to convert from MTGGOLDFISH to DRAGONSHIELD and I got an error

Here is the command I ran along with the error I am getting
image

Here is the list I am using. I exported this list from mtggoldfish, I realize that it's a txt file and that might just be the reason that this error is happening, but I don't know how else to get a list from mtg gold fish that isn't a txt file. this tool is amazing and it would save me a lot of headache if I could get it to work :)
FaeDominion.txt

Any chance for adding MTGGoldfish format support?

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.

Web app not loading.

Describe the bug
Web app doesn't load for me anymore. Tried it on Chrome and Edge browsers. I see blank page with "Loading" word in the circle but nothing is happening.

Not sure if its something wrong on my side or with the server. Can't use other commputer to check it atm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.