mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
An export used to lose what plain files cannot carry: dates, names as typed, the boards. It now writes .workspace.json beside the tree (format 1), and an import that finds one restores them. The markdown stays plain, so the archive still reads without the application. POST /api/import (:import! / in the UI) imports at the root: each top-level directory becomes a space, or merges into the space already there by that name, with its board and cards and the diary role. With a manifest, media/ comes back as embedded files rather than a folder, a file whose name ends in .md stays a file, and empty folders come back. Export claims every path in one set, folders, then documents, then files, so a file named notes.md beside a document notes no longer makes a duplicate entry that failed the whole zip. Links to folders are rewritten like links to documents, in one regex pass per kind instead of a replace per file and document. A sealed file that will not open now fails the export instead of being left out silently. The temporary zip is made in the data directory, not in /tmp.