Creating a folder structure from Mindnode

I have created my JD system folder structure in MindNode and am wondering how I can import it into Bear app or Obsidian as an index using method 1. So individual notes for every ID. If I have to rewrite everything its painful and copy paste is not much of a time saving,

Also

How do I change my MindNode into a folder structure onto my computer?

You can export from MindNode a couple of ways. All via File > Export To >

Here’s a quick mind map, let’s see what we can do with it.

Markdown

The first useful thing in the list is File > Export To > Markdown. There are no further options, so Export... and let’s see what we have.

# My system

## 10-19 Life admin

### 11 House
- 11.01
- 11.02
- 11.03

### 12 Finance

### 13 Motor
- 13.01
- 13.02

### 14 Health

### 15 Travel

## 20-29 My hobby

### 21 Research

### 22 Promotion
- 22.01
- 22.02

### 23 Sales

## 30-39 My side-hustle

### 31 Build it

### 32 Ship it

That’s pretty good, and will import in to Bear (just copy/paste it) really nicely. If you’re on the latest version of Bear, those headers can now be folded using the little triangle to their left.

Plain text

You can also File > Export To > Text > Plain Text. That gives us an indented version of the same.

My system
	10-19 Life admin
		11 House
			11.01
			11.02
			11.03
		12 Finance
		13 Motor
			13.01
			13.02
		14 Health
		15 Travel
	20-29 My hobby
		21 Research
		22 Promotion
			22.01
			22.02
		23 Sales
	30-39 My side-hustle
		31 Build it
		32 Ship it

Also not bad, but Bear won’t recognise that as anything special. You may prefer this? Put it in a code block?

Creating file system folders

This is where our friend @SwissArmyWrench comes in. Does johnnybgoode do this? If not, could it?..

Thanks for the ping, Johnny!

Right now, johnnybgoode can’t do this, but there’s no reason it couldn’t! Since I am already planning on building code that would allow you to export in all kinds of formats, such as your own index format you designed, plus JSON, YAML, TOML, etc, there’s no reason I couldn’t also write that code in such a way that it could read in structured data and then recreate the folder structure based on it!

I had never even considered that this would be an option some people want, but now that you mention it, it wouldn’t be a bad idea!

1 Like

I would be very grateful for this because, Mindnode is excellent at planning folder structure out.

It was painful to place Johnny Decimal index numbers into it manually, But if there is code that would do that also that would be good also.

How good are you with Excel? I’ve just realised the ā€˜quick ā€˜n dirty’ way that I would do this.

I’ll type it out, and if you know what I’m on about it’ll make sense. But I can do you a video later if you like as well, just let me know.

So, export-as-plain-text from Markdown. Now you have a file with one line per folder that you want to create. Bring that in to Excel.

Now use your Excel wizardry to build the full path to each of your IDs, like

10-19 Area/11 Category/11.01 ID

…using lookups and CONCAT and so on.

And now just CONCAT your way to a command that will create those folders:

CONCAT("mkdir -p ", cell_containing_folder_path)

The -p tells mkdir to create the full path. So you don’t need to create area & category folders first.

If that’s all voodoo to you just let me know and I’ll put together an example sheet. It’s a bit hacky (it’s heaps hacky) but it works really well for this sort of thing. And I like that you can see exactly what command you’re going to paste in to the terminal vs. running some script and crossing your fingers.

Thank you Johnny!

I think a video will definitely help, lookups are not intuitive for many.

I’m at the library this morning, will knock something together when I get home mid-afternoon.

3 Likes

I have found that pasting the indented structure into Claude or another GPT and asking for a bash command to create the folder structure has worked well for me at least once.

@Kelso Just checking in that you achieved your goal? Let us know if you’re still in need of help.

Thank you, yes that helped and I also have another method from a colleague, which I will share

1 Like

@johnnydecimal This is a really useful video, but try as a might, I cannot get the echo command to work whereby it places the created file in the required folder. Any ideas what I might be doing wrong?

Also, I had to change a few things in my entries, which was throwing the directory structure off, such as using a ā€œ&ā€ in titles.

Can you paste it (the not-working command) here? Happy to have a look.

Stick it between two `` backticks like this so any special characters are left as-is.

Here is the Excel formula I’m using

=CONCAT("echo # ", [@[ID/Desc]], " > ", SUBSTITUTE([@[ID/Desc]], " ", "\ "), ā€œ.mdā€)

Which results in something like this…

echo # 50.00 JDex for Genealogy :card_file_box: > 50.00\ JDex\ for\ Genealogy\ :card_file_box:.md

Pasting this creates the file, but at the root and not in the JD structure I created.

Okay, so without any file path in front of the name of the file, that’ll create the file at the same location that your prompt is at, i.e. the root.

What does your structure look like? We’ll need to modify the CONCAT to add it to the front of that file path.

Or to be honest this sort of thing is sometimes quicker just done manually. Like if you’ve only got to move 50 JDex files from the root in to a category folder, just drag them over. That’d be more time-consuming if you’ve got a folder for every entry.

I have a folder per entry so about 260 entries across three areas, so I’d really rather not do them manually if possible. I’m just not sure how or where to define the path.

I’ve figured it out using a single command to create both the file structure and the .md file at the same time.

=ā€œmkdir -p ā€œā€ā€ & F3 & ā€œā€" && echo ā€œā€# " & E3 & ā€œā€" > ā€œā€" & F3 & ā€œ/ā€ & E3 & ā€œ.mdā€ā€œā€

1 Like

Nice!