Can you convert a WikiLinks to an item link?

In DT3, I am working with a RTF document, and have Automatic WikiLinks enabled. So I can easily create new wikiLinks by selecting some text, and choose “make link”. When I click that link, it creates a new document and links to it.

But once that link is created, is there an easy way to convert that wikiLink into a more stable item link (“x-devonthink-item://…”)?

I wish to do this because while wikiLinks are handy for quickly making a link, they are too easy too break (any edit of the text, breaks the link to that document).

1 Like

The only ways are to e.g. drag & drop the destination item into the source item while pressing the Command-Option modifier keys or to use Edit > Copy Item Link for the destination item and paste the link into the source item. But there’s no feature that automatically converts the links.

Aliases might be useful sometimes to avoid this.

OK, thanks. That’s what I’ve been doing. IT’s clumsy, but works. I may just avoid using wikilinks and do my links manually, so I know they are “solid”.

Thanks.

I’d been thinking about this as well over the last months or so (in part after reading Dini’s book on using DT as a knowledge manager) – didn’t know that conversion between the two is tricky.

Starting on a new set of notes, I also opted for manual hard links wanting ‘solidity’ – but I find the process rather cumbersome and particularly in a note-taking environment with many short notes and many links between them, managing and copying the items links became too unwieldy and time-consuming. I don’t have Keyboard Maestro and am aware that you can automate getting the item link, but still … it sort of halted my flow in its tracks.

My current solution has moved across to Obsidian which also has the wiki links [[xxx]]. The app automatically updates links if you change the title of a file and that seems very solid (so no aliases needed). The only place for an item-level link at the moment is in those notes where I refer to PDFs (primary sources) stored elsewhere in DT. I index the Vault (containing nothing but markdown docs) in its own DT database now, periodically, and it retains those live Wikilinks (so navigation is the same, and in DT I can then still leverage the power of say smart groups). Tags are also imported across (when the 'convert # to tags option is switched on in DT settings), so I get the best of both worlds – the flexibility, speed, and visualisation of Obsidian, and the long term storage and additional functionality from DT.

It’s early days, but this works a treat for me at the moment.

If you are any good at AppleScript, you may find something useful in these two AppleScripts which I wrote to address this issue as part of my kind-of-Zettelkasten system. Horribly written, poor error handling etc etc. But the one looks for documents of certain file types with the same name and then writes the link into the selected text of the RTF, while the other gets the link of the rightmost open tab and writes that into the RTF. (Haven’t really used these much in DT3.) Maybe you can create something from this that helps!
J
WikiLink fixers.zip (22.9 KB)

1 Like