Giter Club home page Giter Club logo

mtgjson's Introduction

Changelog

Intro

This is the code used to generate the JSON for mtgjson.com

I didn't plan on open-sourcing this, so there are rough edges. See 'Other' section below.

Requirements

  • Linux or MacOS (never tested under Windows)
  • Node.js v0.10.0 or later. It will NOT work with 0.9.9 or earlier.

Setup

npm install
# See 'Other' below

Usage

cd build
node buildSet.js <expansion code>

This creates the file:

json/<expansion code>.json

You will need to run this twice for any 'new' sets. First pass doesn't include foreign langauges.

Troubleshooting

If something doesn't work after doing a git pull update, make sure you also update NPM modules with

npm update

Including a new set

If you're building mtgjson data on your own, you should follow the following steps to be able to grab the new set data:

  • make sure the new set is already available on gatherer
  • add a file describing the set in shared/set_configs or an appropriate subdirectory
  • node build/buildSet NEWSETCODE
  • check your json files to see if everything is in order
  • node util/updatePrintingsFromSet NEWSETCODE -- This will update the printings on the previous sets, using the data from the new set.
  • node util/updateRulingsFromSet NEWSETCODE -- Same as above, but for rulings.
  • node util/updateLegalitiesFromSet NEWSETCODE -- Same as above, but for legalities.

Other

All gatherer page requests are cached to the cache directory and any future requests will use the cached version instead.

The 'verify' directory is a little private local webpage I use to verify that my JSON is correct by comparing it side by side with card images.

The 'web' directory is used to generate the mtgjson.com website.

Note that both verify and web have some symbolic links to files that only exist on my local dev workstation. Sorry.

mtgjson's People

Contributors

lsmoura avatar sembiance avatar zeldazach avatar dev-id avatar gwax avatar fenhl avatar tooomm avatar mjwybrow avatar jceddy avatar evie404 avatar florentdouine avatar ancestral avatar bakert avatar bra1n avatar mdurao avatar kavu avatar leematos avatar danielheath avatar naokiy avatar ynerant avatar starryknight64 avatar petebeegle avatar palladinium avatar pfirpfel avatar maxspencer avatar teh-maxh avatar kmontag42 avatar kitroed avatar silasary avatar garbee avatar

Watchers

 avatar

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.