Document export: OpenDocument and other open formats beside PDF and Word, with metadata the person can leave out or edit #480
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#480
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Requested by the maintainer on 2026-10-01. Three things about what a document leaves Postulo as.
What there is today
documents/pdf.py). And two written from the document'sOutline(headings, paragraphs and lists, with the setting taken off) through the registry indocuments/formats.py(#236): plain text, and Word (documents/docx.py, a zip of XML written with the standard library). The registry's own description already expects more: "OpenDocument, or anything a portal invents next, arrives the same way."<title>, its author from<meta name="author">(the person's name,templates/documents/themes/base_cv.html:29,base_letter.html:19) and its language from the document; the renderer adds what it adds by itself (the producing software, the date). The Word file carries the title, the author and the language indocProps/core.xml(documents/docx.py:250-261).1. More open formats
.odt, ISO/IEC 26300) first. It is the open standard for the job Word's format does, public bodies in several countries ask for it by name, and like.docxit is a zip of XML that the standard library can write from the sameOutline. It is one moreFormatin the registry, with its media type and its extension, and no new dependency..odtthat looks like the PDF is a different and much larger thing, and is not asked for here.postulo.plugins.apitoday; putting it there is part of this, with its line in the wiki's Writing a plugin.2. Export with or without embedded metadata
3. Editing the metadata
<title>and<meta>elements, which is how WeasyPrint is given them (not throughwrite_pdf'sxmp_metadataargument, whichdocuments/pdf.pyleaves alone on purpose, see the comment at:80-83);docProps/core.xmlfor Word;meta.xmlfor OpenDocument.docx.pyalready escapes the title, and bounded in length.Where it shows
The download controls on a CV and a letter, the copy made when a document is sent with an application, and the API's document calls, which take the same options so the browser extensions and the MCP server are not left with the old behaviour.
Done when
.odt, and the file opens in LibreOffice with its headings, paragraphs and lists, in the document's language.tests/test_document_formats.py(or wherever the Word format's are) read each file back and assert its properties, with and without, edited and default.Suggested milestone: 0.6.0. It builds on the formats #236 brought in 0.5.0 and needs none of 0.5.0's other work.
The maintainer's list of 2026-10-02 states an order for document export that bears on this issue: PDF first, then ODT, then DOCX.
Checked against
mainatf09b6010b: PDF is written (src/postulo/documents/pdf.py) and so is DOCX (src/postulo/documents/docx.py, from #236). OpenDocument is the missing one:odtappears only as an accepted upload extension (documents/models.py:586), and the registry indocuments/formats.pynames it as a format that “arrives the same way” (:16). So part 1 of this issue, ODT first, is already the right order.The candidates listed after it (HTML, Markdown, PDF/A) are outside that order. #653 writes the rule into
CONTRIBUTING.md, with the line that a format further down needs a reason in its issue.From the list of improvements of 2026-10-02.
Landed on main with a green Forgejo CI run. Its entry in the CHANGELOG's Unreleased section ends in (#480).