aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2021-03-27 20:30:40 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2021-03-27 20:30:40 +0100
commit560b92e8c8189daffe9304a131240a522fb8f3db (patch)
treed287b5682c5d6521ba3c62381202a936c712d6a9 /scripts
parent3eb23eb5fb2642c4e6315c080f82e1d17e104617 (diff)
downloadmuhqs-game-560b92e8c8189daffe9304a131240a522fb8f3db.tar.gz
muhqs-game-560b92e8c8189daffe9304a131240a522fb8f3db.zip
add en and de card listings to web page
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_card.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/generate_card.py b/scripts/generate_card.py
index 0ecc5df5..c77c7b41 100755
--- a/scripts/generate_card.py
+++ b/scripts/generate_card.py
@@ -92,10 +92,13 @@ def get_latex_field(card: MutableMapping,
def generate_markdown(card: MutableMapping, language='en', indentation=3):
"""Output a markdown enumeration"""
- print(f'{"#" * indentation} {card["name"]}')
+ name = get_field(card, 'name', language)
+ print(f'{"#" * indentation} {name}')
+
+ file_name = file_for_card(name, "")
- yml_card_path = f'cards-data/{card["set"]}/{file_for_card(card["name"], ".yml")}'
- built_card_path = f'cards/{card["set"]}/{file_for_card(card["name"], "")}'
+ yml_card_path = f'cards-data/{card["set"]}/{file_name}.yml'
+ built_card_path = f'cards/{language}/{card["set"]}/{file_name}'
print(
f'\n[pdf]({built_card_path}.pdf) [png]({built_card_path}.png) [yml]({yml_card_path})\n'
)