ryanjamurphy/DEVONlink-obsidian

[Feature request] Possibility to insert related links as DT URL scheme

Opened this issue · 4 comments

Thanks for this plugin! This is a great addition to Obsidian!

Request

Option to add related links as [name of the file](DT-URL scheme)

Use case

Useful when DT database contains resources that aren't in the Obsidian Vault
I would like to use those resources as inspiration for new notes.

DT links don't count as a link in the graph or backlink. This may be important for someone who curates their connections, it is really easy make too many connections and clutter things

Thanks for capturing this here!

Thinking out loud:

  • This feature request could be implemented via either a preference ("Use wiklinks" vs. "Use x-devonthink-item links") or a command ("Insert related items with x-devonthink-item links").
  • It would also be nice to allow the "See Also" results to share items that aren't in the same database as the notes. (Currently, the results are limited to only related files in the same database as the note you call the command on.)
  • However, there's a weird preferences conflict here. If I add support for a "Pull related items from the notes database only" vs "Pull related items from all databases" preference, the latter should always use x-devonthink-item links. I'm not sure of the best way to represent this set of conditions.

This could be decoupled:

  • action that is triggered by the plugin button and its settings
  • and command palette actions (and the command palette could offer more flexibility)

For example in settings (the wording might be more polished):

  • Ribbon button actions stays the same as before with only 3 actions:
  • you need to add two additional toggles:
    • when inserting a link, use wiki links [[ ]] instead of x-devonthink-items for notes in Obsidian database (toggle on and off), I don't know maybe better is to set [[ ]] as default here
    • pull related links from all opened DevonThink databases (toggle on and off), and the default may be set to off
    • the default behaviour will reproduce the behaviour as it is now, but the user could switch toggles to extend it

And in command palette, you could have 3 actions instead the one you defined now

  • Devonlink: Insert related items from all Databases (this will inherit user toggle settings use wiki links [[ ]] from above)

  • Devonlink; Insert related items from local Onbsidian DT database as x-devonthink-items

  • Devonlink; Insert related items from local Onbsidian DT database as wikilinks [[ ]]

  • these two palette actions above may be actually merged, they may inherit the setting from above too, having them both give a user more flexibility but frankly maybe only one action for local links is sufficient

@ryanjamurphy if you still thinking about how to implement the mechanic of inserting different actions you may look into periodic notes, the latest release use right-click on the ribbon to allow executing different actions

For now, I've provided a setting to switch between wikilinks and x-devonthink-items in the plugin's settings.