You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LegendKeeper door reads LegendKeeper's own export file (FileSource): python -m onlyworlds.legendkeeper --file EXPORT.lk OUT-DIR [--plan] [--project ID] [--map TAG=TYPE ...] and import_legendkeeper("EXPORT.lk", out_dir=...) read the .lk file (the JSON gzipped) or the JSON type, told apart by their first bytes, with no key and no account. FileSource answers the API's paths in the API's shapes, so read_project and the converter are the same on both roads and give the same elements. Proven on one real export (version 1, made 2026-10-23 on a Pro trial account, banked as tests/fixtures/legendkeeper/the-quay-world.lk, 44,653 bytes; a check found no secret in it). Where the export is not the API, adapted in the source: no project id or name (ids keyed on the first top-level resource in LegendKeeper's pos order, the world named by it; --project ID keys them on the project's own id, the API road's ids); the tree one list, a top-level resource with no parentId key; each document's content inline; a page's content the editor's own document (ADF-style nodes with type, attrs and marked text nodes) instead of the API's blocks, translated node for node (a block-secret extension is the API's secret block, block-youtube an embed, a panel a callout, a task's state DONE checked, a mention's attrs.id its resource); sidebar properties {id, title, type, data} (IMAGE, TEXT_FIELD, RESOURCE_COLLECTION, METER, SPOTIFY_SINGLE to the API's kinds; TAGS and ALIAS, which only show the row's tags and aliases, counted); a timeline's lanes and events inside its content, the events with no formatted dates and no sourceUri. exportId, exportedAt and hash are named in the report and kept out of the folder, so two exports of one project give one folder. The Markdown zip is not a source (it loses tags, properties, hidden marks and ids). world.json's producer.input is legendkeeper-export from the file and legendkeeper-api from the API, as before.
Templates are marked: a resource in LegendKeeper's templates folder (parentIdtemplates, seen in the export) carries x_legendkeeper_template: true, and the report names them. The tutorial pages a new project starts with are imported like the rest: nothing in the data marks them.
Behaviour change: what LegendKeeper hides comes in hidden, never left out (ruled 2026-10-23: what the source hides, we hide, never drop and never publish), on both roads. Until 0.37.0 hidden resources, documents, properties and events and secret blocks were omitted unless --include-hidden or --include-secrets was passed. Now a hidden resource, and every resource under it, is an element carrying hidden: true, its hidden pages and secrets kept in its own (hidden) text; a hidden page on a visible resource becomes its own hidden Narrative, <resource>: <page>, the page's text its story, linked to the resource's element (Narrative's field for its type, parent_narrative for a Narrative) and x_legendkeeper_parent; a Secret block in a visible page becomes its own hidden Narrative the same way, <resource>: Secret, the page keeping only its visible text; hidden properties on a visible resource go into one hidden <resource>: hidden properties Narrative; a hidden event, or one of a hidden timeline or resource, is a hidden Event; a Relation with a hidden end is hidden. A visible text that mentions a hidden element is named in the report. Hidden content is now fetched. Removed: include_hidden and include_secrets on import_legendkeeper and read_project, the --include-hidden and --include-secrets flags (argparse refuses them), and Omitted (the report's omitted is now hidden, a Hidden of counts). New ids: legendkeeper:<project>:document:<resource>:<document>, :secret:<resource>:<document>:<n> (the n-th secret of a page; the export gives a block no id) and :properties:<resource>. import_legendkeeper's project_id and out_dir take defaults (None) for the file road.
An empty collection, meter or embed property (a template's sidebar) is counted in the report instead of kept as an empty x_legendkeeper_<title>, on both roads; a collection with neither items nor a filter was kept as a filter of None.
Folder format v0.3.17 (§4.2's input list, RULED 2026-10-23: kanka-export and legendkeeper-api on it, legendkeeper-export narrowed to the file): FORMAT_VERSION moves to 0.3.17; nothing else a writer does changes. The Kanka door's docstring says its word is on the list.
The real file becomes 88 elements: 2 Characters, 1 Creature, 1 Location and 1 Event (the templates and the template-made Untitled typed by their tags), 52 Narratives (36 untyped resources, among them the six pages typed with their text; 3 hidden tabs; 13 Secret blocks), 29 Events (the tutorial timeline's 28, the Event template) and 3 Relations (a picked collection). 16 elements carry hidden: true. The dist's folder lint passes it but for one line per hidden element (the lint before schema-dist serial 53 does not know the key). The real .lk and the real JSON export give byte-identical folders (checked when built; the JSON twin in the tests is made from the .lk, the real one being 576 KB). Tests on the real file: the counts, the six pages and their text, the hidden tabs and Secret blocks as hidden Narratives and never in a visible text, the .lk and the JSON byte-identical, two runs byte-identical, --plan writing nothing, the lint, the templates marked, the editor document's translation, the timeline, a hidden resource and one under it (the file with one mark set), --project keying the ids, refusals, the command line. The API road's tests now find Aldric's secret as a hidden Narrative (one Narrative more in four tests), and test a hidden resource, a hidden subtree, a hidden page, hidden properties and a hidden event as elements carrying the mark; their lint test tolerates the hidden line as Kanka's does. 27 mutants watched failing, one per rule.