Export pure markdown notes without internal-links

In order to remember my notes I have a strong need to copy them from Obsidian into Anki. Since my notes have a lot of internal-links, they are very powerful, but they are not valid information for Anki or other text editor.

It would be very very nice if Obsidian could export pure markdown notes with no bidirectional links. I think this feature will be more existential with the new version introducing block references, and I can expect users to generate a huge number of block reference ids, while these links are useless information for other software.

Feature description
Notes from Obsidian:

  • This is a note linked to [[Note-2 | another note]]

Pure markdown notes exported:

  • This is a note linked to another note.
1 Like

There is a workaround.

You could export your md file as another one without internal-links via the simple python code. (It could be any program language with regexp.)

# let [[Link Name]] ==> Link Name,  [[Link Name|Altr Name]] ==> Altr Name
text = re.sub("\[(?:\[|\[[^\]]*\|)([^\]\|]+)\]\]", r"\1", text)




I tend to write blog posts in Markdown, and then copy/paste into my blog editor. I thought about an intermediate step where I copy the post text to my clipboard, then run a Python script on that text to remind the wiki links, and output the “cleaned” content back to my clipboard.

Your code snippet will be super useful. Thank you.


wow! This method is very easy and impressive, thank you very much!!

1 Like

did you create the python script in the end?