summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2021-11-02 11:42:46 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2021-11-02 11:42:46 +0100
commit55a7966d493e9972e07a60cc7ecbfba9a93a2eee (patch)
tree58877b8105f201f3d59ba8453148d6fae11c13b9
parent17bd4ecd85e4191de99bc86c5e0b0ccf378b4ef3 (diff)
Weekly planner generator: quick hardcoded script step 1: generate svgs
-rw-r--r--templates/week_on_two_pages-A6-r.svg201
-rw-r--r--templates/week_on_two_pages-A6-v.svg212
-rwxr-xr-xweekly_planner_generator.py48
3 files changed, 461 insertions, 0 deletions
diff --git a/templates/week_on_two_pages-A6-r.svg b/templates/week_on_two_pages-A6-r.svg
new file mode 100644
index 0000000..58fdb81
--- /dev/null
+++ b/templates/week_on_two_pages-A6-r.svg
@@ -0,0 +1,201 @@
+<?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="week_on_two_pages-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="198.04986"
+ 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">
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 37.795278,298.58268 H 377.95276"
+ id="path1562"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 37.795278,177.6378 H 377.95276"
+ id="path1562-3"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 37.795278,56.692914 H 377.95276"
+ id="path1562-3-7"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 37.795278,419.52756 H 377.95276"
+ id="path1562-6"
+ sodipodi:nodetypes="cc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:32px;line-height:1.25;font-family:sans-serif;fill:#404040;fill-opacity:1;stroke:none"
+ x="379.93231"
+ y="45.264271"
+ id="text7108"><tspan
+ sodipodi:role="line"
+ id="tspan7106"
+ x="379.93231"
+ y="45.264271"
+ 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:end;text-anchor:end;fill:#404040;fill-opacity:1">{{ week[-1].strftime('%Y') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:32px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#404040;fill-opacity:1;stroke:none"
+ x="37.804909"
+ y="45.230762"
+ id="text7108-3"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5"
+ x="37.804909"
+ y="45.230762"
+ 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:start;text-anchor:start;fill:#404040;fill-opacity:1">{{ week[-1].strftime('%B') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="378.18207"
+ y="79.349457"
+ id="text7108-3-5"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7"
+ x="378.18207"
+ y="79.349457"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">{{ week[4].strftime('%A') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="36.193779"
+ y="79.294121"
+ id="text7108-3-5-6"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-7"
+ x="36.193779"
+ y="79.294121"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;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:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1">{{ week[4].strftime('%d') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="378.17255"
+ y="200.27995"
+ id="text7108-3-5-9"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-9"
+ x="378.17255"
+ y="200.27995"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">{{ week[5].strftime('%A') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="36.184246"
+ y="200.22462"
+ id="text7108-3-5-6-0"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-7-5"
+ x="36.184246"
+ y="200.22462"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;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:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1">{{ week[5].strftime('%d') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="378.16406"
+ y="321.23587"
+ id="text7108-3-5-2"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-1"
+ x="378.16406"
+ y="321.23587"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">{{ week[6].strftime('%A') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="36.175777"
+ y="321.18054"
+ id="text7108-3-5-6-02"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-7-0"
+ x="36.175777"
+ y="321.18054"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;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:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1">{{ week[6].strftime('%d') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="378.18655"
+ y="442.18417"
+ id="text7108-3-5-63"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-6"
+ x="378.18655"
+ y="442.18417"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">notes</tspan></text>
+ </g>
+</svg>
diff --git a/templates/week_on_two_pages-A6-v.svg b/templates/week_on_two_pages-A6-v.svg
new file mode 100644
index 0000000..9e84b91
--- /dev/null
+++ b/templates/week_on_two_pages-A6-v.svg
@@ -0,0 +1,212 @@
+<?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="week_on_two_pages-A6-v.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="198.04986"
+ 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="18.897638,559.37008"
+ orientation="-1,0"
+ id="guide1478"
+ inkscape:label=""
+ inkscape:locked="false"
+ inkscape:color="rgb(0,0,255)" />
+ <sodipodi:guide
+ position="359.05512,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">
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 18.897638,298.58268 340.157482,0"
+ id="path1562"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 18.897638,177.6378 340.157482,0"
+ id="path1562-3"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 18.897638,56.692914 340.157482,0"
+ id="path1562-3-7"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#7f7f7f;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 18.897638,419.52756 340.157482,0"
+ id="path1562-6"
+ sodipodi:nodetypes="cc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:32px;line-height:1.25;font-family:sans-serif;fill:#404040;fill-opacity:1;stroke:none"
+ x="360.98376"
+ y="45.264271"
+ id="text7108"><tspan
+ sodipodi:role="line"
+ id="tspan7106"
+ x="360.98376"
+ y="45.264271"
+ 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:end;text-anchor:end;fill:#404040;fill-opacity:1">{{ week[0].strftime('%Y') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:32px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#404040;fill-opacity:1;stroke:none"
+ x="18.87664"
+ y="45.230762"
+ id="text7108-3"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5"
+ x="18.87664"
+ y="45.230762"
+ 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:start;text-anchor:start;fill:#404040;fill-opacity:1">{{ week[0].strftime('%B') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="359.28442"
+ y="79.349457"
+ id="text7108-3-5"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7"
+ x="359.28442"
+ y="79.349457"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">{{ week[0].strftime('%A') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="17.33889"
+ y="79.294121"
+ id="text7108-3-5-6"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-7"
+ x="17.33889"
+ y="79.294121"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;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:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1">{{ week[0].strftime('%d') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="359.2749"
+ y="200.27995"
+ id="text7108-3-5-9"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-9"
+ x="359.2749"
+ y="200.27995"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">{{ week[1].strftime('%A') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="17.329357"
+ y="200.22462"
+ id="text7108-3-5-6-0"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-7-5"
+ x="17.329357"
+ y="200.22462"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;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:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1">{{ week[1].strftime('%d') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="359.26642"
+ y="321.23587"
+ id="text7108-3-5-2"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-1"
+ x="359.26642"
+ y="321.23587"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">{{ week[2].strftime('%A') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="17.320889"
+ y="321.18054"
+ id="text7108-3-5-6-02"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-7-0"
+ x="17.320889"
+ y="321.18054"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;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:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1">{{ week[2].strftime('%d') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="359.28891"
+ y="442.18417"
+ id="text7108-3-5-63"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-6"
+ x="359.28891"
+ y="442.18417"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;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:end;text-anchor:end;fill:#3f3f3f;fill-opacity:1">{{ week[3].strftime('%A') }}</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;text-align:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1;stroke:none"
+ x="17.343372"
+ y="442.12885"
+ id="text7108-3-5-6-9"><tspan
+ sodipodi:role="line"
+ id="tspan7106-5-7-7-4"
+ x="17.343372"
+ y="442.12885"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;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:start;text-anchor:start;fill:#3f3f3f;fill-opacity:1">{{ week[3].strftime('%d') }}</tspan></text>
+ </g>
+</svg>
diff --git a/weekly_planner_generator.py b/weekly_planner_generator.py
new file mode 100755
index 0000000..d5bd90c
--- /dev/null
+++ b/weekly_planner_generator.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python3
+
+import argparse
+import calendar
+import os
+
+import jinja2
+
+
+def main():
+ env = jinja2.Environment()
+ loader = jinja2.FileSystemLoader('templates')
+ template_verso = loader.load(env, 'week_on_two_pages-A6-v.svg')
+ template_recto = loader.load(env, 'week_on_two_pages-A6-r.svg')
+
+ os.makedirs("build", exist_ok=True)
+
+ year = 2022
+
+ cal = calendar.Calendar()
+ weeks = sum([r[0] for r in cal.yeardatescalendar(2022, width=1)], [])
+
+ last_monday = None
+ page = 1
+ for week in weeks:
+ # yeardatescalendar will have the same week twice at the margin
+ # of a month, but we want to skip one of those
+ if week[0] == last_monday:
+ continue
+ last_monday = week[0]
+
+ with open("build/week_on_two_pages-A6-{year}-{page:02}.svg".format(
+ year=year,
+ page=page,
+ ), 'w') as fp:
+ fp.write(template_verso.render(week=week))
+ page += 1
+
+ with open("build/week_on_two_pages-A6-{year}-{page:02}.svg".format(
+ year=year,
+ page=page,
+ ), 'w') as fp:
+ fp.write(template_recto.render(week=week))
+ page += 1
+
+
+if __name__ == '__main__':
+ main()