Print the calendar: a PDF of the month, week, day or agenda through a theme #342

Closed
opened 2026-10-01 07:02:08 +00:00 by tiagoagueda · 0 comments
Owner

The Calendar cannot be printed properly. The templates plugin is asked to offer a "template for printing calendar views" (postulo/postulo-templates#6), and there is no print view, no PDF and no kind for a theme to set.

What exists today

  • CalendarView draws four views, ("month", "week", "day", "agenda") (src/postulo/applications/agenda.py), of interviews, reminders, deadlines, closing dates and answers due.
  • The month grid shows two entries a cell, then "and N more" (PER_CELL = 2), in a table inside a scroll box, with a "New reminder" button in every cell.
  • Printing is the browser's dialog over that page: the two-entry limit, the buttons, the legend and the navigation all print. The one @media print block is generic; nothing sets an orientation.
  • There is no PDF route. The ICS feeds carry upcoming interviews and whole days, not reminders.
  • ThemeKind is cv, portfolio, letter.

Proposal

  1. A calendar kind for themes.
  2. A PDF of the view on screen: the view, the date and the kinds shown are taken from the address, as the page takes them.
  3. A context of plain values from what the page already builds: the period, the weeks and days, and each entry's kind, title, detail, time, whether it lasts all day and whether it is finished or cancelled. Every entry, without the two-per-cell limit.
  4. The theme is the person's choice (#340 holds it), with plain and classic templates of Postulo's own; the language and direction as for any document.
  5. A button on the Calendar page, beside the views.

Decisions

  • Which views. Recommended: all four, since the context is the same shape.
  • Downloaded or filed. Recommended: a download, like a list (#341).
  • The plain values. postulo/postulo#330 proposes a read-only view of the calendar's dated things for sync plugins. Recommended: one set of plain values serves both.

Needed by

postulo/postulo-templates#6. A month in landscape is #344.

Done when

  • The Calendar page offers a PDF of the month, week, day or agenda on screen, with every entry of the period.
  • A plugin theme that sets the calendar kind is offered for it.
  • New names on postulo.plugins.api get their line in the wiki's Writing a plugin (tests/test_wiki_surface.py) and a test in tests/test_plugin_surface.py; new pages join the page-coverage walk (tests/test_page_coverage.py) and the isolation sweep (tests/security/test_isolation_sweep.py); new strings go in the working catalogues (English, French, and European and Brazilian Portuguese as drafts).

From the list of template improvements of 2026-09-30.

The Calendar cannot be printed properly. The templates plugin is asked to offer a "template for printing calendar views" (postulo/postulo-templates#6), and there is no print view, no PDF and no kind for a theme to set. ## What exists today - `CalendarView` draws four views, `("month", "week", "day", "agenda")` (`src/postulo/applications/agenda.py`), of interviews, reminders, deadlines, closing dates and answers due. - The month grid shows two entries a cell, then "and N more" (`PER_CELL = 2`), in a table inside a scroll box, with a "New reminder" button in every cell. - Printing is the browser's dialog over that page: the two-entry limit, the buttons, the legend and the navigation all print. The one `@media print` block is generic; nothing sets an orientation. - There is no PDF route. The ICS feeds carry upcoming interviews and whole days, not reminders. - `ThemeKind` is `cv`, `portfolio`, `letter`. ## Proposal 1. **A calendar kind for themes.** 2. **A PDF of the view on screen**: the view, the date and the kinds shown are taken from the address, as the page takes them. 3. **A context of plain values** from what the page already builds: the period, the weeks and days, and each entry's kind, title, detail, time, whether it lasts all day and whether it is finished or cancelled. Every entry, without the two-per-cell limit. 4. **The theme** is the person's choice (#340 holds it), with `plain` and `classic` templates of Postulo's own; the language and direction as for any document. 5. **A button on the Calendar page**, beside the views. ## Decisions - **Which views.** Recommended: all four, since the context is the same shape. - **Downloaded or filed.** Recommended: a download, like a list (#341). - **The plain values.** postulo/postulo#330 proposes a read-only view of the calendar's dated things for sync plugins. Recommended: one set of plain values serves both. ## Needed by postulo/postulo-templates#6. A month in landscape is #344. ## Done when - The Calendar page offers a PDF of the month, week, day or agenda on screen, with every entry of the period. - A plugin theme that sets the calendar kind is offered for it. - New names on `postulo.plugins.api` get their line in the wiki's *Writing a plugin* (`tests/test_wiki_surface.py`) and a test in `tests/test_plugin_surface.py`; new pages join the page-coverage walk (`tests/test_page_coverage.py`) and the isolation sweep (`tests/security/test_isolation_sweep.py`); new strings go in the working catalogues (English, French, and European and Brazilian Portuguese as drafts). From the list of template improvements of 2026-09-30.
tiagoagueda added this to the 0.5.0 milestone 2026-10-25 17:04:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#342
No description provided.