Git Product home page Git Product logo

mtgjson-website'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-website's People

Contributors

ancestral avatar carbohydrate avatar dependabot[bot] avatar ericwlange avatar investigamer avatar jaydi85 avatar jroed avatar katerberg avatar krijoh92 avatar lint-ai avatar lucaspicoli avatar paulhicks91 avatar philwun avatar staghouse avatar tooomm avatar zeldazach avatar zqft9001 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

Watchers

 avatar  avatar  avatar  avatar  avatar

mtgjson-website's Issues

Landcycle does not parse multiple variables in schemas

Landcycle does not update multiple variables in a schema. It will only parse and replace the last identified variables and either semi-parse or ignore the others.

Likely something to do with async/await. May require a full Promise-based function and the use of Promise.all.

This issue is a future bug that could rear it's face.

Link on about us page

Love what you do. I use it on my magic league tracking app. draftalot.com

Wondering how I could get a link on your about us page.

use common date format

On the start page there is a date given for the latest update/version.
It sais 2019 January 30 which is a very unusual way of writing a date I think?

Use the international shortform 2019-01-30 or 30th January 2019 (UK) / January 30, 2019 (US) instead?

Missing fields documentation

Version: 4.1.2 (2018-11-30)

Current documentation is missing following info:

  • card: missing starter and side fields;
  • card -> legalities: missing penny, pauper and future fields;
  • set: missing isFoilOnly field.

Comments after recent changes (#27)

Thanks for taking care of these updates, I think the page looks better now and has more complete information. ๐Ÿ‘

Although - after #27 - I've some comments and questions:

  • Why don't we use the correct discord logo in the button, but a gamepad instead?
  • In the File Manifest, the SET.json phrase could link to the sets page maybe?
  • I would like to have something like a sub-menu at the top of the documentation with an overview of what is contained (Card, Token, Set, Keywords...). One could then click "Token" and jump to this part of the documentation directly.
  • The available file extensions are named in the changelog, but they will get burried there and nobody will search for it there.
    Can we have this info in the documentation as well?
    Or a separate download menu point? The file manifest could go to that page too for example.
  • version.json is named in the manifest, but not properly documented as all the other files. Docs should be comprehensive, even for the trivial cases :)

change menu on the right

I don't really like the weird menu box on the right. :)
It misaligns the design and provides no big benefit.
Instead, there could be simple icons on the upper menu bar for discord and github links.

The pelican sidebar looks to be disigned for a wiki style page with a lot of links on the right...
https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3#screenshot

It can easily be disabled:
https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3#sidebar-options

The icons in the menu header could come from https://simpleicons.org/ (CC0).
Then, all content is central and looks less misplaced, it should play better in terms of responsive design as well.


Now:
jsonnow

Proposal:
jsonidea

Question: Thoughts on adding Sass

The code would be cleaner to maintain and the infra shouldn't be too difficult to put in place as there's a python library already.

Instead of running pelican directly via CLI maybe it would be wrapped around a bash in addition to the Sass compiler?

Force overflow auto/scroll for schemas in Mobile view

When viewing a mobile render of a data schema, like AllCards, when a right column value breaks the column of the pseudo-table it does not force it's parent to cause a scroll effect. Instead, the text breaks the table and causes a page level horizontal scroll.

Image

Missing several sets

Not sure if this'd be better as a GitHub issue, but I just downloaded all the separate set zips, and the zips for sets F18, L16, and L17 give me a 404 error. From Didero

Add single zip with separate set JSON files

V3 had a single zip-file that contained a JSON file for each set, it would be very useful for me if v4 got that too, if it's not too much trouble.
I know there's the Sets page, where I could download all the sets separately, but that's more cumbersome and I fear also a bit more error-prone. And it may cost you more bandwidth too.
Thanks!

Language Strings Differ from Documentation

MTGJSON Version: 4.2.2

Description of Bug:

The documentation states the range of values for language in foreignData as including:
"Portuguese", "Simplified Chinese", and "Traditional Chinese"

The values in AllSets.json are actually:
"Portuguese (Brazil)", "Chinese Simplified", and "Chinese Traditional"

V3 -> V4 Changelog

Individual Sets

Added:

  • meta (Better understanding of when data was created)
  • mtgoCode (Determine MTGO set name)
  • tokens (Tokens have made it in!)
  • foilOnly (If a set is available only in foil, like sliver premium deck)

Removed:

  • gathererCode (No longer necessary)
  • magicCardsInfoCode (No longer in service)
  • border (Moved to individual cards)
  • booster (Will be re-added in v4.1)

Individual Cards:

Added:

  • frameVersion (Determine the frame type)
  • hasFoil (Card available in foil)
  • hasNonFoil (Card available in non-foil)
  • isOnlineOnly (Card only available online)
  • isOversized (Card is HUGEEE)
  • foreignData (All foreign printings from the set and data relating)

Removed:

  • source (Hard to validate)
  • mciNumber (No longer in service)
  • life (Will re-add whenever Vanguard support is re-implemented)
  • hand (Will re-add whenever Vanguard support is re-implemented)
  • imageName (No longer a thing)
  • variations (Each printing will have it's own entry)

Changed:

  • cmc is now convertedManaCost
  • convertedManaCost is a float over an int
  • multiverseid is now multiverseId (with capital I)
  • flavor is now flavorText
  • border is now borderColor
  • id is now uuid
  • legalities formatting has changed
  • loyalty is now a string

Missing field values in documentation

There are some fields missing from the documentation.

Rarity is missing

timeshifted rare
timeshifted uncommon
timeshifted common

Set type is missing

treasure_chest

Override keyrune.css generic icon

keyrune.css is used to apply icons to sets and uses a generic icon for sets that has no icon/or accurate icon. Find a way to override this.

Doc informations

cards: Should change next release: starter -> isStarter
sets: Missing tcgplayerGroupId, isFoilOnly
tokens: Missing isOnlineOnly

who we serve - image issues

  • DideRobot uses a github logo
    Should be removed and listed down with the other "no logo" services

  • MagicFetchBot has no logo
    Should be listed down with the other "no logo" services

A hint below the trable that the list is "Sorted alphabetically with all icons first" would be nice, too.

Better documentation for AllCards

Been implementing the whole card document inside my software and was setting up the rarity field. However, I realized that it stayed default for every card. That's when I noticed that, in both my .json and the online .json, the field is simply missing. Is that a bug, on purpose or I'm just crazy? I'd like to have rarities to add it as a filter parameter.

Incorrect set documentation for field type

MTGJSON Version: 4.2

Description of Bug:

I used the documentation to create my own C# client. I created an enum type for SetType since the documentation stated that it could only be one of few values. Now I try to parse all the sets and I got a parse error:

Error converting value "treasure_chest" to type 'MtgJson.Models.SetType'. Path 'type', line 11138, position 28.

I was working with PZ2.json.

The documentation did not specify this set type.

sets page: show names in bold

For simple highlighting reasons the most important information on that page, the name of each set, should be bold.

MTGJSON logo usage

Replace the MTGJSON in the top left with the MTGJSON logo, and on the landing page remove the "About MTGJSON" header and the logo. Will free up more space on the homepage.

set page: improve with filter/search etc.

I think it would be more helpful if the set order at https://mtgjson.com/v4/sets.html would be reversed and shows the newest sets on top instead oldest. #12

Random thought:
Having order buttons, a filter/search (e.g. for set properties) or a timeline and group the sets by year etc. are several other ideas to improve the presentation and make it easier to access the information on that page.

documentation difficult to read

Having a proper table, differentiate the lines with alternating colors or some other way of improved display would help with reading that page a lot.

documentation: version.json missing

In the documentation there is info about the keywords and set list file, but not the version file.

CC: @ancestral

BTW, where do I find the setlist.json and keywords.json file added in 4.1 on the webpage?

CSS clips text in code

For the fixed-width code in the structure pages, letters with descenders (g, y, p, etc.) are clipped

Either reducing the first padding number for the rule .content code to something like .125, or setting the line-height to 1.4 would solve it.

Create Downloads page

Reasoning:

  1. Increase SEO value
  2. Unify locations of downloads between /sets and /docs

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.