Repository navigation
Conversation
FreeMind's .mm is the de facto open interchange format for mind maps, so Cartocortex reads and writes it. Reading is the strict XML parser from the old .xmind files (no DOCTYPE, predefined entities only), on plain and gzipped files: texts (richcontent keeps its line order), notes (richcontent and the old map/Note hook), links, links between topics (arrowlink), folding, fill and text colour, bold / italic, priority (full-N) and progress (0%-100%) icons. Left-side top-level topics open as a logic-left or two-sided map. Writing goes the other way (Save as .mm and a new "Export FreeMind" button): one root node per sheet, so extra sheets may not show in FreeMind itself, and structures beyond the sideways layouts, pictures, relationships, summaries, per-word style and floating positions are not carried. The xmindxml entity decoder is exported for the reader. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
The first commit of this branch wrote App.tsx and README.md with the parts it did not mean to change double-encoded: every non-ASCII character (the command-key shortcut signs, arrows, ellipses) had become mojibake. Both files are rebuilt from main with the same .mm edits, so the branch now only changes what the FreeMind support needs. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
MindManager keeps its maps in a zip holding Document.xml (X5 and later;
the Mac builds of MindManager 10 wrote flat XML), and Cartocortex now
reads and writes that. Reading is the strict XML parser from the old
.xmind files (no DOCTYPE, predefined entities only): texts, notes (the
XHTML note and its plain-text preview), links, task priorities (Prio1-9)
and progress (TaskPercentage), fill and text colour ("aarrggbb", alpha
first), folding, relationships (as the map's relationship lines),
floating topics and callouts. The growth direction of the central topic
opens as a logic-left, logic-right or two-sided map. Writing goes the
other way (Save as .mmap and a new "Export MindManager" button): one map
per sheet, so extra sheets may not show in MindManager itself, and topic
links to other topics, pictures, per-word style, boundaries and
summaries are not carried. The unzip of the .xmind reader is exported
for the .mmap reader.
Agent: Vibe (Mistral, glm-5-latest-short)
Relu-par-humain: Martin-PB
WiseMapping keeps its maps as plain XML (the current "tango" dialect and the older "pela" files), and Cartocortex now reads and writes that. Reading is the strict XML parser from the old .xmind files (no DOCTYPE, predefined entities only): texts (a single-line attribute or a multi-line block), notes (the CDATA note and the percent-encoded attribute of the old files), links, fill and text colours, bold and italic, shapes (box and line), folding, the map's relationships (as relationship lines) and its free branches (as floating topics, positions kept). The side a topic sits on comes from its position, so a left-leaning map opens as Logic (left) and a two-sided one as a map. Writing goes the other way (Save as .wxml and a new "Export WiseMapping" button): the first sheet is the map and the sheets after it are WiseMapping's free branches, with positions worked out from the tree shape; markers keep their emoji, but priorities, progress, pictures, per-word style, boundaries, summaries and topic links are not carried. The format was taken from WiseMapping's own serializer and importer, and has not been checked against WiseMapping itself. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
Mindomo Desktop keeps its maps as zips of JSON parts, and Cartocortex now reads and writes that. Reading walks nodes.json: titles keep their line breaks, folded topics stay folded, a topic's video or web address opens as its link, the map's relations open as relationship lines, and topics the file marks as deleted (and everything under them) are quietly skipped; the map named in document.json opens as the first sheet, and any other parentless topic in the file opens as a sheet of its own. A file that is not a zip is refused, with a note that the older Mindomo XML is not read. Writing goes the other way (Save as .mom and a new "Export Mindomo" button): one map per sheet, with fresh ids, the chain of brothers kept in order and the relationship lines written back. Notes, colours, markers, priorities, pictures, per-word style, boundaries and summaries are not carried, and .pmom files are not read. The format was taken apart from files saved by Mindomo Desktop 11, and has not been checked against Mindomo itself. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
iThoughts keeps a map as a zip holding one mapdata.xml, and Cartocortex now reads and writes that. Reading walks the nested <topic> elements (wrapped in a <topics> element the way iThoughts writes them, or straight inside <iThoughts> the way MultiMarkdown writes them): titles keep their line breaks, notes travel along, and a topic at the top level besides the map's own opens as its own sheet. A file that is not a zip, or a zip without mapdata.xml, is refused with a clear error. Writing goes the other way (Save as .itmz and a new "Export iThoughts" button): one map per sheet, each topic with a fresh uuid and its note, and a leaf closing itself the way iThoughts writes one. Colours, icons, images, hyperlinks, task info, folding, floating topics and sheet names are not carried, and the old iThoughtsHD .itm files are not read. The format was taken from what iThoughts writes (as documented by toketaWare and the iThoughts community) and from MultiMarkdown's own exporter, and has not been checked against iThoughts itself. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
SimpleMind keeps a map as a zip holding document/mindmap.xml: a flat list of topics, each pointing at its parent by id. Open reads those maps (topics with their line breaks, notes, web links, task checkboxes and the map's relations), one sheet per mindmap in the file, and Export SimpleMind (and Save as .smmx) writes one mindmap per sheet. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
The reader drops relationships whose ends are missing, but the type checker still saw both ends as possibly undefined and refused the build; the filter now carries a type guard saying what it keeps. The FreeMind gzip test also compares the two reads without their fresh ids, the same fix the FreeMind branch already carries. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
TextDecoder skips a leading byte-order mark unless ignoreBOM is set, so the mark the writer puts in the file never showed up in the decoded string and the shape check could not pass. The decode now keeps it. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intention
Seventh format of the multi-format program: open and write SimpleMind
.smmxmaps, the same way the FreeMind, MindManager, WiseMapping, Mindomo and iThoughts formats were added. SimpleMind is a long-running, actively developed mind map app and its format is zip + XML, so it can be read and written without guessing.Réalisation
src/simplemind.ts(new): reader and writer. A.smmxfile is a zip holdingdocument/mindmap.xml: a flat list of<topic>elements, each pointing at its parent by id ("-1"for a map's own root), with line breaks inside a topic's text travelling as the two characters\N, and a file able to hold several<mindmap>elements.<!DOCTYPE simplemind-mindmaps>dropped (the strict XML reader refuses a DOCTYPE), one sheet per<mindmap>, tree rebuilt from the parent ids in file order,\Ndecoded,<note>child to a note,<link urllink>to a link,progress/checked/checkboxtask attributes to progress,<relations>to relationship lines,<meta><title>labels the sheet. A topic whose parent has not been seen opens as its own sheet. Strict errors: not a zip, nodocument/mindmap.xml, unexpected root, no topic.<mindmap>per sheet (extra sheets may not show in SimpleMind itself), fresh guids,textfmt="plain",\Nfor line breaks, notes, web links, task checkboxes, relations written back by numeric id, and the same BOM + DOCTYPE header SimpleMind itself writes.<children>), boundaries (<node-groups>), colours, positions, layout hints, dates, folding.src/simplemind.test.ts(new): 4 vitest tests - reads a map (flat list,\N, note, link, task checkbox, relation, sheet title); reads every mindmap of a file; refuses what is not a SimpleMind map; writes an.smmxand reads it back (BOM + DOCTYPE, escapes,\N, progress, relation).src/files.ts:smmxbranches ofdocBytes/parseDoc,"smmx"in the Open filters,SimpleMind (.smmx)in Save as.src/files.test.ts:plan.smmxround trip.src/App.tsx: "SimpleMind (.smmx)" in the export menu.README.md: SimpleMind paragraph (between iThoughts and the safety rule), Save as list, import rule.The reading follows a map saved by SimpleMind itself (the SimpleMind search tool's test fixture, decoded and checked in full) plus the SimpleMind MCP server's reader/writer; the writing follows the same shape, but has not been checked against SimpleMind itself.
Ce que l'agent a fait
Researched the format from three open-source implementations (pahund/simple-mind-search, including decoding its real
.smmxtest fixture down to the zip entry and CRC; BartRuSec/xmind2smmx, validated against SimpleMind Pro 2.4.0; kharabiner/simplemind-mcp-server), wrote the module, its tests and the integration, and verified everything in an executable sandbox twin (UTF-8 codec, zip/unzip and XML parser transcribed by hand): 35 behavioural checks green, round trip verified, files on the branch re-read from GitHub and compared byte-for-byte (no re-encoded characters, keyboard-symbol count unchanged).Vérifications humaines
npm testandnpx tschave not been run here (no Node in the sandbox); the branch carries no CI either (the workflow only runs onmainandfeat/*). The equivalent of the test suite was run in the sandbox twin, all green..smmxsaved by SimpleMind (ideally with several mindmaps, relations and task checkboxes) and re-opening a file exported by Cartocortex in SimpleMind itself would be the real check - SimpleMind still exists and is downloadable.mp-ithoughts-itmz).Agent: Vibe (Mistral, glm-5-latest-short) - relu par Martin-PB.