Repository navigation
docs: OpenDocument (LibreOffice) support documentation and examples (#138) - #217
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documentation and examples for OpenDocument Text (
.odt/.ott) support:OdtTemplateProcessor(#210–#214) and the format-detectingTemplateProcessorfacade (#215).Changes
docs/for-template-authors/libreoffice.md("LibreOffice / OpenDocument"). It covers authoring templates in LibreOffice Writer (saving as.odt/.ott, AutoCorrect quotes, no.fodt) and what is supported, including the list rules. It also covers the differences from Word, taken from the spec's known gaps: whitespace collapsing, row spans not adjusted, bookmarks not renamed,UpdateFieldsOnOpennot applicable, comments not processed, signatures removed, encrypted files rejected,.fodtunsupported.docs/for-developers/opendocument.md("OpenDocument (.odt)"). It covers theOdtTemplateProcessorAPI (files, bytes, a write-only output stream,.ott→.odt, options andDocumentProperties→meta.xml, validation) and theTemplateProcessorfacade (detection rules,DetectFormat, stream behavior, unsupported formats).docs/index.md, the FAQ ("Can I write templates in LibreOffice?") and Getting Started.TriasDev.Templify/README.md) has the headline, the feature bullet and a sample with both processors andDetectFormat..odt/.ottand LibreOffice (and drops the outdated "100% test coverage" claim). Tagsodt,ott,opendocumentandlibreofficeare added.TriasDev.Templify.Tests/Odt/), the code organization and test locations, the markdown note, and updated test counts.libreoffice-letterexample. It writes an.odtpackage directly (fixed entry order and timestamps, so the output is deterministic) and processes it with the facade. It covers placeholders, a date format, markdown, if/else around paragraphs and a bulleted list, a list-item loop, a table-row loop with a header row, and a footer placeholder.examples/templates/libreoffice-letter-template.odtandexamples/outputs/libreoffice-letter-output.odtare committed. I checked the output with LibreOffice 25 headless (txt and pdf): it renders correctly, with the footer, bold/italic markdown, bullets and table. The example READMEs are updated.--template x --data y.json) now usesTemplateProcessor, so--template x.odt/.ottworks. The default output extension follows the detected format, and an unsupported file is rejected with a clear message.Tests
TriasDev.Templify.Tests/Documentation/OpenDocumentSamplesTests.cshas 13 tests that mirror every sample and documented behavior on the new pages and README sections: file to file,.ott→.odt, bytes plusFile.OpenWrite, a Word template given to the ODT processor,DocumentPropertiesinmeta.xml, validation, the facade for docx/odt/ott,DetectFormatand position restore, an unsupported.fodt, typographic quotes, list-item loops, and an unmatched marker in a longer list.Tools.TestsExampleGeneratorSmokeTests: all generators are processed through the facade (the text reader handles ODT). There is a new theory that validates every generator's template with its sample data. It relies on the fix in fix(odt): ValidateTemplate no longer reports the markers of table-row and list-item blocks as unmatched (#138) #216, which this PR found. The PR also adds a content test and a determinism test forlibreoffice-letter.dotnet format --verify-no-changes,dotnet pack(package validation) andmkdocs build --strictpassed.Public API impact
None. This PR changes docs, examples, tools and package metadata only.
Refs #138