djsudduth / mindmap-markdown

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

Errors during conversion. #1

Closed Hela-Girl closed 8 months ago

Hela-Girl commented 8 months ago

Hello. I did everything according to the instructions, but there were errors when converting files, perhaps the versions do not match? Can I send a file for testing, maybe you have no errors?

https://i.imgur.com/BPBzgzD.jpg

djsudduth commented 8 months ago

@Hela-Girl - looking at your error, I see you're running mindmd in default mode python mindmd.py without any switches or inputs . So I assume you modified the settings.cfg to point to your files. But, I also see that the image filename is definitely missing -> images/12b732dac57***89.png5d4e70f66******6f.png. The the copyfile command is failing on that.

I've made a change in the code to print out a warning message about any missing images and keep going to finish the conversion. Download the program again (or, just download mindmd.py) and run your mindmaps again. Be sure to save your current settings.cfg before downloading the updated program so it doesn't get overwritten.

djsudduth commented 8 months ago

@Hela-Girl - I just tested the latest Windows 10 version with images and it worked fine. So, I'm assuming it is one of your images that may be the problem in your mindmap.

Hela-Girl commented 8 months ago

https://i.imgur.com/zCevgSa.jpg

  1. In this version, I couldn’t find many images, although they are all there in the “images” folder.
  2. It would be nice if at startup it showed the script build version (https://i.imgur.com/Bmt9HNl.jpg)
  3. How can I configure the configuration file so that the “images” folder is at the same level as the output file RR.md?
  4. I would be very grateful if you could specify in the settings whether the input file will be “list” or “canvas” (since now what is created after conversion, I will spend weeks on formatting (https://i.imgur.com/cBlnURT.jpg https://i.imgur.com/Mo2jA8M.jpg))
djsudduth commented 8 months ago

@Hela-Girl I deleted the link. I really don't appreciate the offensive images in your mindmap. I can't help you if send things like that. I'll look at your suggestions.

djsudduth commented 8 months ago

@Hela-Girl thx for the new file. I see a few issues already with the script. You use images in a way I don't and I'll fix that.

Hela-Girl commented 8 months ago

Happy Holidays !

djsudduth commented 8 months ago

@Hela-Girl thx! Same to you. Looks like all is fixed now. The 2 errors - bad / missing title and multiple images linked from a node are now working. Again, either just download the mindmd.py file or download the zip file to a new directory and try it again. I'll add script versions, etc. later.

PS: to have your images at the same level as your .md files, use this setting: media_path = /

Hela-Girl commented 8 months ago
  1. If you specify the path to the pictures as you specified, “media_path = /” does not produce errors. But the pictures are now saved in the root of the "markdown/" folder and also saved in the "images/" folder.
  2. If you specify the default path "media_path = media/" then the script does not find images although they are there. https://i.imgur.com/t2rVEKj.jpg
  3. I tried to specify the path relative to the "markdown" folder so that the pictures would be in the "markdown/27.12.23/" folder. But unfortunately, this also caused an error that there were no images in the required folder. https://i.imgur.com/I9jny4V.jpg
  4. According to the conversion result, "Obsidian" does not see a single picture ( https://i.imgur.com/9iZOOde.jpg

Please correct these errors.

djsudduth commented 8 months ago

@Hela-Girl The images/ folder is a temporary working folder for the smmx file un-compression - so you can ignore that folder. For #1 - you had asked how the images could be in the same directory as the markdown - so that worked For #2 - using media/ worked for me - the images are in the media folder with no errors For #3 - that failed - probably a problem with "." in the directory name - that's unusual - I'll look at that For #4 - you have to set the Obsidian media path and the mindmd settings paths to the same (unless you're using the periods in the directory name).

Be sure you downloaded the fixed version for #1 and #2

Hela-Girl commented 8 months ago

Is it possible to get not .md but .canvas as output? Can this be added to the settings?

Hela-Girl commented 8 months ago

For #3 - https://i.imgur.com/gYwSici.jpg No, this problem is not due to "."

djsudduth commented 8 months ago

@Hela-Girl - For #3 the directories have to exist (both the output and the media paths) or it won't work. The script doesn't create them for you at this point. So, for the example: output_path = 271223/ media_path = media/ Both the directory 271223 and 271223/media have to pre-exist before conversion. Then it works fine.

In your example image, your main output path is appended to your download path: c:\Users\MaX\Downloads\111\mindmap-markdown-main\markdown But, your media path has the root directory \ - so the media directory is: c:\271223 If you want it under markdown then set media_path = 271223/ without the leading / (or \ for Windows - be sure it exists already)

For Obsidian on Windows , here's what I use: output_path = C:/Users/d32911/Documents/Obsidian/Inbox/ media_path = ../images/ The ../ will move up one directory to be at the same level as Inbox - C:/Users/d32911/Documents/Obsidian/images/ vs C:/Users/d32911/Documents/Obsidian/Inbox/images/

Hela-Girl commented 8 months ago

I'll try now. Is it possible to get not .md but .canvas as output? Can this be added to the settings?

djsudduth commented 8 months ago

@Hela-Girl - canvas isn't supported yet. That will be in updated versions.

Hela-Girl commented 8 months ago

Well I'll wait. Thank you for your help.

Hela-Girl commented 8 months ago

@Hela-Girl - Для №3 должны существовать каталоги (как выходные, так и медиа-пути), иначе это не будет работать. На данный момент сценарий не создает их для вас. Итак, для примера: output_path = 271223/ media_path = media/ перед преобразованием оба каталога 271223 и 271223/media должны существовать. Тогда все работает нормально.

В вашем примерном изображении ваш основной выходной путь добавляется к вашему пути загрузки: c:\Users\MaX\Downloads\111\mindmap-markdown-main\markdown Но ваш путь к мультимедиа имеет корневой каталог \, поэтому каталог мультимедиа: c:\271223 Если вы хотите, чтобы он был ниже markdown, установите media_path = 271223/без начального / (или \ для Windows - уверен, оно уже существует)

Для Obsidian в Windows я использую вот что: output_path = C:/Users/d32911/Documents/Obsidian/Inbox/ media_path = ../images/ переместится ../на один каталог вверх, чтобы оказаться на том же уровне, что и Inbox — C:/Users/d32911/Documents/Obsidian/images/противC:/Users/d32911/Documents/Obsidian/Inbox/images/

  1. Yes, it works as you described, if it doesn’t bother you, please add it to create folders if they don’t exist. I will be very grateful.
  2. In the meantime, I edited the “Obsidian” file by hand and it worked in the “Obsidian” program, thank you for your wisdom. (https://i.imgur.com/mRJplae.jpg) I'll be looking forward to the conversion to *.canvas.
Hela-Girl commented 8 months ago
  1. And another strange thing is how it works:

[SETTINGS] input_path = mindmaps/ output_path = markdown/ media_path = 271223/ test_file_name = Rain-game.smmx

  1. But if I add subfolders “images/Rain-game/271223/” this doesn’t work:

[SETTINGS] input_path = mindmaps/ output_path = markdown/ media_path = images/Rain-game/271223/ test_file_name = Rain-game.smmx

djsudduth commented 8 months ago

Subfolders worked for me - be sure the directories exist. Your media full path will be: c:\Users\MaX\Downloads\111\mindmap-markdown-main\markdown\images\Rain-game\271223\

Hela-Girl commented 8 months ago

thx, a lot!!!!!!!!!!

Subfolders worked for me - be sure the directories exist. Your media full path will be: c:\Users\MaX\Downloads\111\mindmap-markdown-main\markdown\images\Rain-game\271223\

thx, a lot!

djsudduth commented 8 months ago

@Hela-Girl glad it worked out and very glad you've tried the script and found some things to fix!

Спасибо за помощь!!

djsudduth commented 8 months ago

@Hela-Girl - PS, if you find any other problems - please open issues for those. Thx!