Vinzent03 / find-unlinked-files

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

Option to use this plugin without actual formation of the hard links #1

Closed tallguyjenks closed 3 years ago

tallguyjenks commented 3 years ago

So when this plugin is run and generates the output file it actually links to all the files in the vault and makes the graph revolve around a single file:

image

The hack i was using before this plugin came out was a command line one-liner to build this output file:

egrep -ohsr --exclude-dir='.*' "\[\[[A-Za-z0-9 _@ÄÖÜäöüß\'\!\?\.\(\)\-]+\]\]" -- * | sed -e 's/[[:space:]]#/#/' | sort | uniq -c | sort -r -t# -k2  > "🔗️☁️.md"

and it generates a file that has no line breaks between links (your template produces line breaks between links) and also ignored all daily notes based on the date format (another great feature to add)

the output file was also indented so that it doesn't actually create links and distort the graph:

image

just some ideas :)

Vinzent03 commented 3 years ago
  1. So you want that the output file doesnt create real links to unlinked files, just text, so the graph view is not messed up?
  2. Why do you want no linebreaks? Isn't a list better?
  3. Yeah I know that daily notes are a problem. Doing it with title formating is hard because everyone could use a different format. If you have all your daily notes in an extra folder. Then this feature is on the TODO list in README.
tallguyjenks commented 3 years ago

1 it would be a helpful option (yes) 2 for those that are not using strict markdown line breaks it would be a cleaner look like my above picture, so a toggle for this would be helpful as well 3 ah, yes i have the folder for my dailys, so moot issue on that then :)

Vinzent03 commented 3 years ago

I guess I misunderstand something really basic, but if there is no linebreak, wouldn't be everything in one line? With obisidan it would wrap that content. I am a bit confused.

tallguyjenks commented 3 years ago

@Vinzent03 you are correct, thats what i was referring to in my above point 2

in obsidian's settings, you can turn off strict line breaks so

[[link1]]
[[link2]]

appear exactly as they are seen above and not like:

[[link1]][[link2]]

but this can be toggled, the request would be to toggle the plugin so you can have the output displayed like

[[link1]]
[[link2]]

OR

[[link1]]

[[link2]]

if you have those line breaks turned on.

image

Vinzent03 commented 3 years ago

Ah so there is an extra empty line needed to show a line break in this mode. But in my test this is not needed when I use the - before each link. But you dont want the - before each item, but a raw list with only line breaks?

tallguyjenks commented 3 years ago

i have grown used to this layout:

image

if that could be replicated with some options in the plugin, that would be cool is what i was getting at with this issue :)

Vinzent03 commented 3 years ago

Oh ok, what stands the number in front for?

tallguyjenks commented 3 years ago

the frequency, exactly the same as your plugin:

image

Vinzent03 commented 3 years ago

Sorry which frequency? A file is linked or not. My list is not ordered(which could be an idea too)

tallguyjenks commented 3 years ago

frequency of the link's occurrence in a vault. How many times does the link appear in the entire vault. your list is ordered by default

Vinzent03 commented 3 years ago

The goal of this plugin is to find files, which are nowhere linked. So files which have no backlinks.

tallguyjenks commented 3 years ago

HAHAHA @Vinzent03 OMG i just realized im on the wrong plugin repo, i had a bunch of them open 🤣 I'm so sorry about that, this issue is irrelevant here 😅

tallguyjenks commented 3 years ago

not sure why i thought i was on https://github.com/aviskase/obsidian-link-indexer but there ya go, sorry about that, 😅

Vinzent03 commented 3 years ago

HAHAHA The perfect opposite of this plugin.

tallguyjenks commented 3 years ago

What can i say, it's monday 🤣