Markdown import question

Yeah, sorry, I wasn’t really providing much data about my particular case, just asking if anyting had improved. The process I’m using starts with a PowerShell script (from a GitHub repo) that converts OneNote notebooks to Word files (of all things) and then uses Pandoc to generate Markdown. There’s probably a lot I could tweak and don’t yet understand, but even with a little poking it’s a decent first pass at getting my raw content out of OneNote, which is helpful.

Having said all that, I’ve attached a screenshot the highlights one of the converted notes and the various Markdown I’ve tried to get the images working. The conversion tool gives me the option to put all linked media in a single, root-level media folder for each notebook or create a media folder under each subfolder where media is found. I chose the former for this conversion attempt and then imported the resulting folder into a new DT database. In that database, the markdown note itself is in a root-level group named “General” while the image referenced is in a root-level group named “media”. You can see from the image that I can copy the image to the same folder and use its simple name, or I can give the absolute reference to the imported media file, but the one thing I can’t get working is the relative reference.

That’s a short-coming of DT’s MD interpretation, afaik. And it is not about “relative” vs. “absolute” references (media/something.png would work if media were a group below the one containing the MD document) but about “parent” references (../).

Which makes kind of sense, I think. Imagine you have a MD file in your global inbox – what would ‘…/foo.png’ refer to? There is no parent element to the global inbox. That’s different from the file system, where /../ is the same as /. DT’s hierarchy of groups sometimes looks like a file system, but it isn’t one.

So you just have to stick with what DT provides. I’d suggest putting MD documents and the images they refer to into the same group.

1 Like

That is, of course, the one option the conversion tool doesn’t offer, but that’s what I was thinking. I just have to find the time to write some scripts for it.