Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 2.47 KB

README.md

File metadata and controls

70 lines (50 loc) · 2.47 KB

@deckyard/docs

test Documentation release

Read, edit and write word-processing documents in a Jennifer program: DOCX, ODT and RTF over one document model. Markdown, reStructuredText and MyST become documents through the bundled doctree, documents render to HTML and PDF, and {{name}} placeholders in a template from Microsoft™ Word™ or LibreOffice™ are filled without touching the rest of the file.

Documentation

Install

jvc add @deckyard/docs

This vendors the deck to vendor/<scope>/docs/. Without jvc, unpack the src/ subtree of a release archive (<scope>-docs-<version>.tar.gz) there.

Usage

import "@deckyard/docs/" as docs;
use fs;
use io;

def d as docs.Document init docs.fromMarkdown("# Notes\n\n- one\n- two\n");
docs.save($d, "notes.docx");
docs.save($d, "notes.odt");

def back as docs.Document init docs.open("notes.odt");
io.printf("%s\n", docs.plainText($back));

fs.writeBytes("letter.docx", docs.fillDocx(fs.readBytes("template.docx"), {"name": "Ada"}));

Requirements

Jennifer 0.29.0 or newer. No capability: every codec works on bytes; only open and save touch the disk, through fs. Not tested on jennifer-tiny.

Development

tools/check-all.sh                   # the full gate, as CI runs it
jennifer test src/docs_test.j        # the test overlay
tools/check-docs.sh                  # docs against the code
tools/pack.sh dist                   # build the release archive

Licence

LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <mplx@jennifer-lang.dev>.

tools/check-headers.sh checks every source file's SPDX header against deck.toml.

Trademarks

Microsoft™ and Word™ are trademarks of Microsoft Corporation. LibreOffice™ is a trademark of The Document Foundation. Other product and company names may be trademarks of their respective owners. They are used only to identify the products this deck works with. This deck is an independent project, not affiliated with, sponsored or endorsed by Microsoft Corporation or The Document Foundation.