From eb9d06cb1cd79f37edcf44f122a36f124a82503e Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 12 Aug 2023 10:13:06 +0200 Subject: Moved planner generator to a subdirectory --- planner/planner_generator.py | 396 ++++++++ planner/templates/cover-A5-r.svg | 93 ++ planner/templates/cover-A6-r.svg | 93 ++ planner/templates/daily-A5-graph-r.svg | 463 +++++++++ planner/templates/daily-A5-graph-v.svg | 463 +++++++++ planner/templates/daily-A5-points4mm-r.svg | 312 +++++++ planner/templates/daily-A5-points4mm-v.svg | 463 +++++++++ planner/templates/daily-A5-r.svg | 109 +++ planner/templates/daily-A5-v.svg | 109 +++ planner/templates/daily-A6-r.svg | 109 +++ planner/templates/daily-A6-v.svg | 109 +++ planner/templates/month-A6-r.svg | 1291 ++++++++++++++++++++++++++ planner/templates/month-A6-v.svg | 1291 ++++++++++++++++++++++++++ planner/templates/week_on_two_pages-A6-r.svg | 201 ++++ planner/templates/week_on_two_pages-A6-v.svg | 212 +++++ 15 files changed, 5714 insertions(+) create mode 100755 planner/planner_generator.py create mode 100644 planner/templates/cover-A5-r.svg create mode 100644 planner/templates/cover-A6-r.svg create mode 100644 planner/templates/daily-A5-graph-r.svg create mode 100644 planner/templates/daily-A5-graph-v.svg create mode 100644 planner/templates/daily-A5-points4mm-r.svg create mode 100644 planner/templates/daily-A5-points4mm-v.svg create mode 100644 planner/templates/daily-A5-r.svg create mode 100644 planner/templates/daily-A5-v.svg create mode 100644 planner/templates/daily-A6-r.svg create mode 100644 planner/templates/daily-A6-v.svg create mode 100644 planner/templates/month-A6-r.svg create mode 100644 planner/templates/month-A6-v.svg create mode 100644 planner/templates/week_on_two_pages-A6-r.svg create mode 100644 planner/templates/week_on_two_pages-A6-v.svg (limited to 'planner') diff --git a/planner/planner_generator.py b/planner/planner_generator.py new file mode 100755 index 0000000..f2c6408 --- /dev/null +++ b/planner/planner_generator.py @@ -0,0 +1,396 @@ +#!/usr/bin/env python3 + +import argparse +import calendar +import datetime +import locale +import logging +import os +import shutil +import subprocess +import sys + +from typing import Optional + +try: + from lesana.command import _get_first_docstring_line # type: ignore +except ImportError: + def _get_first_docstring_line(obj): + return "" + +try: + import argcomplete # type: ignore +except ImportError: + argcomplete = False + +import jinja2 + + +locale.setlocale(locale.LC_ALL, '') + + +class Generator: + """ + """ + default_template = "planner-A6" + + def __init__( + self, + year: Optional[int] = None, + template: Optional[str] = None, + cover_template: Optional[str] = None, + out_file: Optional[str] = None, + build_dir: Optional[str] = "build", + latitude: Optional[float] = None, + longitude: Optional[float] = None, + timezone: Optional[str] = None, + ): + self.year = year or ( + datetime.date.today() + datetime.timedelta(days=334) + ).year + + self.latitude = latitude + self.longitude = longitude + self.timezone = timezone + + self.out_file = out_file or ( + template or self.default_template + ) + ".pdf" + + self.paper_size = self._get_paper_size(template) + + env = jinja2.Environment() + self.templates_dir = "templates" + loader = jinja2.FileSystemLoader(self.templates_dir) + if not template: + template = self.default_template + self.template_recto = loader.load(env, template + "-r.svg") + self.template_verso = loader.load(env, template + "-v.svg") + self.template_cover = loader.load( + env, + self._get_cover_name(cover_template) + ) + self.build_dir = build_dir + self.page_fname = os.path.join( + self.build_dir, + template + "-{year}-{page:03}.svg" + ) + + def _get_paper_size(self, template): + if "A6" in template: + return "a6" + if "A5" in template: + return "a5" + if "A4" in template: + return "a4" + return "a6" + + def _get_cover_name(self, cover_template): + if cover_template: + return cover_template + return "cover-{}-r.svg".format(self.paper_size.upper()) + + def render_page(self, page: int, **kw): + # page counts starts with 0 + if page == 0: + template = self.template_cover + elif page % 2 == 0: + template = self.template_recto + else: + template = self.template_verso + with open(self.page_fname.format( + year=self.year, page=page + ), "w") as fp: + fp.write(template.render(**kw)) + + def run(self): + self.clean_build_dir() + self.generate_cover_page() + self.generate_pages() + self.convert_pages_to_svg() + self.join_pages() + + def clean_build_dir(self): + try: + shutil.rmtree(self.build_dir) + except FileNotFoundError: + pass + os.makedirs(self.build_dir) + + def generate_cover_page(self): + self.render_page(page=0, year=self.year) + + def generate_pages(self): + pass + + def convert_pages_to_svg(self): + inkscape_commands = ";\n".join([ + ( + "file-open:{build_dir}/{svg};" + + " export-type: pdf;" + + " export-filename:build/{pdf};" + + " export-text-to-path;" + + " export-do" + ).format( + build_dir=self.build_dir, + svg=s, + pdf=os.path.splitext(s)[0] + ".pdf", + ) + for s in os.listdir(self.build_dir) + ]) + try: + subprocess.run( + ["inkscape", "--shell"], + input=inkscape_commands, + text=True, + ) + except FileNotFoundError: + logging.warning("Inkscape is not installed, can't convert to pdf") + logging.warning("Stopping here, you can use the svgs as you like") + sys.exit(1) + + def get_pdf_pages(self): + pdf_pages = sorted([ + os.path.join(self.build_dir, p) + for p in os.listdir(self.build_dir) + if p.endswith(".pdf") + ]) + return pdf_pages + + def join_pages(self): + pdf_pages = self.get_pdf_pages() + try: + subprocess.run([ + "pdfjam", + "--outfile", self.out_file, + "--scale", "1", + "--paper", "{}paper".format(self.paper_size), + *pdf_pages + ]) + except FileNotFoundError: + logging.warning("pdfjam is not installed") + logging.warning("you will have to join the pdf pages yourself") + sys.exit(1) + + +class WeeklyGenerator(Generator): + """ + """ + default_template = "week_on_two_pages-A6" + + def generate_pages(self): + cal = calendar.Calendar() + weeks = sum( + [r[0] for r in cal.yeardatescalendar(self.year, 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] + + self.render_page(page=page, week=week) + page += 1 + + self.render_page(page=page, week=week) + page += 1 + + +class DailyGenerator(Generator): + """ + """ + default_template = "daily-A6" + + def generate_pages(self): + day = datetime.date(self.year, 1, 1) + + # we want to start with a left side page (starting from 0) + page = 2 + while day.year == self.year: + self.render_page(page=page, day=day) + page += 1 + day += datetime.timedelta(days=1) + + if day.year > self.year: + break + + self.render_page(page=page, day=day) + page += 1 + day += datetime.timedelta(days=1) + + def get_pdf_pages(self): + pdf_pages = super().get_pdf_pages() + # insert an empty page on the second page, to start the year on + # a left page + pdf_pages.insert(1, "1, {}") + + return pdf_pages + + +class MonthGenerator(Generator): + """ + """ + default_template = "month-A6" + + def generate_pages(self): + cal = calendar.Calendar() + full_year = cal.yeardatescalendar(self.year, width=1) + months = [] + + for i in range(12): + months.append([ + day for week in full_year[i][0] for day in week + if day.month == i + 1 + ]) + + texts = self.get_texts() + + page = 2 + for i, month in enumerate(months): + self.render_page(page=page, month=month, text=texts[i]) + page += 1 + + def generate_cover_page(self): + pass + + def get_texts(self): + return [[] for i in range(12)] + + +class EphemerismonthGenerator(MonthGenerator): + """ + """ + default_template = "month-A6" + + def get_texts(self): + # we import suntime just here, because it's a third party + # library and not used elsewhere + try: + import astral + except ImportError: + print("Printing a month planner with ephemeris requires" + "the astral library.") + sys.exit(1) + + if not self.latitude or not self.longitude or not self.timezone: + print("Printing ephemeris requires latitude and longitude") + sys.exit(1) + + location = astral.Location(( + "", + "", + self.latitude, + self.longitude, + self.timezone, + 0 + )) + + day = datetime.date(self.year, 1, 1) + + texts = [] + while day.year == self.year: + month = [] + this_month = day.month + while day.month == this_month: + sunrise = location.sunrise(day) + noon = location.solar_noon(day) + sunset = location.sunset(day) + moon_phase = location.moon_phase(day) + if moon_phase < 7: + moon_icon = "●" + elif moon_phase < 14: + moon_icon = "☽" + elif moon_phase < 21: + moon_icon = "○" + else: + moon_icon = "☾" + text = ("☼ {sunrise} — {noon} — {sunset} " + + "{moon_icon} {moon_phase}").format( + sunrise=sunrise.strftime("%H:%M"), + noon=noon.strftime("%H:%M"), + sunset=sunset.strftime("%H:%M"), + moon_icon=moon_icon, + moon_phase=moon_phase, + ) + month.append(text) + day += datetime.timedelta(days=1) + texts.append(month) + + return texts + + +class Command: + """ + Generate a planner + """ + def get_parser(self): + desc = _get_first_docstring_line(self) + parser = argparse.ArgumentParser(description=desc) + parser.add_argument( + "--year", '-y', + default=None, + help="Default is next year, or this year in January." + ) + parser.add_argument( + "--template", '-t', + default=None, + help="Base name of the template (without -[rv].svg)", + ) + parser.add_argument( + "--cover-template", + default=None, + help="Full name of the template (including -[rv].svg)", + ) + parser.add_argument( + "--latitude", + default=None, + type=float, + help="Latitude for ephemeris calculation", + ) + parser.add_argument( + "--longitude", + default=None, + type=float, + help="Longitude for ephemeris calculation", + ) + parser.add_argument( + "--timezone", + default=None, + help="Timezone for ephemeris calculation (e.g. Europe/Rome)", + ) + parser.add_argument( + "command", + ) + return parser + + def main(self): + self.parser = self.get_parser() + if argcomplete: + argcomplete.autocomplete(self.parser) + self.args = self.parser.parse_args() + + generator = getattr( + sys.modules[__name__], + self.args.command.capitalize() + "Generator", + None + ) + if generator: + generator( + year=self.args.year, + template=self.args.template, + cover_template=self.args.cover_template, + latitude=self.args.latitude, + longitude=self.args.longitude, + timezone=self.args.timezone, + ).run() + else: + print("command not supported: {}".format(self.args.command)) + + +if __name__ == "__main__": + Command().main() diff --git a/planner/templates/cover-A5-r.svg b/planner/templates/cover-A5-r.svg new file mode 100644 index 0000000..68e5fbd --- /dev/null +++ b/planner/templates/cover-A5-r.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + {{ year }} + + diff --git a/planner/templates/cover-A6-r.svg b/planner/templates/cover-A6-r.svg new file mode 100644 index 0000000..5e39666 --- /dev/null +++ b/planner/templates/cover-A6-r.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + {{ year }} + + diff --git a/planner/templates/daily-A5-graph-r.svg b/planner/templates/daily-A5-graph-r.svg new file mode 100644 index 0000000..593c5a2 --- /dev/null +++ b/planner/templates/daily-A5-graph-r.svg @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + {{ day.strftime("%d %B %Y").strip('0') }} + {{ day.strftime("%A") }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/planner/templates/daily-A5-graph-v.svg b/planner/templates/daily-A5-graph-v.svg new file mode 100644 index 0000000..e7e7297 --- /dev/null +++ b/planner/templates/daily-A5-graph-v.svg @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + {{ day.strftime("%d %B %Y").strip('0') }} + {{ day.strftime("%A") }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/planner/templates/daily-A5-points4mm-r.svg b/planner/templates/daily-A5-points4mm-r.svg new file mode 100644 index 0000000..418e4e2 --- /dev/null +++ b/planner/templates/daily-A5-points4mm-r.svg @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + {{ day.strftime("%d %B %Y").strip('0') }} + {{ day.strftime("%A") }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/planner/templates/daily-A5-points4mm-v.svg b/planner/templates/daily-A5-points4mm-v.svg new file mode 100644 index 0000000..8f204c0 --- /dev/null +++ b/planner/templates/daily-A5-points4mm-v.svg @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + {{ day.strftime("%d %B %Y").strip('0') }} + {{ day.strftime("%A") }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/planner/templates/daily-A5-r.svg b/planner/templates/daily-A5-r.svg new file mode 100644 index 0000000..18ea6e7 --- /dev/null +++ b/planner/templates/daily-A5-r.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + {{ day.strftime("%A") }} + {{ day.strftime("%d %B %Y").strip('0') }} + + diff --git a/planner/templates/daily-A5-v.svg b/planner/templates/daily-A5-v.svg new file mode 100644 index 0000000..afbdb16 --- /dev/null +++ b/planner/templates/daily-A5-v.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + {{ day.strftime("%d %B %Y").strip('0') }} + {{ day.strftime("%A") }} + + diff --git a/planner/templates/daily-A6-r.svg b/planner/templates/daily-A6-r.svg new file mode 100644 index 0000000..4e80bff --- /dev/null +++ b/planner/templates/daily-A6-r.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + {{ day.strftime("%A") }} + {{ day.strftime("%d %B %Y").strip('0') }} + + diff --git a/planner/templates/daily-A6-v.svg b/planner/templates/daily-A6-v.svg new file mode 100644 index 0000000..bdc4d56 --- /dev/null +++ b/planner/templates/daily-A6-v.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + {{ day.strftime("%A") }} + {{ day.strftime("%d %B %Y").strip('0') }} + + diff --git a/planner/templates/month-A6-r.svg b/planner/templates/month-A6-r.svg new file mode 100644 index 0000000..53d95ac --- /dev/null +++ b/planner/templates/month-A6-r.svg @@ -0,0 +1,1291 @@ + + + + + + + + + + + + + + + + + {{ month[0].strftime('%Y') }} + {{ month[0].strftime('%B') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ month[0].strftime('%d').lstrip('0') }} + {{ month[0].strftime('%a') if month[0] }} + {{ month[1].strftime('%d').lstrip('0') }} + {{ month[1].strftime('%a') if month[1] }} + {{ month[2].strftime('%d').lstrip('0') }} + {{ month[2].strftime('%a') if month[2] }} + {{ month[3].strftime('%d').lstrip('0') }} + {{ month[3].strftime('%a') if month[3] }} + {{ month[4].strftime('%d').lstrip('0') }} + {{ month[4].strftime('%a') if month[4] }} + {{ month[5].strftime('%d').lstrip('0') }} + {{ month[5].strftime('%a') if month[5] }} + {{ month[6].strftime('%d').lstrip('0') }} + {{ month[6].strftime('%a') if month[6] }} + {{ month[7].strftime('%d').lstrip('0') }} + {{ month[7].strftime('%a') if month[7] }} + {{ month[8].strftime('%d').lstrip('0') }} + {{ month[8].strftime('%a') if month[8] }} + {{ month[9].strftime('%d').lstrip('0') }} + {{ month[9].strftime('%a') if month[9] }} + {{ month[10].strftime('%d').lstrip('0') }} + {{ month[10].strftime('%a') if month[10] }} + {{ month[11].strftime('%d').lstrip('0') }} + {{ month[11].strftime('%a') if month[11] }} + {{ month[12].strftime('%d').lstrip('0') }} + {{ month[12].strftime('%a') if month[12] }} + {{ month[13].strftime('%d').lstrip('0') }} + {{ month[13].strftime('%a') if month[13] }} + {{ month[14].strftime('%d').lstrip('0') }} + {{ month[14].strftime('%a') if month[14] }} + {{ month[15].strftime('%d').lstrip('0') }} + {{ month[15].strftime('%a') if month[15] }} + {{ month[16].strftime('%d').lstrip('0') }} + {{ month[16].strftime('%a') if month[16] }} + {{ month[17].strftime('%d').lstrip('0') }} + {{ month[17].strftime('%a') if month[17] }} + {{ month[18].strftime('%d').lstrip('0') }} + {{ month[18].strftime('%a') if month[18] }} + {{ month[19].strftime('%d').lstrip('0') }} + {{ month[19].strftime('%a') if month[19] }} + {{ month[20].strftime('%d').lstrip('0') }} + {{ month[20].strftime('%a') if month[20] }} + {{ month[21].strftime('%d').lstrip('0') }} + {{ month[21].strftime('%a') if month[21] }} + {{ month[22].strftime('%d').lstrip('0') }} + {{ month[22].strftime('%a') if month[22] }} + {{ month[23].strftime('%d').lstrip('0') }} + {{ month[23].strftime('%a') if month[23] }} + {{ month[24].strftime('%d').lstrip('0') }} + {{ month[24].strftime('%a') if month[24] }} + {{ month[25].strftime('%d').lstrip('0') }} + {{ month[25].strftime('%a') if month[25] }} + {{ month[26].strftime('%d').lstrip('0') }} + {{ month[26].strftime('%a') if month[26] }} + {{ month[27].strftime('%d').lstrip('0') }} + {{ month[27].strftime('%a') if month[27] }} + {{ month[28].strftime('%d').lstrip('0') if month[28] }} + {{ month[28].strftime('%a') if month[28] }} + {{ month[29].strftime('%d').lstrip('0') if month[29] }} + {{ month[29].strftime('%a') if month[29] }} + {{ month[30].strftime('%d').lstrip('0') if month[30] }} + {{ month[30].strftime('%a') if month[30] }} + {{ text[0] }} + {{ text[1] }} + {{ text[2] }} + {{ text[3] }} + {{ text[4] }} + {{ text[5] }} + {{ text[6] }} + {{ text[7] }} + {{ text[8] }} + {{ text[9] }} + {{ text[10] }} + {{ text[11] }} + {{ text[12] }} + {{ text[13] }} + {{ text[14] }} + {{ text[15] }} + {{ text[16] }} + {{ text[17] }} + {{ text[18] }} + {{ text[19] }} + {{ text[20] }} + {{ text[21] }} + {{ text[22] }} + {{ text[23] }} + {{ text[24] }} + {{ text[25] }} + {{ text[26] }} + {{ text[27] }} + {{ text[28] }} + {{ text[29] }} + {{ text[30] }} + + diff --git a/planner/templates/month-A6-v.svg b/planner/templates/month-A6-v.svg new file mode 100644 index 0000000..90e4082 --- /dev/null +++ b/planner/templates/month-A6-v.svg @@ -0,0 +1,1291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ month[0].strftime('%d').lstrip('0') }} + {{ month[0].strftime('%a') if month[0] }} + {{ month[1].strftime('%d').lstrip('0') }} + {{ month[1].strftime('%a') if month[1] }} + {{ month[2].strftime('%d').lstrip('0') }} + {{ month[2].strftime('%a') if month[2] }} + {{ month[3].strftime('%d').lstrip('0') }} + {{ month[3].strftime('%a') if month[3] }} + {{ month[4].strftime('%d').lstrip('0') }} + {{ month[4].strftime('%a') if month[4] }} + {{ month[5].strftime('%d').lstrip('0') }} + {{ month[5].strftime('%a') if month[5] }} + {{ month[6].strftime('%d').lstrip('0') }} + {{ month[6].strftime('%a') if month[6] }} + {{ month[7].strftime('%d').lstrip('0') }} + {{ month[7].strftime('%a') if month[7] }} + {{ month[8].strftime('%d').lstrip('0') }} + {{ month[8].strftime('%a') if month[8] }} + {{ month[9].strftime('%d').lstrip('0') }} + {{ month[9].strftime('%a') if month[9] }} + {{ month[10].strftime('%d').lstrip('0') }} + {{ month[10].strftime('%a') if month[10] }} + {{ month[11].strftime('%d').lstrip('0') }} + {{ month[11].strftime('%a') if month[11] }} + {{ month[12].strftime('%d').lstrip('0') }} + {{ month[12].strftime('%a') if month[12] }} + {{ month[13].strftime('%d').lstrip('0') }} + {{ month[13].strftime('%a') if month[13] }} + {{ month[14].strftime('%d').lstrip('0') }} + {{ month[14].strftime('%a') if month[14] }} + {{ month[15].strftime('%d').lstrip('0') }} + {{ month[15].strftime('%a') if month[15] }} + {{ month[16].strftime('%d').lstrip('0') }} + {{ month[16].strftime('%a') if month[16] }} + {{ month[17].strftime('%d').lstrip('0') }} + {{ month[17].strftime('%a') if month[17] }} + {{ month[18].strftime('%d').lstrip('0') }} + {{ month[18].strftime('%a') if month[18] }} + {{ month[19].strftime('%d').lstrip('0') }} + {{ month[19].strftime('%a') if month[19] }} + {{ month[20].strftime('%d').lstrip('0') }} + {{ month[20].strftime('%a') if month[20] }} + {{ month[21].strftime('%d').lstrip('0') }} + {{ month[21].strftime('%a') if month[21] }} + {{ month[22].strftime('%d').lstrip('0') }} + {{ month[22].strftime('%a') if month[22] }} + {{ month[23].strftime('%d').lstrip('0') }} + {{ month[23].strftime('%a') if month[23] }} + {{ month[24].strftime('%d').lstrip('0') }} + {{ month[24].strftime('%a') if month[24] }} + {{ month[25].strftime('%d').lstrip('0') }} + {{ month[25].strftime('%a') if month[25] }} + {{ month[26].strftime('%d').lstrip('0') }} + {{ month[26].strftime('%a') if month[26] }} + {{ month[27].strftime('%d').lstrip('0') }} + {{ month[27].strftime('%a') if month[27] }} + {{ month[28].strftime('%d').lstrip('0') if month[28] }} + {{ month[28].strftime('%a') if month[28] }} + {{ month[29].strftime('%d').lstrip('0') if month[29] }} + {{ month[29].strftime('%a') if month[29] }} + {{ month[30].strftime('%d').lstrip('0') if month[30] }} + {{ month[30].strftime('%a') if month[30] }} + {{ text[0] }} + {{ text[1] }} + {{ text[2] }} + {{ text[3] }} + {{ text[4] }} + {{ text[5] }} + {{ text[6] }} + {{ text[7] }} + {{ text[8] }} + {{ text[9] }} + {{ text[10] }} + {{ text[11] }} + {{ text[12] }} + {{ text[13] }} + {{ text[14] }} + {{ text[15] }} + {{ text[16] }} + {{ text[17] }} + {{ text[18] }} + {{ text[19] }} + {{ text[20] }} + {{ text[21] }} + {{ text[22] }} + {{ text[23] }} + {{ text[24] }} + {{ text[25] }} + {{ text[26] }} + {{ text[27] }} + {{ text[28] }} + {{ text[29] }} + {{ text[30] }} + {{ month[0].strftime('%Y') }} + {{ month[0].strftime('%B') }} + + diff --git a/planner/templates/week_on_two_pages-A6-r.svg b/planner/templates/week_on_two_pages-A6-r.svg new file mode 100644 index 0000000..58fdb81 --- /dev/null +++ b/planner/templates/week_on_two_pages-A6-r.svg @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + {{ week[-1].strftime('%Y') }} + {{ week[-1].strftime('%B') }} + {{ week[4].strftime('%A') }} + {{ week[4].strftime('%d') }} + {{ week[5].strftime('%A') }} + {{ week[5].strftime('%d') }} + {{ week[6].strftime('%A') }} + {{ week[6].strftime('%d') }} + notes + + diff --git a/planner/templates/week_on_two_pages-A6-v.svg b/planner/templates/week_on_two_pages-A6-v.svg new file mode 100644 index 0000000..9e84b91 --- /dev/null +++ b/planner/templates/week_on_two_pages-A6-v.svg @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + {{ week[0].strftime('%Y') }} + {{ week[0].strftime('%B') }} + {{ week[0].strftime('%A') }} + {{ week[0].strftime('%d') }} + {{ week[1].strftime('%A') }} + {{ week[1].strftime('%d') }} + {{ week[2].strftime('%A') }} + {{ week[2].strftime('%d') }} + {{ week[3].strftime('%A') }} + {{ week[3].strftime('%d') }} + + -- cgit v1.2.3