-
-
Notifications
You must be signed in to change notification settings - Fork 411
feat: add .ts_ignore
pattern ignoring system
#897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
c713184
to
a5b38eb
Compare
I've tried out the PR in it's current state on Windows and did some quick testing. generally speaking it seems to work, but when i add comments to the .ts_ignore file it causes the ignore file to break and the listed patterns all stop working. Although i am not sure if adding comments are needed, since the plan is to have this file be altered by the program itself. since the example made use of them, i thought it was worth mentioning it. Another thing that should probably be addressed is: files that were previously discovered, but are now ignored by the ignore pattern. A this point, files that were previously included in the library will stay included even after they should be ignored. In my opinion, this is not a bad thing. However, it should be visible that the file is currently included but should be excluded. Perhaps by adding a warning icon that when hovered tells the user that the current file is being tracked. The user should then be able to decide to remove the file from the library, without removing it from the file system Side note, perhaps it is worth breaking out some of the TODO's into their own issues/PR's so that this one can become more focused on the core feature. |
Strange, I've been using comments like the ones in the example in my libraries on this branch with no issue. Is there something about your comments that may differ from the examples?
These files are intended to be both editable from within and outside of the program, so working comments would indeed be desired.
By "at this point", are you referring to the most recent stable build (9.5.2) or this PR? Because in this PR the intended behavior is to not have files that should be excluded to still appear. If that's happening, something is going wrong here |
As far as i can tell, my comments were structured exactly like the example. I double-checked before posting about it.
With at this point, i was referring to the state the PR was in. I did some basic testing with the ignore patterns, including what happens if the file has already been discovered by TagStudio. I am not sure if the plan is to completely remove the entry if it is ignored or to simply not display it. But if the plan is to remove the entry when ignored, on the GUI side a warning would most likely be a good thing if there were already tags/fields attached to the entry to prevent accidental data deletion. I hope that clears some things up. |
Summary
Replaces the existing "File Extension List" inclusion/exclusion system with a more comprehensive ".gitignore" style pattern ignoring system. The built-in
GLOBAL_IGNORE_SET
has also been replaced with this same pattern-matching system, both for directory scanning and query filtering. This PR also adds the ability for TagStudio to traverse symlinks (not tested on Windows) and Unix hidden folders. I was originally planning on those changes to be in a separate PR, but most of the code overlapped with these changes and ended up amounting to a couple of flags passed to thewcmatch
glob function.How to Use
.ts_ignore
text file located directly inside the.TagStudio
folder of one of your libraries (library can be open!)Example
.ts_ignore
file:TODO
Tasks Completed
Closes #14, Closes #624.