Skip to content

onlyworlds 0.37.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 08:18
· 471 commits to main since this release
  • The Kanka door (onlyworlds.kanka): import_kanka(source, out_dir, plan_only=False) and python -m onlyworlds.kanka EXPORT.zip OUT-DIR [--plan] read Kanka's JSON export (Campaign, Settings, Data, Export; the zip or the directory it unzips to) into a world folder written through write_folder. No AI, no account. The first door with a real export behind it: Kanka 3.15's file of a test campaign typed in Kanka's own editor on a free account, banked as tests/fixtures/kanka/ (8,676 bytes; a check found no key, token, mail or session in it). Proven on that file: a module folder per type (characters/, locations/, notes/, organisations/) of one JSON per entity, the module's row with an entity object (entry HTML, parent_id, relationships, posts, entityLocations, entityAttributes); the two numbering systems in one file (a child's entity.parent_id, a relationship's ends and an [entity:N] mention name entity ids, a row's entityLocations names a Location's row id). What becomes what (the schema owner's table for a staged converter): characters Character, locations Location, organisations Institution, notes Narrative with the text in story; families, races, items, creatures, events, abilities, quests, journals and maps their types (believed, not yet in a file); any other module a Narrative with supertype kanka. The entity's type is the supertype. The entry HTML becomes Markdown, a mention the entity's name (and x_kanka_mentions), posts follow it under ## <post name>. parent_id lands on the type's own parent field (parent_location, ...); entityLocations on location/locations; appearance and personality traits on physicality and mentality (is_dead as the [Deceased] prefix, believed); an attribute named like a field fills it when the value fits. A relationship is a Relation named by its text, actor the owner Character; a two-way pair (rows naming each other as mirror_id) is one Relation. Every key not placed is kept as x_kanka_<key> and listed in the report. Exact duplicates fold into one (two relationships, posts, traits or attributes on one entity equal in all but ids, positions and times), each fold named in the report; anything that differs is kept. What the source hides, the folder hides, never dropped: a private entity is its element with hidden: true; a post not visible to all on a visible entity is its own hidden Narrative linked to the entity; a relationship hidden on a side, or touching a hidden entity, a hidden Relation; a visible entity's private traits, hidden attributes, private list items and personality traits not visible to players go into one hidden Narrative, <name>: hidden details; each kind counted. Starter entries travel: nothing in the data marks Kanka's seeded entries (is_template false, created_by the person's own), so they are imported, and the report names the ones made within five seconds of the campaign as possibly starter content. Ids are UUIDv5 in KANKA_NAMESPACE of kanka:<campaign>:<entity id> (Relations :relation:<id>, hidden posts :post:<id>, hidden details :hidden:<entity id>), so the same export twice gives byte-equal folders. world.json carries producer {"tool": "onlyworlds", "version": ..., "input": "kanka-export"}, a word new to the folder spec's list.
  • The real file becomes 14 elements: the campaign's 2 Characters, 2 Locations (The ferry crossing's parent_location The quay), 1 Institution and 1 Narrative; Kanka's 4 starters; one friend Relation for the two-way pair made twice (two pairs folded into one), the starters' one-way Relation; and two hidden Narratives holding the starters' personality traits (is_personality_visible false). The dist's folder lint passes it except for one line per hidden element: the lint does not know the hidden key yet; with nothing hidden it is green. Tests on the real file and on variants of it (a private entity, a private post, attributes): counts, the parent, the one Relation, the folds and a near duplicate kept, the starters named, each hidden kind, the lint, two runs and the unzipped directory byte-equal, the round trip, --plan writing nothing. 22 mutants watched failing, one per rule.
  • push withholds an element hidden only in the folder (ruled 2026-10-23): keel takes the hidden mark only through PUT /{type}/{id}/hidden, never in a write body, so an element whose folder copy carries hidden: true and whose baseline copy does not is left out of the diff, nothing sent, and named in PushPlan.hidden and PushResult.hidden. A folder and a baseline that both carry the mark patch as before. The doors that write the mark (Kanka from this release) cannot have it published by a patch; after keel takes the mark on a create, the push sends it.
  • patch_world also strips counts, which a keyless GET /world carries and PATCH refuses as unknown, so a keyless read's body goes back too (2026-10-23).