chrisgrieser / shimmering-obsidian

Alfred Workflow with dozens of features for controlling your Obsidian vault.
https://alfred.app/workflows/chrisgrieser/shimmering-obsidian/
MIT License
850 stars 41 forks source link

Feature Request: Copy Filename or paste note as a wiki link #109

Closed splnkr closed 1 year ago

splnkr commented 1 year ago

Feature Requested

Hello,

I would like to have the option to copy the file name. When using other programs (pdf annotation) I search via the plugin for potential links and paste the filename with Wiki-Links to refer to an obsidian note. My notes have zettel-id prefixes. Right now I copy via cmd+c, but I also get the file path within Obsidian.

Better for this specific workflow would be the feature to paste the found note as a wiki link in the opened application.

Kind regards, splnkr

Relevant Screenshot

No response

Checklist

chrisgrieser commented 1 year ago

Why would you want to have the wikilink though? The wikilink is only valid inside Obsidian, so it will be of no use for writing in outside apps. And inside Obsidian, you already get suggestions for wikilinks in the editor.

Maybe I am not following, but I do not see the use case for this?

kenanmike commented 1 year ago

image image

Hi Chris, I'm not @splnkr but just to throw in why it'd also be very useful for me: Let's say I'm annotating a journal article that in one bit nicely summarises Leibniz's thought. I hit my Shimmering shortcut and am able to paste my Leibniz wikilink immediately into my annotation on the article.

When I export my annotations to Obsidian, my comment in the literature note already links directly to the Leibniz page I have. That way without needing to have done any editing or processing, when I open the Leibniz page, through Strange New Worlds I already have linked into that a great summary of what he wrote from what I read just from exporting my pdf annotations. That way topic and people notes I have get populated effortlessly simply as I go through my normal reading of journal articles, and same for all the annotating on Kindle Books, podcasts, webpages I do via Readwise.

splnkr commented 1 year ago

Hello, yes the explanation from @kenanmike is the reason why I requested that feature. Also WikiLinks are not only supported in Obsidian. There exist a variety of programs now.

kenanmike commented 1 year ago

I've worked out a hacky way of getting the result we want by editing the 'External Script' of the 'Copy Markdown Link' : image Then click open file to edit: image

And then edit the last line look like this: image

Finally, all you need to do is add a utilities function of 'replace' between 'external script' and 'copy to clipboard' like this: image And fill in .md in the first box and leave everything else: image

And now it will copy the WikiLink of your file!

splnkr commented 1 year ago

Nice @kenanmike. Thank you very much for the customisation. It works really well!

chrisgrieser commented 1 year ago

I see. I added an option to copy a wikilink instead of a markdown link when using ctrl+return. Wikilinks work also with headings, btw :)

CleanShot 2023-03-03 at 20 49 19

(Since there currently is no update mechanism due to the wait for the Alfred Gallery, you have to update manually to 3.7.0: https://github.com/chrisgrieser/shimmering-obsidian/releases/tag/3.7.0 )