Thanks to visit codestin.com
Credit goes to github.com

Skip to content

omfgitsmark/mtgjson

 
 

Repository files navigation

Changelog Current Release Date

PayPal

Patreon

MTGJSON is an open sourced database creation and distribution tool for Magic: The Gathering cards, specifically in JSON format.  

Connect With Us

Discord Discord

Gitter Gitter


About Us

This repo contains our newest release, version 4.x. This version relies upon a variety of sources, such as Scryfall and Gatherer for our data.

You can find our documentation with all properties here.

To provide feedback 💁 and/or bug reports 🐛, please open a ticket 🎫 as it is the best way for us to communicate with the public.

If you would like to join or assist the development of the project, you can join us on Discord to discuss things further.

Looking for a full digest of pre-built data? Click here.

 


Dependencies

  • Python 3.7
  • pip3
    • Installed with Python 3.7. For troubleshooting check here.

 


Installation

Install the MTGJSON4 package and dependencies via:

pip3 install -r requirements.txt

 


Output Flags

Flags Flag Descriptions
-h, --help Print the help menu and exits.
-a Build all sets. This overshadows the -s flag.
-c After building any/all sets, create the compiled outputs (ex: AllSets, AllCards).
-x Skips sets that have already been built (i.e. set files in the output folder), and build the remaining sets. Must be passed with -a or -s.
-z Compress the outputs directory contents
-s SET [SET ...] Build set code arguments, provided they exist.
--skip-keys If you don't have all required API keys (TCGPlayer & MKM), you can disable the building of these components.
--skip-sets SET [SET ...] Prevents set code arguments from being built, even if passed in via -a or -s.
--skip-cache Disables the reading and writing of cached content

  Newcomer Note: Omitting either the -a and -s flag will yield empty outputted data.  

 


Running

Run the program, with any flag(s) you'd like, via:

python3 -m mtgjson4 [-h] [-a] [-c] [-x] [-z] [-s [SET [SET ...]]] [--skip-keys]
                    [--skip-sets [SET [SET ...]]] [--skip-cache]

Example:

$ python3 -m mtgjson4 -acz

> all outputted json files, then compress them

Notes

  These are the build directions to compile your own JSON files but If you are looking for pre-compiled JSON files, you can download them at MTGJSON.com.  

About

MTGJSONv4 build scripts for Magic: the Gathering

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%