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

Display multiple items #11

Closed feedhopper closed 1 year ago

feedhopper commented 1 year ago

Hi there,

first of all THANK YOU!!! This plugin is GREAT, I love seeing the content when I write chapters to make them roughly similar in length.

Problem

I would like to see more that just one type of data, currently I use words or characters but would love to also see pages. ideally all at the same time. I realize that this clutters the file explorer interface.

Idea

Maybe you could make it configurable that more than one type of data will only be displayed underneath the explorer entry. Even better would be to let users decide how many will be displayed until they break into a second line Maybe the second line could also be configured to optionally always show or only be revealed upon selection. Perfect would be a reveal for multiple selected files

THANK YOU !!!

isaaclyman commented 1 year ago

Thanks for the suggestion. To be clear, page count is already included in the plugin. But your request is to see two statistics side by side, correct? I'm not opposed to this idea, especially if other users were to request it as well. But it would be hard to get right on the user experience side. We'd go from 5 statistic formats (10 if you count abbreviated ones) to 25 (or 50). And that's if you only do 1 or 2 statistics. If you want to allow 3+ you can see how that would get out of control. A simple dropdown like we have now would be insufficient. And shortcut bindings would have to be rethought as well.

Again, if this suggestion gains traction I'll take a closer look. But I wanted to explain why this isn't a simple thing I can just toss in, it's an overhaul.

feedhopper commented 1 year ago

Thanks for your swift response - I am only back on my machine now, sorry for replying so late.

I understand that this is more complicated than I thought. What I don't understand is your math: what do you mean by "to 25 (or50)? Are you referring to the characters that will need to be displayed?

I wondered whether it'd be also possible to make customizable what is displayed next to the actual number: I don't need "characters", for instance. If there was a way to display only numbers in a customized way, I'd actually not need anything but the raw numbers. It could look like "4 | 702 | 4115" and would know: This text has a 4 minute read and contains 702 words with altogether 4115 characters

As for displaying: You are right in seeing it gets messy at some point, even with the customizing option in place. How about pushing more details into a mouse hover popup?

there I go again ... thinking this is all so easy. Sorry about that, I am no coder at all...

isaaclyman commented 1 year ago

Re: the math. Right now there are five display options: char count, word count, page count, updated date, and created date. If we let you display two at a time, that's 5 * 4 = 20 possible combinations, plus the original five = 25. Each option also has an abbreviated version (100 words => 100w), so that doubles the potential number of display options—that part isn't a programming concern so much as something that makes the plugin much harder to test.

A mouse hover popup is an interesting idea, I don't know what Obsidian's got in that regard. I'll have to take a look next time I'm in the code.

Having an option to show all three "counts" is kind of a neat idea though. That's only one new option. How would you feel about reversing your example, i.e. "10p | 3000w | 150000ch"? I probably won't remove the nouns (page, word, character), but you'd have the option to abbreviate them just like you currently do.

feedhopper commented 1 year ago

I am not sure about the hover either when it comes to Obsidian. After all, we only have version 1.0 now and it's amazing what it can do already.

As for three options: that would absolutely be enough for me if that is less work to implement!

isaaclyman commented 1 year ago

Fixed in 2.7.1. Enjoy.

feedhopper commented 1 year ago

HUH! That was fast :) I did update the plugin but ... Where do I find the option to display more than one thing?

isaaclyman commented 1 year ago

Visit the plugin settings and look in the "Data to display" dropdown.

feedhopper commented 1 year ago

Aiaiaiai!! Sorry. I did look but not thoroughly enough. It is getting late here.

Enough of the rambling!

THIS IS GREAT!!!!

Thank you SO MUCH!! :)))))