Small Label (Default) - Common | Small Label (Default) - Uncommon | Small Label (Default) - Mountain + Rare |
---|---|---|
Small Label (No-date) - Common | Small Label (No-date) - Forest + Uncommon | Small Label (No-date) - Swamp + Mythic |
---|---|---|
Large Label (Default) - Common | Large Label (Switched) - Rare | Large Label (Switched) - Mythic |
---|---|---|
- Ctrl + P to print into PDF or print directly.
- Scale: 100% (instead of "fit to page width")
- Margins: Minimal
- Print backgrounds ON
Example input: DMU,NCC,NEO,VOC,VOW,TSR,RNA
(sudo) docker run -it --rm valgrut/mtg-labels
Link: https://hub.docker.com/r/valgrut/mtg-labels
This website will be online on mtglabels.wogon.cz webpage.
Clone this repository and run server locally:
export FLASK_ENV=development
export FLASK_APP=app
pip3 install -r requirements.txt
flask run
and now open http://localhost:5000 in your browser.
Build the image:
docker build --tag valgrut/mtg-labels .
and run the app in the container:
docker run -d -p 5000:5000 valgrut/mtg-labels
Finally cleanup the mess:
docker ps
docker stop valgrut/mtg-labels
docker container prune
If this tool has been useful for you, leave a ⭐ star ⭐ please and come back again for new labels!
- You can use this bash script to create template, style and add ref to the code.
./create-new-label-template.sh new-template-name
-
Now just edit generated template and stylesheet and enjoy new label!
-
Optional: Create a merge request to extend the template pool for others!
Show manual steps to add new Template
Important note 1: Keep an eye on the naming of the files and of the added lines in the code! - 'label\_type' in app.py must match the html form '\
cp templates/small-labels-default-template.html templates/NEW-LABEL-OPTION-STYLE-NAME-template.html
vim templates/NEW-LABEL-OPTION-STYLE-NAME-template.html
- Copy and modify your copy of the stylesheet file in static/
cp static/small-labels-default.css static/NEW-LABEL-OPTION-STYLE-NAME.css
vim static/NEW-LABEL-OPTION-STYLE-NAME.css
- Add option into the html form in the 'index.html' file
<option value="NEW_LABEL_OPTION_STYLE">New label style name</option>
- Add 'elif' lines into the 'app.py'
elif label_type == "NEW_LABEL_OPTION_STYLE_NAME":
label_type_name = "NEW-LABEL-OPTION-STYLE-NAME"
Which is passed into the files path later in the code.
html_label_template = label_type_name+"-template.html"
css_label_style = "static/"+label_type_name+".css
- Thingiverse: Trading Card Divider
- Thingiverse: Simple Card Divider
- Thingiverse: MTG card divider
- Thingiverse: MTG card divider (colorless)
- Convert excell ods file into csv for future processing
soffice --convert-to csv --outdir /tmp/ sets-list.ods
libreoffice --convert-to csv --outdir /tmp/ sets-list.ods
- Push updated docker image into dockerhub
docker login
docker push valgrut/mtg-labels
- README.md live preview
pipx run grip
There is limit 60 requests/hour. This will be solved with offline renderer someday.