Export and import of single guides (#108) #118

Merged
miko merged 1 commit from feature/108-guide-export-import into development 2026-11-05 16:07:37 +01:00
Owner

Closes #108

  • Export: "Export" in the guide editor (everyone who may edit) downloads the working copy as a guide package: guide.json with formatVersion and the content as VersionContent, plus every image original and attachment under its storage key, streamed with fflate. No history, owner, visibility, wiki mode or menu entries.
  • Import: admins only, under "Import guide" in the admin menu or on a category page (category preselected). Creates a public draft of the importer without wiki mode, keeping the package's license. Content is sanitised like typed-in content (rich text, step lines, annotations, crops, attachment names; programs refused) and gets fresh ids and files. Newer format versions are refused with a message; max 500 MB.
  • Docs: ADR-0022 (format, designed for reuse by the instance backup #109), GLOSSARY "Guide Package", CHANGELOG.
  • Tests: unit tests for package read/write and import sanitising, e2e for export → import, permissions and refused packages. Full unit (506) and e2e (66) suites pass.

Known limits: content that cannot be imported (missing files, unusable images, executables) is left out silently; the reader holds the package in memory, so #109 will need a streaming reader for multi-GB backups.

🤖 Generated with Claude Code

Closes #108 - **Export**: "Export" in the guide editor (everyone who may edit) downloads the working copy as a guide package: `guide.json` with `formatVersion` and the content as `VersionContent`, plus every image original and attachment under its storage key, streamed with fflate. No history, owner, visibility, wiki mode or menu entries. - **Import**: admins only, under "Import guide" in the admin menu or on a category page (category preselected). Creates a public draft of the importer without wiki mode, keeping the package's license. Content is sanitised like typed-in content (rich text, step lines, annotations, crops, attachment names; programs refused) and gets fresh ids and files. Newer format versions are refused with a message; max 500 MB. - **Docs**: ADR-0022 (format, designed for reuse by the instance backup #109), GLOSSARY "Guide Package", CHANGELOG. - **Tests**: unit tests for package read/write and import sanitising, e2e for export → import, permissions and refused packages. Full unit (506) and e2e (66) suites pass. Known limits: content that cannot be imported (missing files, unusable images, executables) is left out silently; the reader holds the package in memory, so #109 will need a streaming reader for multi-GB backups. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Guides can be exported as a guide package: a ZIP with guide.json
(formatVersion and the working copy's content as VersionContent) and every
image original and attachment under its storage key, streamed with fflate.
Everyone who may edit a guide exports it from the editor.

Admins import packages under "Import guide" in the admin menu or on a
category page, into a chosen category, as a public draft of their own
without wiki mode that keeps the package's license. The content is
sanitised like typed-in content and gets fresh ids and files; packages from
a newer kataba are refused. ADR-0022 records the format, which the instance
backup (#109) is to reuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit d262c07c93 into development 2026-11-05 16:07:37 +01:00
Sign in to join this conversation.
No reviewers
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
MassiveDynamic/kataba!118
No description provided.