diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-11-02 15:13:52 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-11-02 15:13:52 +0100 |
commit | 642cac037d9d5a221eb0eb52288d7cd14c928b35 (patch) | |
tree | e2390f74bca33adc42f1dae519ae294534074d6d | |
parent | 0c1cb7ff53d17d6bd783a15fac39213c7ff031f4 (diff) |
Add a cover to the weekly planner so that pages are right
-rw-r--r-- | templates/cover-A6-r.svg | 93 | ||||
-rwxr-xr-x | weekly_planner_generator.py | 7 |
2 files changed, 100 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="105mm" + height="148mm" + viewBox="0 0 396.85038 559.37009" + version="1.1" + id="svg5" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + sodipodi:docname="cover-A6-r.svg" + inkscape:export-filename="/home/valhalla/projects/software/pdfscripts/pdfscripts/templates/week_on_two_pages-A6-v.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview7" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:document-units="mm" + showgrid="true" + inkscape:zoom="1.0350929" + inkscape:cx="181.62621" + inkscape:cy="279.68504" + inkscape:window-width="1161" + inkscape:window-height="830" + inkscape:window-x="117" + inkscape:window-y="56" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" + showguides="true" + inkscape:guide-bbox="true"> + <inkscape:grid + type="xygrid" + id="grid9" + units="mm" + spacingx="3.7795276" + spacingy="3.7795276" /> + <sodipodi:guide + position="0,540.47244" + orientation="0,1" + id="guide1474" + inkscape:label="" + inkscape:locked="false" + inkscape:color="rgb(0,0,255)" /> + <sodipodi:guide + position="0,18.897638" + orientation="0,1" + id="guide1476" + inkscape:label="" + inkscape:locked="false" + inkscape:color="rgb(0,0,255)" /> + <sodipodi:guide + position="37.795276,559.37008" + orientation="-1,0" + id="guide1478" + inkscape:label="" + inkscape:locked="false" + inkscape:color="rgb(0,0,255)" /> + <sodipodi:guide + position="377.95276,559.37008" + orientation="-1,0" + id="guide1480" + inkscape:label="" + inkscape:locked="false" + inkscape:color="rgb(0,0,255)" /> + </sodipodi:namedview> + <defs + id="defs2" /> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:32px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#404040;fill-opacity:1;stroke:none" + x="198.40958" + y="180.27878" + id="text7108"><tspan + sodipodi:role="line" + id="tspan7106" + x="198.40958" + y="180.27878" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:Gentium;-inkscape-font-specification:'Gentium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#404040;fill-opacity:1">{{ year }}</tspan></text> + </g> +</svg> 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)], []) |