Skip to main content

CLI, new way to help keep an up-to-date MTGDC banlist

Project description

DUEL COMMANDER BANLIST

A new service to help developpers to keep an up-to-date MTGDC data.

THE SOLUTION TO KEEP THE PROJECT UPDATED

  • Each banlist is stored as JSON file of condensed data from official source (in mtgdc_banlist/banlists folder)
  • Static files generated by running a script (python mtgdc_banlist) which uses banlists files to create the main part of the document, and adds html header/footer from static files (static/banlist_html_header.html and static/banlist_html_footer.html)

BANLIST FILE FORMAT

File name must be %Y-%m-%d.json format with the following template:

[
    {
        "date": "2015-01-31",
        "special": "",
        "newly_banned_as_commander": [],
        "newly_unbanned_as_commander": [],
        "newly_banned_in_deck": [],
        "newly_unbanned_in_deck": [],
        "explanations": {}
    }
]

HOW TO ADD NEW BANLIST

  1. Put banlist file %Y-%m-%d.json file into ./banlists
  2. Re-run python python mtgdc_banlist with options --compile-html, --compile-json or --compile-both

Works similar to edit/delete a banlist.

REQUIREMENTS

  • Python (v3.10+)

INSTALLATION

python3 -m venv venv
source venv/bin/activate
pip install mtgdc_banlist

python mtgdc_banlist --compile-both

EXAMPLE

Hosted examples of generated static html from the repo:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mtgdc_banlist-1.2.tar.gz (84.5 kB view details)

Uploaded Source

Built Distribution

mtgdc_banlist-1.2-py3-none-any.whl (66.0 kB view details)

Uploaded Python 3

File details

Details for the file mtgdc_banlist-1.2.tar.gz.

File metadata

  • Download URL: mtgdc_banlist-1.2.tar.gz
  • Upload date:
  • Size: 84.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for mtgdc_banlist-1.2.tar.gz
Algorithm Hash digest
SHA256 abbfd5f62368e93952a97d017d1ec75a8ca702b25e545429fb7b982b60dfc63d
MD5 c19ab38c46685527c5df91f57d6398f3
BLAKE2b-256 90d899ce3c93654205e6fee3437592993315b2c0229539f6a774eefcc53781ed

See more details on using hashes here.

File details

Details for the file mtgdc_banlist-1.2-py3-none-any.whl.

File metadata

  • Download URL: mtgdc_banlist-1.2-py3-none-any.whl
  • Upload date:
  • Size: 66.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for mtgdc_banlist-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2797d202e1ae764953793db00ece649b7f0a3abde8f2580ae00e84ddd81b8f6
MD5 3a08e9378b8559b80336baef3ebb6179
BLAKE2b-256 d0797153a7e68320d222d9a0708ecafceb34c33de9008b2013d101280cf0c57a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page