Poor Man's Roam-Style Contextual Backlinks (Keyboard Maestro)
in The Archive
When this script is triggered, it creates a new note with all paragraphs that contain the search term, with a link to original document. It's very helpful when I'm trying to get a quick overview of what I've said about a topic.
Probably easier to see a visual. So this query (in the KM Marco):
Produces this file:
Here's the macro:
You of course need to update the path to your Zettelkasten Notes Folder.
Hope it's helpful to somebody.
Howdy, Stranger!
Comments
Sweet! Mind posting it to the macro collection thread with a short description? https://forum.zettelkasten.de/discussion/213/the-archive-keyboard-maestro-alfred-macros
Author at Zettelkasten.de • https://christiantietze.de/
VERY nice, though I will have to change "buffer" or it will drive me nuts. But each to their own! Thank you for posting this.
Edit: though I find that on my machine it does not produce any results. Will have to investigate. I'm presently on Catalina, which might be part of the problem. It seems to break all sorts of stuff.
@MartinBB I had the same reaction. Sounds great but it showed nothing in the note. A few small changes and its work wonderful.
brew install findutils
to get gxargs[[202001261947 Broken Top Reviewed]]
transformed into[[202001261947]] Broken Top Reviewed
Will Simpson
My zettelkasten is for my ideas, not the ideas of others. I don’t want to waste my time tinkering with my ZK; I’d rather dive into the work itself. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
kestrelcreek.com
Meh, I know there's a way to do this in just one sed with multiple capture groups, but how escapes me at the moment. Hackish solution:
@msteffens provided this a while ago in https://forum.zettelkasten.de/discussion/comment/3372#Comment_3372
Adding the title back after the link with another capture group:
Instead of the
ls
as input, you take the previous macro step.Author at Zettelkasten.de • https://christiantietze.de/
Yes absolutely!
Totally spaced about gxargs, you're exactly right, apologies and thanks for pointing this out.
Did you just 'Meh' my beautiful script?! Kidding. The sed command is obviously much simpler but I wanted the contents of my 'search results note' to be sorted by "Title, Z First" so the results would be in the same sort order as my archive.
I've tried to install this macro, and follow the other amends above, and it creates the buffer search document but I get results [blank], lines processed 0. Any ideas what I'm doing wrong, please?