August 23, 2020, 8:33pm
Thought this might be useful to some of the geekier users.
This is a bash one-liner (run from macOS Terminal in my case) that:
Creates a new note called “ΩΩ Link Cloud.md” listing all wikilinks used in vault, sorted by number of times used (see image).
Useful for seeing your most linked notes and also to ‘Quality Check’ to make sure all your links are good.
Here’s a 16 second video demo ++
The script needs to be run from within the folder you want to process.
I’m running it on macOS, and I don’t know if it will work on PC.
You could set it up to run periodically using some sort of automation systems (Keyboard Maestro in my case, but many options out there)
The Script (run it from within the directory you want to process):
egrep -ohsr --exclude-dir='.*' "\[\[[A-Za-z0-9 _@ÄÖÜäöüß\'\!\?\.\(\)\-]+\]\]" -- * | sed -e 's/[[:space:]]#/#/' | sort | uniq -c | sort -r -t# -k2 > "ΩΩ Link Cloud.md"
August 24, 2020, 3:51am
Works well. Very useful. Do you have a KM macro? If so, could you share it too?
Worked also very well under Ubuntu. I did have to remove the spaces at the beginning of line 1 in order to get the links to work but it was enough to do the first line and all the lines work then too.
Thanks for sharing!
August 24, 2020, 7:38pm
Yeah absolutely! So glad it works.
Dropbox download link
Just update the first line with the path to your vault location.
Note: I’ve set it to be
‘triggered’ when the Obsidian app deactivates (so when I click to another app). For me this is a nice clever way to have it update when I’m working in Obsidian (and click away as I frequently do), but it could also be set to run every 5 minutes or something if you prefer.
August 24, 2020, 7:44pm
Oh interesting! Always curious to see the tiny variations from system to system.
August 25, 2020, 6:30am
Many thanks for sharing, it works well !
August 25, 2020, 6:35am
Further to my comment of yesterday, which I still maintain (
), I wonder if there is a possibility to include markdown links too.
Markdown links as per
awesome tool, added to the toolbox, thank you!
I have seen this used in several places since you created this. Thanks so much for your work putting this together. I would like to get this to work, but I am not sure how to go about the process. My vault is on iCloud drive/taio.
Any help would be greatly appreciated,
March 15, 2023, 12:43am
@eiff Awesome script! Thank you mate for sharing! According to your list, I would get more anxious looking at this list every day