Skip to content

Add functionality to exclude directories from graph and update tsconf…#29

Draft
the-muppet wants to merge 1 commit intokctekn:mainfrom
the-muppet:directory-exclusion
Draft

Add functionality to exclude directories from graph and update tsconf…#29
the-muppet wants to merge 1 commit intokctekn:mainfrom
the-muppet:directory-exclusion

Conversation

@the-muppet
Copy link

Very large, well tagged vault size causes the plugin to crash even on high powered hardware, Suggested changes allow users to exclude directories within vault from graph indexing, allowing for more controlled and useful graph content.

@the-muppet
Copy link
Author

image

I might be an edge case though, really don't know 😃

@kctekn
Copy link
Owner

kctekn commented Nov 5, 2024

Hi @the-muppet,
I checked with your code, but seems not work at all? Not knowing what is happening, but the filter does not work on my end after I entered a path: nodes have the path still in the graph.

@the-muppet
Copy link
Author

I'm not super familiar with typescript or the codebase, my filtering must have been misaligned or applied incorrectly. I'll mess with it more and provide an updated PR - sorry!

@kctekn
Copy link
Owner

kctekn commented Nov 5, 2024

Please review the function named shouldRemove in util.ts, which currently handles filtering operations. I believe it can be extended to include path filtering functionality by simply passing the excludeDirectories parameter to this function.

@the-muppet the-muppet marked this pull request as draft November 5, 2024 23:46
@the-muppet
Copy link
Author

Ah thank you. as of right now i have seemingly limited the file linking but that doesnt do anything for tag links, getting some.. mixed results to say the least. will have some more time to dive in later in the week

@kctekn
Copy link
Owner

kctekn commented Nov 7, 2024

Yes, if you get the input of "excludedDirectories" to migrated into the content of currently used "filterStrings", you will get the result even dont need to change any logic. Of course you can update the "shouldRemove" function to support checking if it is a file, or a tag etc.

@kctekn
Copy link
Owner

kctekn commented Dec 6, 2024

Added the path filter feature, you can check it with the new version: https://github.com/kctekn/obsidian-TagsRoutes/releases/tag/1.2.3. Have fun with it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants