djsudduth / mindmap-markdown

Convert Simplemind .smmx mindmaps directly to markdown outline files or to an Obsdian canvas with all inner/outer notes, links, relations, images and connection labels for notetaking applications like Obsidian, Logseq, Notion and Joplin
Apache License 2.0
21 stars 2 forks source link

Errors on conversion #4

Closed kevin-gwyrdh closed 3 months ago

kevin-gwyrdh commented 3 months ago

Really like this. Simplemind is a great tool but I work a lot in markdown and yes you are right the export is not so good. The test file works fine. However I have these errors when using my own files

`$ python3 mindmd.py -i mindmaps/test.smmx -o markdown/test.md

Mindmap Markdown v-0.0.4

Mindmap: mindmaps/test.smmx ----> Markdown: markdown/test.md Traceback (most recent call last): File "/home/gwyrdh/Downloads/mindmap-markdown-main/mindmd.py", line 527, in main() File "/home/gwyrdh/Downloads/mindmap-markdown-main/mindmd.py", line 481, in main write_output(DEFAULT_MINDMAP, outfile, nums, vs) File "/home/gwyrdh/Downloads/mindmap-markdown-main/mindmd.py", line 362, in write_output sm_nodes = parse_mind_map(infile) File "/home/gwyrdh/Downloads/mindmap-markdown-main/mindmd.py", line 259, in parse_mind_map topic_node.guid = string_to_hexhash(topic.get('guid'), 16) File "/home/gwyrdh/Downloads/mindmap-markdown-main/mindmd.py", line 394, in string_to_hexhash hash_object = hashlib.sha3_384(alphanumeric_string.encode('utf-8')) AttributeError: 'NoneType' object has no attribute 'encode' ` Simplemind version is 2.4.0 running in linux under wine

Any ideas especially the obvious that I have missed would be much appreciated :-)

djsudduth commented 3 months ago

Hey @kevin-gwyrdh - can you send me either your smmx file or the expanded mindmap.xml in the document folder? The error seems to be caused by a mindmap node that is missing a guid.

Did the test smmx file HII Regions.smmx that I included work for you?

You can email the file to ... Thanks!

PS - you could also post a screen shot of your mindmap here so I can maybe see which node might be the issue. That's up to you if it is too private.

kevin-gwyrdh commented 3 months ago

Thank you @djsudduth I have emailed files. Your test smmx worked fine. I tried other mindmaps all hit similar errors. The files I emailed were the simplest ones.

Looking at the xml output I think you are right three nodes do not have guid.

Mindmap does not include top secret info :-) Added below

testmap

djsudduth commented 3 months ago

@kevin-gwyrdh - ok, I think it is fixed now. Download just the mindmd.py file and let me know if you run into any problems. Odd that you're missing guids on some of the nodes.

kevin-gwyrdh commented 3 months ago

Hi @djsudduth That works fine. Thank you. Only slightly wierd thing text at the bottom of the markdown doc which I am sure is not in the document!!

Appreciate the speedy fix :-)

djsudduth commented 3 months ago

@kevin-gwyrdh glad it worked. Relations are connections between nodes that aren't part of the mindmap tree. For example, you could connect "apple" directly to "farm" and put a text note on it. Take a look at the example smmx where there are 2 relations.

kevin-gwyrdh commented 3 months ago

Thanks. All good. Issue Closed :+1: