diff options
Diffstat (limited to 'planner_generator.py')
-rwxr-xr-x | planner_generator.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/planner_generator.py b/planner_generator.py index eda562b..7107d44 100755 --- a/planner_generator.py +++ b/planner_generator.py @@ -197,6 +197,28 @@ class DailyGenerator(Generator): 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 + ]) + + page = 1 + for month in months: + self.render_page(page=page, month=month, text=[]) + page += 1 + + class Command: """ Generate a planner |