mindmap-markdown
mindmap-markdown copied to clipboard
Canvas
Good afternoon, Don! Perhaps you will have some free time this month to see how you can set up converting a file to *.canvas?
Perhaps this month you will have some free time to implement "Canvas"?
I've looked at it a couple of times. Much more complex than the mindmap. Requires positions and colors which will be a different parsing technique. It will be while before I can get to it - I have a couple of other open source projects to update first. Thanks for pushing though!
Thanks for answering. I'll wait, I have no choice anyway. Can I write to you in a month, maybe you’ll have a minute?
@Hela-Girl just wanted to let you know I had done some updates to fix some of the input/output-i and -o switches. Some of the code was lost in the process. I believe I recovered everything - but, be sure to make a backup of mindmd.py before you download the latest changes. I haven't looked at canvas additions yet. I will soon.
Thank you for making changes to the code. I look forward to the finalization.
** Mindmap Markdown v-0.0.2 **
Mindmap: mindmaps/Rain-game.smmx ----> Markdown: markdown/Rain-game.md
Traceback (most recent call last):
File "C:\Users\MaX\Downloads\111\mindmap-markdown-main\mindmd.py", line 414, in <module>
main()
File "C:\Users\MaX\Downloads\111\mindmap-markdown-main\mindmd.py", line 368, in main
write_output(DEFAULT_MINDMAP, outfile, nums, vs)
File "C:\Users\MaX\Downloads\111\mindmap-markdown-main\mindmd.py", line 270, in write_output
sm_nodes = parse_mind_map(infile)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MaX\Downloads\111\mindmap-markdown-main\mindmd.py", line 168, in parse_mind_map
topic_node.title = topic.get('text').replace('\\N',' ')
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'
So far, this is the error with these startup parameters: python mindmd.py -i mindmaps/Rain-game.smmx -o markdown/Rain-game.md
Sorry - when I re-added the code I missed a line. Just put a # in front of line 168 so it looks like this:
#topic_node.title = topic.get('text').replace('\\N',' ')
topic_node.title = topic.get('text')
if topic_node.title is not None:
(etc)
I'll fix it
@Hela-Girl - fixed
https://i.imgur.com/vqC3VaX.jpeg
Hurray it seems to be working. Thank you for your quick response. It's a pity that it's not canvas.
Hi @Hela-Girl - I'm starting to look at export to Canvas now. Can you provide to a link to one of your mindmaps - preferably somewhat simple but reflects what you want? I can't start with a huge mindmap - but, maybe one with 5-10 branches and some attached images in the way you like?
Thx!!
https://mega.nz/folder/I7pBSBgb#7b_h0svNZvcbbrByAoqIag
Thank you for not forgetting about me! The link contains 2 files, one very small and the second a little larger (with external files), for testing. Please note that the images are connected to the knot by invisible threads, in addition to the knots that are also connected to each other.
Thx @Hela-Girl - got them. One question for you. Your examples are more visual and probably don't need a markdown note for each node. In my case I do since my mindmaps have notes within each node and I want an Obsidian note for each. I'm wondering if you only need a canvas for visualization and no notes??
However, I do see one issue. If you need an image embedded in an Obsidian Canvas node, then you have to have a markdown note file that contains the image for that. But, if is just an image or box with a only title, then a markdown note file isn't needed. So, in your example 1.smmx, one image is within the Simplemind node - vs. the other images are outside - so I have to create a markdown file just for that one Simplemind node.
hi @djsudduth, I think the notes will be useful since I made the map specifically the simplest one for the test.
hi @djsudduth, do you have some time this month to try to implement the canvas?
Hey @Hela-Girl ! I made some progress but had to stop and fix another application. Good timing, however, I'm back at it! I'll let you know soon.
hi @djsudduth, maybe there will be a few days off in August to finish with the “canvas”?
@Hela-Girl - made some progress but having some issues to work through. I think I need to refactor the app (since it was a quick-hit need in the first place). But, let me see if I can at least get you a prototype to look at.
Good afternoon, can you spend some time on this thread this month?
@Hela-Girl sorry on the delay - I promise I'll get to it
@Hela-Girl I've created a new 'develop' branch to start the work. It isn't functional yet, but new Canvas code will be there until the release is done.
This is great news!
@Hela-Girl getting there...
Hello, great news! Does it support images?
Getting there soon...
Thank you very much for not giving up on what you started.
Closer - there are still some weird issues with what Obsidian supports vs SimpleMind
Wow, the beginning is already visible! This is the most important thing!
Ok, @Hela-Girl - first BETA version is ready for some testing. Please be gentle to start with some basic examples. Here's what you need to do:
- Don't install this in your current setup - use a separate directory
- Go to the branch here in Github called
develop - Download the entire
developzip file into a new testing directory and unzip it there (https://github.com/djsudduth/mindmap-markdown/archive/refs/heads/develop.zip) - The new switch to create the Obsidian canvas file is
-c(sopython mindmd.py -c) - If the -c is used, then every simplemind node becomes a new markdown note and the canvas file is given the 'output name'.canvas
- Run the default test of the sample file with
python mindmd.py -cwhich will give you an example - The files have relative paths in the new test directory. I would suggest running this BETA version outside of Obsidian directories and then just copy all the files from the default
markdownandmarkdown/mediadirectories to Obsidian manually. (If you just copy the parentmarkdowndirectory in the new BETA version install folder, and just paste in the Obsidian parent folder - that should work and you'll see it in Obsidian automatically)
Just to note - Simplemind does not have connections between images and nodes. Also, cross-connections or relations between nodes isn't done yet.
Also, this does not work with the batch output yet.
Let me know what you discover!
https://i.imgur.com/RlnCnju.jpeg and https://i.imgur.com/zxco0yo.jpeg
It works, but not all paths are there and there are a lot of extra files that probably also need to be processed somehow. Or maybe I configured something wrong...
https://mega.nz/file/4zJ2HQSD#bBl8bbF7DQ9X7RS2fZ_1kiuqXFlgxKMTkYmjzkgqrRI Link to file as an example.
Fix has been added. Download the latest in develop. You should change the settings.cfg to something like this:
[SETTINGS]
input_path = mindmaps/
output_path = betamarkdown/
media_path = media/
test_file_name = Rain-game.smmx
canvas_path = blank
Then, just copy the folder called betamarkdown to your Obsidian parent directory to test it.