Vinzent03 / find-unlinked-files

Find files, which are nowhere linked, so they are maybe lost in your vault.
MIT License
293 stars 14 forks source link

Block unwanted URI schema from missing links (tel, skype, rtsp) #65

Open lowell80 opened 1 month ago

lowell80 commented 1 month ago

I'm finding a bunch of special case URIs in the "broken links output". Other than simply removing these links, is there a way to block these from the output? I took a quick glance at the plugin code but didn't quickly see any explicit handling of schemes, leading me to guess that this is actually something deeper in Obsidian's link handling.

It seems like this would be a nice configuration option, but I also get wanting to avoid configuration overload. Likely some URI prefixes could be safe to always ignore, like tel or skype, for example. I'm curious to get your thoughts and if this is a problem for anyone else. Thanks!


Background

I've provided some additional info here in case it's helpful to have some more solid examples of what I'm talking about.

External resources (Cannot be validated)

URL schemes that seem like they could be solidly ignored as they are alway external resources, and thus can't be easily validated:

Junk schemas

On the other hand, I found that these schemas were helpful to see in the output simply because they represented unnecessary complexity likely interjected by one of my previous note platforms or some overzealous client software. These have been eradicated from my vault.

lowell80 commented 1 month ago

Just in case anyone else has a similar problem, my workaround is running this command:

grep -Ev '[\[(](tel|skype|chrome|rtsp|rtmps):' "broken links output.md" > "broken links output - FILTERED.md"