isaaclyman / novel-word-count-obsidian

Obsidian plugin. Displays a word count or other statistic for each file, folder and vault in the File Explorer pane.
https://obsidian.md/plugins?id=novel-word-count
MIT License
77 stars 7 forks source link

Exclude file/folder names #81

Closed Drakemoor closed 5 months ago

Drakemoor commented 5 months ago

Problem I would like to be able to exclude specific files, folders, or both from being counted.

I have a big vault organized in folders. I also use the Folder Notes plugin. In those notes, I store info I don't want to be counted because they skew the numbers of the containing folders.

I use Obsidian for long-form writing, separating each project into its own folder. Some projects contain over 50 folders, and some of the folder notes contain a significant amount of words. That changes the number of the overall project word count, which I view as a guide to the project's progress.

Idea I would like to have a field like this: image

in the options, so I can easily EXCLUDE file/folder names.

Thank you for your consideration.

isaaclyman commented 5 months ago

There are three ways to exclude notes:

See the README for more details on any of these.

Drakemoor commented 5 months ago

Thank you for getting back to me so quickly.

I've read the README and know about the possibility of using a tag or property. Unfortunately, this doesn't solve my problem since I have to add it to hundreds of preexisting Folder Notes.

I also know about the "Include file/folder names" option, but I couldn't make it work. I've tried variants of this regex:

(?!__aboutFolder_.*)

to no avail.

If you know any way I could achieve what I want, please, help me. Thank you.

isaaclyman commented 5 months ago

Ah, sorry for misunderstanding. RegEx isn't an option in that setting, it's a plaintext match. Have you tried setting it to __aboutFolder_?

EDIT: I just realized that would include what you're trying to exclude. I'll have to think about that.

Drakemoor commented 5 months ago

Thank you, for your help.

isaaclyman commented 5 months ago

@Drakemoor Fixed in v3.8.0. The "Include file/folder names" setting has been updated so any term starting with ! will be excluded instead of included. Try setting it to !__aboutFolder_ and let me know if it doesn't work.

Drakemoor commented 5 months ago

Thank you for the time you put it! 🙇🏻‍♂️

I tested it, and it works well. I appreciate it.