Giter VIP home page Giter VIP logo

mtg-printable-set-label-generator's Introduction

Magic: the Gathering Printable Set Label Generator

This is a script for generating Magic: the Gathering (MTG) printable set labels in order to organize a collection of cards. The code is powered by the Scryfall API. As soon as a new set is up on Scryfall, the label for that set can be generated and printed.

Usage

If you're just interested in downloading and printing these set labels, check out the web frontend (code) and generate your own labels.

Advanced

If you want to further customize things, read on!

The script generator.py is a Python script to generate the printable labels. It requires Python 3.6+ and has a few dependencies.

brew install cairo                # Install vector graphics library
pip install poetry                # Install python dependency management tool
poetry install                    # Install python dependencies
pip install --editable .
python mtglabels/generator.py     # Creates SVG & PDF files in output/

By default, this will create SVG & PDF files. The SVG files are vector image files that can be customized further. The PDF files are ready to print.

The SVGs use the free fonts EB Garamond bold and Source Sans Pro regular.

Customizing

A lot of features can be customized by changing constants at the top of generator.py. For example, sets can be excluded one-by-one or in groups by type or sets can be renamed.

The labels are designed for US Letter paper but this can be customized:

python mtglabels/generator.py --paper-size=a4   # Use A4 paper size
python mtglabels/generator.py --help            # Show all options

You can generate labels for specific sets as well:

python mtglabels/generator.py lea mh1 mh2 neo

You can change how the labels are actually displayed and rendered by customizing templates/labels.svg. If you change the fonts, you may also need to resize things to fit.

Tips for printing SVGs

If you're just using the default PDFs, you probably won't need this. However, if you are customizing the SVGs and printing them, this section is for you.

The output SVGs are precisely sized for a sheet of paper (US Letter by default). Make sure while printing in your browser or otherwise to set the margins to None.

You can also "print" to a PDF.

License

The code is available at GitHub under the MIT license.

Some data such as set icons are unofficial Fan Content permitted under the Wizards of the Coast Fan Content Policy and is copyright Wizards of the Coast, LLC, a subsidiary of Hasbro, Inc. This code is not produced by, endorsed by, supported by, or affiliated with Wizards of the Coast.

Credits

Special thanks goes to the users behind other printable set labels such as those found here Using these fantastic labels definitely provided inspiration and direction and made me want something more customizable and updatable.

mtg-printable-set-label-generator's People

Contributors

davidfischer avatar dependabot[bot] avatar github-actions[bot] avatar gofrolist avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hoganlong

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.