guides export/import bundles

This commit is contained in:
2026-08-27 11:47:01 -04:00
parent 28798e6a32
commit d38a599292
4 changed files with 469 additions and 6 deletions

View File

@@ -22,6 +22,19 @@ ADR-007 and ADR-002.
tables; in self-hosted mode one stored loan expands into a take and a return,
so a returned drive is distinguishable from one still out.
- **`flask guides export` / `flask guides import` - a guide can reach another
site.** Sites are separate databases and the ones that matter are air-gapped
from wherever a guide gets written, so a procedure written once was stranded
where it was typed. Export writes one `.guide.json` per guide with its images
carried inside it - one file, because a bundle that needs its images copied
alongside it is a bundle that will eventually arrive without them - and
import reads them back. The slug travels, since that is the address somebody
pastes into a work order and the same guide should answer to the same name on
every site; ids, revision history and publication state do not, because those
belong to the database that issued them. Imports arrive as drafts;
`--replace` updates a guide already carrying that slug rather than creating a
second one, which is how a corrected guide is re-shipped.
- **`flask guides import-html` - an existing HTML article becomes a guide.**
A site adopting this app arrives holding procedures already written: styled
HTML pages that get mailed around and opened off a share. Retyping one into