Closed kazdonkai closed 2 years ago
That sounds doable! I can think of a couple edge cases, but basically we would just initialize the graph using a filter
If possible, please allow us to use regular expressions to exclude files and folders.
@kazdonkai What sort of interface are you imagining? I could make a list of all files and folders in the vault, and you could pick which to include/exclude. I could allow a regex to include/exclude all files/folder that make. What do you think?
Btw, the effects would be global. So it would exclude those folders/notes for all analyses. (I'm just not going to add those notes to the graph, basically)
I could make a list of all files and folders in the vault, and you could pick which to include/exclude.
Wouldn't this take too much time if we have a lot of files? I have 20,000 files in my Valt.
I could allow a regex to include/exclude all files/folder that make.
I think this is more practical. By the way, I put "_" at the beginning of the index files.
@kazdonkai check out 0.5.1. In the settings, you can now give a regex. Any file that matches this regex will be excluded from the graph.
I have tested it on my side. The regex matching works a little weirdly... but I was able to filter out specific notes. Please let me know your experience with this :)
If you want to double check, after pressing Refresh
(and enabling debug mode
), open up the console, then look inside {g: MyGraph}
. You'll see a list of nodes that were included in the graph.
I put "^_. *" in the Exclusion Regex, but it seems not to work.
There mustn't be a space between .
and *
.
Try ^_.*
Also remember that it's checking the whole file path. So if your index note is in a folder, you have to check for that too: folder/_.*
, or [^/]+/_.*
will both go one folder deep
I entered "Task/^_.*", but it does not seem to be excluded. The index file is "Task/Recent.md".
Try Task/_.*
It worked well. BTW, what should I do if I want to set up more than one?
For now, only one regex is allowed. But I intend to add support for as many as you want! Please add a new FR for this, and I'll close this one out
I am fine for now.Thank you.
I have created Index files with other plugin, but I want to exclude them from the analysis, so I want to exclude specific files or folders, is it possible?