Documents workflow: draft PDFs that are not "sent", comparing CV versions, and plain-text and DOCX export #236

Open
opened 2026-09-15 21:23:31 +00:00 by tiagoagueda · 0 comments
Owner

Three gaps between what the documents pages promise and what a job seeker needs. Found in the 2026-09-15 code audit.

1. Every "Export PDF" is filed as a sent document and copied to every store

  • CVExportView (documents/views.py:179-194) calls snapshot_cv, which creates a RenderedDocument. The post_save signal (signals.py:21-28) then queues it for Paperless and every other store.
  • The HTML preview cannot show page breaks, so checking a layout means exporting, and each try appears under "Versions you have sent" and "Sent documents".
  • Reports are already deduplicated by identical HTML (rendering.py:320-327); CVs are not, and the computed checksum is never used.

Proposal:

  • A Download draft PDF that renders without saving anything.
  • Deduplicate an exported CV with no application by identical HTML.
  • Copy to stores only the renders that went with an application, or add a draft state that stays out of stores.

2. Versions cannot be compared

  • A CV snapshot's source_text is the whole themed HTML, CSS included (rendering.py:300); a letter stores plain text (:356).
  • The model and the wiki promise text you can search and compare ("a PDF is … impossible to diff", models.py:474-476).
  • No comparison view exists; rendered_list.html and cv_detail.html only offer Download.

Proposal: store a plain-text version of the sections for CVs, and add Compare with previous between two renders of the same source (unified diff or difflib.HtmlDiff), linked from the application's documents.

3. CVs export only as PDF

Many applicant tracking systems and public-sector portals ask for DOCX or a pasted text version. pdf.py has only PDF backends.

This is distinct from #181, which is about the whole career record rather than one CV variant.

Proposal:

  • Copy as plain text and Download .txt for a variant, built from build_sections in the document's language.
  • DOCX or ODT through a plugin backend (python-docx or odfpy) behind the same kinds and theme registry, so the core stays dependency-light.
Three gaps between what the documents pages promise and what a job seeker needs. Found in the 2026-09-15 code audit. ## 1. Every "Export PDF" is filed as a sent document and copied to every store - `CVExportView` (`documents/views.py:179-194`) calls `snapshot_cv`, which creates a `RenderedDocument`. The `post_save` signal (`signals.py:21-28`) then queues it for Paperless and every other store. - The HTML preview cannot show page breaks, so checking a layout means exporting, and each try appears under "Versions you have sent" and "Sent documents". - Reports are already deduplicated by identical HTML (`rendering.py:320-327`); CVs are not, and the computed `checksum` is never used. **Proposal:** - A *Download draft PDF* that renders without saving anything. - Deduplicate an exported CV with no application by identical HTML. - Copy to stores only the renders that went with an application, or add a *draft* state that stays out of stores. ## 2. Versions cannot be compared - A CV snapshot's `source_text` is the whole themed HTML, CSS included (`rendering.py:300`); a letter stores plain text (`:356`). - The model and the wiki promise text you can search and compare ("a PDF is … impossible to diff", `models.py:474-476`). - No comparison view exists; `rendered_list.html` and `cv_detail.html` only offer *Download*. **Proposal:** store a plain-text version of the sections for CVs, and add *Compare with previous* between two renders of the same source (unified diff or `difflib.HtmlDiff`), linked from the application's documents. ## 3. CVs export only as PDF Many applicant tracking systems and public-sector portals ask for DOCX or a pasted text version. `pdf.py` has only PDF backends. This is distinct from #181, which is about the whole career record rather than one CV variant. **Proposal:** - *Copy as plain text* and *Download .txt* for a variant, built from `build_sections` in the document's language. - DOCX or ODT through a plugin backend (python-docx or odfpy) behind the same kinds and theme registry, so the core stays dependency-light.
tiagoagueda added this to the 0.5.0 milestone 2026-09-15 21:33:30 +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#236
No description provided.