Giter Club home page Giter Club logo

mtgjson's Introduction

MTGJSON Logo
MTGJSON Version MTGJSON Version Date

MTGJSON is an open-source repository of Magic: The Gathering card data, specifically in JSON and CSV formats. This repository contains the build scripts we use to create our data sets.

How to Contribute

Running a project as large as ours isn't easy, and we rely on the community to help keep our project going. The community can support us through two different ways: financial contributions and code contributions.

Github Sponsors
We accept reoccurring donations via GitHub Sponsors, that grant priority support from MTGJSON maintainers and a special role on our Discord indicating your support. This is the preferred approach for financial contributions, as the MTGJSON team pays no fees for these types of donations!

Patreon
We accept reoccurring donations via Patreon, that grant priority support from MTGJSON maintainers and a special role on our Discord indicating your support.

PayPal
We accept one-time donations via PayPal, for those who want to say thank you to the project.

Code Contributions
We love it when the community contributes back to the project! If you'd like to help improve our data for the hundreds of projects and stores we support, do reach out via Discord!

Connect With Us

Discord
The team stays in contact via Discord. The server is open to the public and is a great place to collaborate with other like-minded people. Stop by today and say hi!

About Us

The Team

The MTGJSON team has been led by Zach Halpern since 2018, with support from an awesome group of people. The full team lineup can be found MTGJSON's homepage.

Our Product

MTGJSON at its core is a database that can be downloaded for offline access to Magic: the Gathering card data. We pride ourselves on our documentation, and aim for full transparency with the community.

Our Partners

Over time, MTGJSON has gone through a number of transitions to bring the best product for our consumers. We'd like to thank the following groups, in alphabetical order, for helping to support our mission by enriching our data:

How to Use

For 99% of our Users

MTGJSON supplies precompiled databases at https://mtgjson.com/api/v5/. This is the recommended way to use our service.

As stated before, we pride ourselves on our documentation which can be found at https://mtgjson.com/. If you find anything to be unclear or ambiguous, please open a ticket on our documentation repository so we can address your concern immediately.

We fully rebuild our API data once a week (on Monday afternoons) and our price dataset once a day. You can poll the Meta.json file to see when our data was last updated.

For those who want to build MTGJSON locally

Most of our users shouldn't have a need to build MTGJSON locally. However, there are always exceptions and we aren't ones to judge.

Build Box

While MTGJSON will work on Windows, Mac, and Linux, we prefer working within the Linux environment for lower overheads and less manual dependency management.

  • For Linux based build boxes (we recommend Ubuntu 20.04), your build box should have at least 2 cores and 4 GiB of RAM available.
  • For Mac based build boxes, your build box should have at least 2 cores and 4 GiB of RAM available.
  • For Windows based build boxes, your build box should have at least 4 cores and 8 GiB of RAM available.

Install Python3

MTGJSON is built on and tested against a wide range of Python3 versions. Currently, we maintain support for the following versions:

  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11
  • Python 3.12

Install MTGJSON

Local Installation

python3 -m pip install /path/to/mtgjson5/

PyPi Repository

We intend to put MTGJSON5 on the pip package archive in the near future, once the first set of revisions takes place.

Using MTGJSON

A fully up-to-date help menu can be achieved via python3 -m mtgjson5 -h, but for your convenience here is a recent rundown:

usage: mtgjson5 [-h] [-s [SET [SET ...]] | -a] [-c] [-x] [-z] [-p]
                [-SS [SET [SET ...]]] [-PB] [-R] [-NA]

optional arguments:
  -h, --help            show this help message and exit
  -s [SET [SET ...]], --sets [SET [SET ...]]
                        Set(s) to build, using Scryfall set code notation.
                        Non-existent sets silently ignored.
  -a, --all-sets        Build all possible sets, overriding the --sets option.
  -c, --full-build      Build new prices, MTGSQLive, and compiled outputs like
                        AllPrintings.
  -x, --resume-build    While determining what sets to build, ignore
                        individual set files found in the output directory.
  -z, --compress        Compress the output folder's contents for
                        distribution.
  -p, --pretty          When dumping JSON files, prettify the contents instead
                        of minifying them.
  -SS [SET [SET ...]], --skip-sets [SET [SET ...]]
                        Purposely exclude sets from the build that may have
                        been set using --sets or --all-sets.

mtgjson maintainer arguments:
  -PB, --price-build    Build updated pricing data then exit.
  -R, --referrals       Create and maintain a referral map for referral
                        linkages.
  -NA, --no-alerts      Prevent push notifications from sending when property
                        keys are defined.

MTGJSON Environment Variables

Due to how the new system is built, a few advanced values can be set by the user in the shell environment.

  • MTGJSON5_DEBUG When set to 1 or true, additional logging will be dumped to the output files
  • MTGJSON5_OUTPUT_PATH When set, MTGJSON will dump all outputs to a specific directory
    • Ex: MTGJSON5_OUTPUT_PATH=~/Desktop will dump database files to /home/USER/Desktop/mtgjson_build_5XXX and log files to /home/USER/Desktop/logs

Licensing

MTGJSON is a freely available product under the MIT License, allowing our users to enjoy Magic: the Gathering data free of charge, in perpetuity.

mtgjson's People

Contributors

aridtag avatar axxroytovu avatar daenyth avatar davidmartos96 avatar dependabot[bot] avatar ebbit1q avatar excention avatar fenhl avatar gitter-badger avatar gwax avatar henry739 avatar hirigaray avatar kellenwhitaker avatar kodawah avatar lionelh avatar mallardduck avatar mickhardins avatar mjainta avatar nikolayxhd avatar psykopear avatar rohitmusti avatar silasary avatar staghouse avatar taw avatar tooomm avatar tpblaster avatar zeldazach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mtgjson's Issues

Reimplement Booster Field

The Booster field from V3 contained how cards could be obtained via packs. We removed it in V4, temporarily, to reevaluate our options and figure out the best way to implement.

This will be our discussion board on this topic.

Cite: #521

Add additional Duels sets

Should add the additional Duels of the Planeswalkers sets (2012/1013/etc) and other 'Duels' digital sets, such as 'Magic Duels: Origins'. Will need to make sure I get the 'booster' property set correctly as it differs significantly from physical MtG.

#53

Archenemy Promotional Schemes Missing

Promotional Archenemy Schemes are missing:

Perhaps you have met my Cohort
Plot that spans Centuries
Your inescapable Doom
Imprision this Insolent Witch
Drench the Soil in their Blood

#476

Provide set list json file.

Version 3 provided two json files that enumerated the sets. SetCodes.json that just had the codes and SetList.json that provides name, release date, and code.
Can this be added back?

Guildgates mis-named

Guildgates from GRN have name: "Selesnya Guildgate (a)" and "Selesnya Guildgate (b)"

Should just be "Selesnya Guildgate" for both

Hymn to Tourach in FEM for reference

    {
      "artist": "Liz Danforth",
      "cmc": 2,
      "colorIdentity": [
        "B"
      ],
      "colors": [
        "Black"
      ],
      "flavor": "\"Tourach's power was such that his followers deified him after his death.\"\n—Sarpadian Empires, vol. II",
      "id": "ce89806de8ad4e95d833b56b1d1f1a1865ef492e",
      "imageName": "hymn to tourach2",
      "layout": "normal",
      "manaCost": "{B}{B}",
      "multiverseid": 1849,
      "name": "Hymn to Tourach",
      "rarity": "Common",
      "text": "Target player discards two cards at random.",
      "type": "Sorcery",
      "types": [
        "Sorcery"
      ],
      "variations": [
        1850,
        1851,
        1852
      ]
    },
    {
      "artist": "Susan Van Camp",
      "cmc": 2,
      "colorIdentity": [
        "B"
      ],
      "colors": [
        "Black"
      ],
      "flavor": "\"The eerie, wailing Hymn caused insanity even in hardened warriors.\"\n—Sarpadian Empires, vol. II",
      "id": "676c26b3147c3e33627c791336b9e0d427c2f16d",
      "imageName": "hymn to tourach1",
      "layout": "normal",
      "manaCost": "{B}{B}",
      "multiverseid": 1850,
      "name": "Hymn to Tourach",
      "rarity": "Common",
      "text": "Target player discards two cards at random.",
      "type": "Sorcery",
      "types": [
        "Sorcery"
      ],
      "variations": [
        1851,
        1849,
        1852
      ]
    },
    {
      "artist": "Quinton Hoover",
      "cmc": 2,
      "colorIdentity": [
        "B"
      ],
      "colors": [
        "Black"
      ],
      "flavor": "Knowing the Hymn's power, the followers of Leitbur carefully guarded their pillaged transcriptions.",
      "id": "4c90d505879496c2b3defb5efd507d752e548eec",
      "imageName": "hymn to tourach3",
      "layout": "normal",
      "manaCost": "{B}{B}",
      "multiverseid": 1851,
      "name": "Hymn to Tourach",
      "rarity": "Common",
      "text": "Target player discards two cards at random.",
      "type": "Sorcery",
      "types": [
        "Sorcery"
      ],
      "variations": [
        1850,
        1849,
        1852
      ]
    },
    {
      "artist": "Scott Kirschner",
      "cmc": 2,
      "colorIdentity": [
        "B"
      ],
      "colors": [
        "Black"
      ],
      "flavor": "Members of the Order often played the Hymn on instruments made from their victims' bones.",
      "id": "1baf1631900049c39c77bc5e8bd78391f2839942",
      "imageName": "hymn to tourach4",
      "layout": "normal",
      "manaCost": "{B}{B}",
      "multiverseid": 1852,
      "name": "Hymn to Tourach",
      "rarity": "Common",
      "text": "Target player discards two cards at random.",
      "type": "Sorcery",
      "types": [
        "Sorcery"
      ],
      "variations": [
        1850,
        1851,
        1849
      ]
    },

Split cards with the same watermark

Split cards that have the same watermark on both halves would only have it listed for one of the halves (the first one, it seems).

Example (Connive // Concoct):

{
            "artist": "Dan Scott",
            "borderColor": "black",
            "colorIdentity": [
                "B",
                "U"
            ],
            "convertedManaCost": 9.0,
            "foreignData": [],
            "frameVersion": "2015",
            "hasFoil": true,
            "hasNonFoil": true,
            "layout": "split",
            "legalities": {
                "1v1": "Legal",
                "brawl": "Legal",
                "commander": "Legal",
                "duel": "Legal",
                "frontier": "Legal",
                "future": "Legal",
                "legacy": "Legal",
                "modern": "Legal",
                "standard": "Legal",
                "vintage": "Legal"
            },
            "manaCost": "{3}{U}{B}",
            "multiverseId": 452972,
            "name": "Concoct",
            "names": [
                "Connive",
                "Concoct"
            ],
            "number": "222",
            "originalText": "Gain control of target creature with power 2 or less.",
            "originalType": "Sorcery",
            "printings": [
                "GRN",
                "PGRN"
            ],
            "rarity": "rare",
            "rulings": [
                {
                    "date": "2018-10-05",
                    "text": "Connive’s effect lasts indefinitely. It doesn’t wear off during the cleanup step, and it doesn’t expire if the creature’s power becomes greater after Connive has resolved."
                },
                {
                    "date": "2018-10-05",
                    "text": "The creature card you return with Concoct may be one that you just surveilled into your graveyard."
                },
                {
                    "date": "2018-10-05",
                    "text": "No player may take actions between the time you surveil and the time you return a creature card to the battlefield."
                },
                {
                    "date": "2018-10-05",
                    "text": "When you surveil, you may put all the cards you look at back on top of your library, you may put all of those cards into your graveyard, or you may put some of those cards on top and the rest of them into your graveyard."
                },
                {
                    "date": "2018-10-05",
                    "text": "You perform the actions stated on a card in sequence. For some spells and abilities, you’ll surveil last. For others, you’ll surveil and then perform other actions."
                }
            ],
            "subtypes": [],
            "supertypes": [],
            "text": "Surveil 3, then return a creature card from your graveyard to the battlefield.",
            "type": "Sorcery",
            "types": [
                "Sorcery"
            ],
            "uuid": "890ac54c-6fd7-4e46-8ce4-8926c6975f60"
        },
        {
            "artist": "Dan Scott",
            "borderColor": "black",
            "colorIdentity": [
                "B",
                "U"
            ],
            "convertedManaCost": 9.0,
            "foreignData": [],
            "frameVersion": "2015",
            "hasFoil": true,
            "hasNonFoil": true,
            "layout": "split",
            "legalities": {
                "1v1": "Legal",
                "brawl": "Legal",
                "commander": "Legal",
                "duel": "Legal",
                "frontier": "Legal",
                "future": "Legal",
                "legacy": "Legal",
                "modern": "Legal",
                "standard": "Legal",
                "vintage": "Legal"
            },
            "manaCost": "{2}{U/B}{U/B}",
            "multiverseId": 452972,
            "name": "Connive",
            "names": [
                "Connive",
                "Concoct"
            ],
            "number": "222",
            "originalText": "Gain control of target creature with power 2 or less.",
            "originalType": "Sorcery",
            "printings": [
                "GRN",
                "PGRN"
            ],
            "rarity": "rare",
            "rulings": [
                {
                    "date": "2018-10-05",
                    "text": "Connive’s effect lasts indefinitely. It doesn’t wear off during the cleanup step, and it doesn’t expire if the creature’s power becomes greater after Connive has resolved."
                },
                {
                    "date": "2018-10-05",
                    "text": "The creature card you return with Concoct may be one that you just surveilled into your graveyard."
                },
                {
                    "date": "2018-10-05",
                    "text": "No player may take actions between the time you surveil and the time you return a creature card to the battlefield."
                },
                {
                    "date": "2018-10-05",
                    "text": "When you surveil, you may put all the cards you look at back on top of your library, you may put all of those cards into your graveyard, or you may put some of those cards on top and the rest of them into your graveyard."
                },
                {
                    "date": "2018-10-05",
                    "text": "You perform the actions stated on a card in sequence. For some spells and abilities, you’ll surveil last. For others, you’ll surveil and then perform other actions."
                }
            ],
            "subtypes": [],
            "supertypes": [],
            "text": "Gain control of target creature with power 2 or less.",
            "type": "Sorcery",
            "types": [
                "Sorcery"
            ],
            "uuid": "890ac54c-6fd7-4e46-8ce4-8926c6975f60",
            "watermark": "dimir"
        }

Support for Scryfall

The awesome people at Scryfall have given us an unlimited API key to gather data from them for validation purposes and specialty sets that Gatherer doesn't contain.

I'd like our focus to be on 100% gatherer parsing for the moment, but this is a great next step once that's done. This will be a replacement for MCI as they have been unresponsive to requests.

Include TCGPlayer API ProductID in card info

Integrate the TCGPlayer API to have TCGProductID as a field on each card.
Category ID is always 1 for Magic
Each MTG set would have a group in category 1. For example Battlebond is group 2245
Each card then has a productid. For example Spire Garden is id 166659
Card data also contains an image link (https://6d4be195623157e28848-7697ece4918e0a73861de0eb37d08968.ssl.cf1.rackcdn.com/166659_200w.jpg
Inclusion of this data would allow developers using MTGJson to get TCG prices and link more easily.

Adding Concurrency

By adding concurrency (multiprocessing) to the build sequence, we can increase the speed of the builds. The goal is <2 hours for an all build.

My initial thought is to make each set run on a thread in a pool, but suggestions are greatly appreciated!

uuid duplicate found (split cards)

E.g.:

  • ae155ee2-008f-4dc6-82bf-476be7baa224 (Archangel Avacyn and Avacyn, the Purifier)
  • 1001e708-e4f9-456a-8b9d-3421a2a3833d (Avacynian Missionaries and Lunarch Inquisitors)

Include number of cards in set

What kind of information do we want? Do we want how many cards are in the "base" set? The "total" set (w/ welcome decks n such)? I'd like a discussion for this before we look into impl.

Cite: #551

Class structure discussions

Currently, the system has one class in the mtg_builder file: MTGJSON.

There seems to be no benefit to this class, making it confusing to others who look as it's the only class in the project. The goal here is to either remove the class framework and make every module it's own thing, or classify every module. I'm honestly fine with either choice, but we should come to an agreement. Comments here would be appreciated

Legality changes due to bans or set rotations

When sets rotate out of a format or when ban's come through, there does not appear to be a way to pull the new legalities for the cards without building an entirely new file for that set.

Would there be a way to create a file of just card legalities or legality changes?

Split card's second half has `originalText` of the first

second half of a split card has original text of the first half (text is correct). Unless this was intentional, originalText should have the printed text of the second half.

Example (Concoct of Connive // Concoct):

{
            "artist": "Dan Scott",
            "borderColor": "black",
            "colorIdentity": [
                "B",
                "U"
            ],
            "convertedManaCost": 9.0,
            "foreignData": [],
            "frameVersion": "2015",
            "hasFoil": true,
            "hasNonFoil": true,
            "layout": "split",
            "legalities": {
                "1v1": "Legal",
                "brawl": "Legal",
                "commander": "Legal",
                "duel": "Legal",
                "frontier": "Legal",
                "future": "Legal",
                "legacy": "Legal",
                "modern": "Legal",
                "standard": "Legal",
                "vintage": "Legal"
            },
            "manaCost": "{3}{U}{B}",
            "multiverseId": 452972,
            "name": "Concoct",
            "names": [
                "Connive",
                "Concoct"
            ],
            "number": "222",
            "originalText": "Gain control of target creature with power 2 or less.",
            "originalType": "Sorcery",
            "printings": [
                "GRN",
                "PGRN"
            ],
            "rarity": "rare",
            "rulings": [
                {
                    "date": "2018-10-05",
                    "text": "Connive’s effect lasts indefinitely. It doesn’t wear off during the cleanup step, and it doesn’t expire if the creature’s power becomes greater after Connive has resolved."
                },
                {
                    "date": "2018-10-05",
                    "text": "The creature card you return with Concoct may be one that you just surveilled into your graveyard."
                },
                {
                    "date": "2018-10-05",
                    "text": "No player may take actions between the time you surveil and the time you return a creature card to the battlefield."
                },
                {
                    "date": "2018-10-05",
                    "text": "When you surveil, you may put all the cards you look at back on top of your library, you may put all of those cards into your graveyard, or you may put some of those cards on top and the rest of them into your graveyard."
                },
                {
                    "date": "2018-10-05",
                    "text": "You perform the actions stated on a card in sequence. For some spells and abilities, you’ll surveil last. For others, you’ll surveil and then perform other actions."
                }
            ],
            "subtypes": [],
            "supertypes": [],
            "text": "Surveil 3, then return a creature card from your graveyard to the battlefield.",
            "type": "Sorcery",
            "types": [
                "Sorcery"
            ],
            "uuid": "890ac54c-6fd7-4e46-8ce4-8926c6975f60"
        }

AllCards/AllSets for more formats

Continuation of #178

Currently, we will build all sets in existence into these two files. Should we look into a limiting factor, or have different downloads? Technically, they're all real magic cards, so I'd like to keep them bundled. They have an annotation that they're not legal (silver boarder) and most people can infer that information.

Discussions welcome!

Split cards do not have colors

Split cards do not have colors array. They do, however, contain colorIdentity array.

Expected: colors array that includes all colors in the mana cost of the appropriate half and colorIdentity array that includes all colors in cost and text of both halves.

Set Config Standardization

The formatting of the set_configs isn't consistent, and I'd like to change that. We should specify what field(s) are required/optional in a schema/documentation.

My initial thought is

  • set name
  • set code
  • release date
  • border
  • type
  • booster pack contents (TODO: Needs to be reworked)
  • languages available in
  • scryfall key (if necessary)

but I'm open to suggestions

I know @ancestral started on this a while ago, but I never heard back

Include additional frame information

It would be nice to have information about nonstandard frames including:
various masterpiece frames
Ixalan DFC backside frame
textless promos
full art promos
full art lands
(possibly Nyx, miracle, and other such minor frame features)
the new legendary frame (this can be extrapolated from the current frame field combined with the supertypes.)

#454

Include a field for misc icons

Some cards have icons on them that denote something that's usually set-specific.

  • Double-faced card front/back icons
  • Future sight type icons
  • Odyssey block "interacts with the graveyard" icon.

#228

Create version.json for MTGJSONv4

Please create and maintain a version.json file for MTGJSONv4. It will allow for applications to programmatically determine the version on the server. Thanks in advance.

Add Legendary Cube

I noticed another missing set: the prize boosters for Legendary Cube, while entirely consisting of reprints, have their own set code (PZ1) and set symbol.

#433

Add Dataclasses

With the release of Python 3.7, dataclasses have been added to the language.

Would be useful for some of the elements we manage, like how we're building a card from the ground up. I have no problem advancing this project to 3.7-Minimum, if we can incorporate this into the project.

Cards with Split Layout don't pull full info for each section of the card

Describe the bug
Split cards most recently from the GRN block are not pulling the full data for each section of the card. For example, the card Invert // Invent is shown as Invert as the base name with both names in the Names entry. It seems both sides split they text and type across Text / OriginalText and Type / OriginalType.

The issue appears to be in terms of the ManaCost field, it shows the mana cost for the main named card side but does not show the ManaCost for the other side of the card.

{
            "artist": "Mathias Kollros",
            "borderColor": "black",
            "colorIdentity": [
                "R",
                "U"
            ],
            "convertedManaCost": 7.0,
            "foreignData": [],
            "frameVersion": "2015",
            "hasFoil": true,
            "hasNonFoil": true,
            "layout": "split",
            "legalities": {
                "future": "Legal"
            },
            "manaCost": "{4}{U}{R}",
            "multiverseId": 452978,
            "name": "Invent",
            "names": [
                "Invert",
                "Invent"
            ],
            "number": "228",
            "originalText": "Switch the power and toughness of each of up to two target creatures.",
            "originalType": "Instant",
            "printings": [
                "GRN"
            ],
            "rarity": "uncommon",
            "rulings": [
                {
                    "date": "2018-09-12",
                    "text": "Invert has received 0-day errata to clarify that the effect lasts only until end of turn. For more information see https://twitter.com/EliShffrn/status/1040006137616072704"
                },
                {
                    "date": "2018-10-05",
                    "text": "If you chose two targets, Invert switches the power and toughness of one creature and it switches the power and toughness of another creature. It doesn’t switch one creature’s power with another creature’s power."
                },
                {
                    "date": "2018-10-05",
                    "text": "Effects that switch a creature’s power and toughness apply after all other effects, regardless of when those effects began to apply. For instance, if you cast Invert targeting a 1/2 creature then give it +2/+0 later in the turn, it’s a 2/3 creature, not a 4/1 creature."
                },
                {
                    "date": "2018-10-05",
                    "text": "While resolving Invent, you could put no cards, an instant card, a sorcery card, or an instant card and a sorcery card into your hand."
                }
            ],
            "subtypes": [],
            "supertypes": [],
            "text": "Search your library for an instant card and/or a sorcery card, reveal them, put them into your hand, then shuffle your library.",
            "type": "Instant",
            "types": [
                "Instant"
            ],
            "uuid": "054a4e4f-8baa-41cf-b24c-d068e8b9a070"
        }

Fix Async Commands

With our use of aiohttp and asyncio, the code base gets very confusing very quickly. We should look into simplifying how things operate to make it easier to test, make more sense to the developers who don't work with this stuff often, and better comments to explain what's happening with the async commands.

set type

The proper set type for Battlebonds is missing. two-headed_giant?

Reading the initial issues it should be in the file already (can't check currently):
#581 & #587
If that's the case as described in the issue:

  • set types should be uniform in case and don't use spaces
  • why did it change to upper case? is there a pattern in the file when to use lower and when to use upper case?
  • documentation needs updates

Edit: is this implemented as draft_innovation?
And everything is lower case again? Documentation and AllSets file should be fine then.

Running MTGJSONv4 on Windows

Using Python 3.7, I did the following:

  1. Extracted the contents of mtgjson-master.zip to directory "C:\Users\a046369\Desktop\mtgjson4-master"
  2. Executed "pip3 install -r requirements.txt". Several messages about files being downloaded and installed
  3. From the directory "C:\Users\a046369\Desktop\mtgjson4-master" I typed:
    "C:\Users\a046369\AppData\Local\Programs\Python\Python37-32\python.exe" -m mtgjson
  4. I got the error in the attachment

I didn't see a python3.exe file as the original documentation stated.

pyerror

Caching System

I added a rudimentary caching system to cache the set URLs and the checklists. We should look into what else should be cached in order to speed up future re-runs.

I would like to only cache things we know are constants, or find a way to save hashes and compare it to online pages before we go through the entire process of building.

Rulings are sometimes in wrong order

Scryfall's ordering of rulings is incorrect and makes little sense. For example, Humility should have a ruling from 2006-02-01, one from 2007-02-01, and then two from 2009-10-01. Scryfall's has the date sorting reversed but seemingly keeps rulings from the same date in the correct order.

Missing ForeignData fields

Some cards (mostly, from what I can tell, the back faces of transform cards) have missing or malformed ForeignData blocks.

Cards that I believe have problems:

set(['Sage of Ancient Lore', 'Two-Headed Dragon', 'Conduit of Storms', 'Elvish Champion', 'Lambholt Pacifist', 'Heir of Falkenrath', 'Metzali, Tower of Triumph', 'Reckless Waif', 'Ghastly Haunting', 'Nicol Bolas, the Arisen', 'Chandra, Roaring Flame', 'Werewolf of Ancient Hunger', 'Extricator of Flesh', 'Town Gossipmonger', 'Daybreak Ranger', 'Liliana, Heretical Healer', 'Wayward Disciple', 'Ulvenwald Abomination', "Ludevic's Test Subject", 'Arlinn Kord', 'Persistent Nightmare', 'Lambholt Elder', 'Neck Breaker', 'Pious Evangel', 'Grizzled Angler', 'Oran-Rief, the Vastwood', 'Goblin Chieftain', 'Geier Reach Bandit', 'Nissa, Sage Animist', "Azor's Gateway", 'Primal Wellspring', 'Sakura-Tribe Elder', 'Kruin Outlaw', 'Smoldering Werewolf', 'Thraben Sentry', 'Nezumi Graverobber', 'Bane of Hanweir', 'Winged Temple of Orazca', 'Ulvenwald Captive', 'Grizzled Outcasts', 'Westvale Cult Leader', 'Delver of Secrets', 'Kuldotha Phoenix', 'Branded Howler', 'Itlimoc, Cradle of the Sun', "Chandra's Outrage", "Tovolar's Magehunter", 'Cunning Sparkmage', 'Garruk, the Veil-Cursed', 'Search for Azcanta', 'Slith Firewalker', 'Cryptolith Fragment', 'Hanweir Watchkeep', 'Stalking Vampire', 'Solitary Hunter', 'Docent of Perfection', 'Chandra, Fire of Kaladesh', 'Chalice of Life', 'Voracious Reader', "Conqueror's Foothold", 'Westvale Abbey', 'Duskwatch Recruiter', 'Lambholt Butcher', 'Treasure Cove', 'Heir to the Night', 'Ulvenwald Mystics', 'Flameheart Werewolf', 'Merciless Predator', 'Ravager of the Fells', 'Daring Sleuth', "Hadana's Climb", 'Garruk Relentless', 'Ulvenwald Primordials', 'Insectile Aberration', 'Avacynian Missionaries', 'Azcanta, the Sunken Ruin', 'Dowsing Dagger', 'Elusive Tormentor', "Conqueror's Galleon", 'Tomb of the Dusk Rose', 'Convicted Killer', 'Dronepack Kindred', 'Kindly Stranger', "Legion's Landing", 'Ruthless Cullblade', 'Awoken Horror', 'Nighteyes the Desecrator', "Jace, Vryn's Prodigy", 'Erupting Dreadwolf', 'Vault of Catlacan', 'Glorious Anthem', 'Infectious Curse', 'Silverpelt Werewolf', 'Fibrous Entangler', 'Ulrich of the Krallenhorde', 'Gatstaf Howler', 'Ravenous Demon', 'Ancient of the Equinox', 'Thing in the Ice', 'Lord of Lineage', 'Nightfall Predator', 'Incited Rabble', "Chandra's Spitfire", 'Jace, Telepath Unbound', 'Civilized Scholar', 'It That Rides as One', 'Hinterland Hermit', 'Lost Vale', 'Shivan Dragon', 'Mayor of Avabruck', 'Lone Rider', 'Loam Lion', 'Stonewing Antagonizer', 'Gatstaf Arsonists', 'Kessig Forgemaster', 'Final Iteration', 'Huntmaster of the Fells', 'Bearer of Overwhelming Truths', 'Gideon, Battle-Forged', 'Scorned Villager', 'Treasure Map', 'Instigator Gang', 'Growing Rites of Itlimoc', 'Gatstaf Ravagers', 'Pestilence Demon', 'Thaumatic Compass', 'Homicidal Brute', 'Neglected Heirloom', 'Shrill Howler', 'Aurora of Emrakul', "Ludevic's Abomination", 'Path of Mettle', 'Tangleclaw Werewolf', 'Moonscarred Werewolf', 'Serra Angel', u'Supply // Demand', 'Sanctum of the Sun', 'Thraben Gargoyle', 'Whirling Dervish', 'Loyal Cathar', 'Darksteel Juggernaut', 'Ulrich, Uncontested Alpha', 'Howlpack Alpha', 'Arlinn, Embraced by the Moon', 'Archdemon of Greed', 'Krallenhorde Wantons', 'Harvest Hand', 'Vildin-Pack Outcast', 'Grisly Anglerfish', 'Mad Auntie', 'Soul Seizer', 'Lone Wolf of the Natterknolls', 'Vildin-Pack Alpha', 'Howling Chorus', 'Phantasmal Dragon', 'Bloodline Keeper', 'Village Ironsmith', 'Unimpeded Trespasser', 'Sinuous Predator', 'Rampaging Werewolf', 'Profane Procession', 'Startled Awake', 'Storm the Vault', 'Thraben Militia', 'Autumnal Gloom', 'Giant Growth', 'Screeching Bat', 'Cloistered Youth', 'Nissa, Vastwood Seer', 'Adanto, the First Fort', 'Hermit of the Natterknolls', 'Temple of Aclazotz', 'Lunarch Inquisitors', 'Uninvited Geist', 'Royal Assassin', 'Hinterland Scourge', 'Sandbar Crocodile', 'One of the Pack', 'Soltari Priest', 'Werewolf Ransacker', 'Tormented Pariah', 'Skin Invasion', 'Skin Shedder', 'Liliana, Defiant Necromancer', 'Timber Shredder', 'Gatstaf Shepherd', 'Afflicted Deserter', 'Accursed Witch', 'Volcanic Hammer', 'Kessig Prowler', 'Withengar Unbound', 'Curious Homunculus', 'Shard Phoenix', 'Hanweir Militia Captain', 'Krallenhorde Killer', 'Gold-Forge Garrison', "Arguel's Blood Fast", 'Archangel Avacyn', 'Ormendahl, Profane Prince', 'Terror of Kruin Pass', 'Ashmouth Blade', 'Perfected Form', "Markov's Servant", 'Chalice of Death', 'Elesh Norn, Grand Cenobite', 'Krallenhorde Howler', 'Autumn-Tail, Kitsune Sage', 'Aberrant Researcher', 'Mondronen Shaman', 'Unhallowed Cathar', 'Ironfang', 'Atzal, Cave of Eternity', 'Village Messenger', 'Golden Guardian', 'Conduit of Emrakul', 'Wolfbitten Captive', 'Extricator of Sin', 'Spitfire Bastion', 'Chosen of Markov', 'Insidious Mist', 'Nicol Bolas, the Ravager', 'Moonrise Intruder', 'Kitsune Mystic', 'Primal Amulet', 'Spires of Orazca', 'Unholy Fiend', 'Stream of Life', 'Shrieking Drake', "Vance's Blasting Cannons", 'Journey to Eternity', 'Breakneck Rider', 'Scrounged Scythe', 'Avacyn, the Purifier', 'Zhalfirin Knight', 'Kytheon, Hero of Akros', 'Elbrus, the Binding Blade', 'Abolisher of Bloodlines', 'Voldaren Pariah', 'Hinterland Logger', 'Demon-Possessed Witch', 'Wildblood Pack', 'Howlpack of Estwald', 'Villagers of Estwald'])

Add 'deck' or 'subset' field

This can be used to identify which cards are part of which decks (such as 'elf' deck in the 'elves vs goblins' set). The existing 'source' field is used a bit like this for some promos sets like CPK, but it's not quite the same thing, but it probably would work just fine for this.

#51

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.