From 642cac037d9d5a221eb0eb52288d7cd14c928b35 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Tue, 2 Nov 2021 15:13:52 +0100 Subject: Add a cover to the weekly planner so that pages are right --- templates/cover-A6-r.svg | 93 +++++++++++++++++++++++++++++++++++++++++++++ weekly_planner_generator.py | 7 ++++ 2 files changed, 100 insertions(+) create mode 100644 templates/cover-A6-r.svg diff --git a/templates/cover-A6-r.svg b/templates/cover-A6-r.svg new file mode 100644 index 0000000..5e39666 --- /dev/null +++ b/templates/cover-A6-r.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + {{ year }} + + diff --git a/weekly_planner_generator.py b/weekly_planner_generator.py index 7f1d64a..4ba491e 100755 --- a/weekly_planner_generator.py +++ b/weekly_planner_generator.py @@ -24,6 +24,13 @@ def main(): year = 2022 + template_cover = loader.load(env, 'cover-A6-r.svg') + with open("build/week_on_two_pages-A6-{year}-{page:03}.svg".format( + year=year, + page=0, + ), 'w') as fp: + fp.write(template_cover.render(year=year)) + cal = calendar.Calendar() weeks = sum([r[0] for r in cal.yeardatescalendar(2022, width=1)], []) -- cgit v1.2.3