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
82 stars 8 forks source link

When links use custom display text, only the custom display text should be counted (for my use case) #78

Closed SteveInStudio closed 7 months ago

SteveInStudio commented 7 months ago

Problem

Hello, Isaac. I very much appreciate this plugin. As a novelist who writes the manuscript inside Obsidian, I do have a pain point, though:

I make ample use of custom display text in links for my characters, places, objects, magic systems, etc.

Example: [[Queen Noir of the Kingdom of Dark|the queen]]

In this example, the plugin counts it as eight words. Yet, for purposes of a novel, it is only two words. It may seem like a trivial difference, but with my ample use of custom display text, particularly with the more fanciful character names, the word count is overstated to a material degree.

Idea

I would appreciate and make great use of a feature whereby I can set it to count, if custom display text is used, the words of the custom display text only. In other words, if "|" count the words following the "|", else count the link words.

Thank you for your consideration of my idea and especially thank you for your contribution to the Obsidian community.

isaaclyman commented 7 months ago

This is a reasonable request, but somewhat more difficult to implement than previous exclusions (i.e. comments and code blocks). I'll give it some thought.

isaaclyman commented 7 months ago

Fixed in v3.5.0. See the new "Exclude non-visible portions of links" setting.

SteveInStudio commented 7 months ago

Isaac, thank you. My novel's word counts are now 100% accurate. It's time to buy you another cup o' Joe.