Export TheBrain to Obsidian, a small script

Honestly I just followed @Sander notes on his GitHub page. The key is that you need python3 installed. Which it turns out my modern mac did.

1 Like

Thank you so much for this script! I am a newbie to Python but once I got that installed it worked flawlessly. very grateful

Do you know how to export only one Type of Thought from TB though? For example I have Organizations and Persons as types in TB and I would like to make the same distinction in Obsidian. Unfortunately it appears that I cannot make a selection before I press export. Any ideas?

Good to hear that it still works. But to be honest, it’s been quite a while since I looked into TheBrain (and my script) and I have no idea how to do what you want… :thinking:

Thanks I have solved it differently: in the newer versions of TB the type of thought is a thought in itself, so by using a program like atom.io I could find&replace the [[type of thought]] to a #typeofthought for 16,000 files at once :sunglasses:

Hey Hey, Thank you so much for this script. Sadly it stops working after some files at my end. It gives this error

OSError: [Errno 22] Invalid argument: ‘./obsidian/Um effektiver zu werden stoppe die Zeit fürs Geschirrspüler ausräumen (unter 2 min?).md’

Is there something i can do? I cant really programm and after a google search it seems that maybe the “?” symbol is causing the error? Thanks a lot for your help guys :slight_smile:

Could it be because of the ü Umlaut?
You could try renaming that thought in TheBrain and running the script again.

Yes, it has to do with funky characters in filenames. I had a similar problem with attachments of notes, which had a ? or a : in the filename. You can avoid this by renaming the attachments before exporting from the Brain.
There’s a little helper tool in the Brain under File->Utilities->Perform Data Integrity Scan. It will show all the files which should be renamed to a safe filename