From 3a1efcb8ea48d0fe8799b2464d912921a22c05ea Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 24 Jun 2023 15:04:50 +0200 Subject: [PATCH] stuff --- .gitignore | 3 +++ environ.py | 5 ++++- push.sh | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100755 push.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a3bdeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +.sass-cache/ +/pvv diff --git a/environ.py b/environ.py index ce636f0..50b8b7c 100644 --- a/environ.py +++ b/environ.py @@ -6,7 +6,10 @@ def j2_environment_params(): return dict( trim_blocks = True, lstrip_blocks = True, keep_trailing_newline = True, - extensions = ("jinja2.ext.do", "jinja2.ext.loopcontrols"), + extensions = ( + "jinja2.ext.do", + "jinja2.ext.loopcontrols" + ), ) def j2_environment(env): return (env.globals.update( diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..a9fea89 --- /dev/null +++ b/push.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +function verbose { + echo + "$@" + "$@" +} + +for style in pvv/styles/*.xml; do + verbose ./api.py set-style $(basename "$style" | cut -d. -f1) "$style" +done + +exit + +for card in pvv/cards/*.xml; do + verbose ./api.py set-card $(basename "$card" | cut -d. -f1) "$card" +done