novelWriter icon indicating copy to clipboard operation
novelWriter copied to clipboard

Add session word count progress

Open vkbo opened this issue 10 months ago • 5 comments

Add a small panel where a session word count or character count goal can be set. The panel should include a progress bar and an option to exclude notes from the count.

It is probably also useful to allow continuing the counter from an earlier session on the same day.

This panel could be located in the left column under the project tree. Since there may be several such panels, perhaps it should be disabled by default so that it consumes no resources when not in use. It should also have its own settings panel, and not add a bunch of settings to Preferences.

vkbo avatar Feb 02 '25 21:02 vkbo

I've been toying with this locally, just added progress bars for session and whole project goals to the status bar and a project settings pane to configure them. I'm also considering that a per-document goal could be set in the metadata, and displayed near the document word count if it has been set.

Image Image

BlayW avatar Feb 17 '25 15:02 BlayW

That looks pretty neat. I was thinking about adding it as a panel below the project tree, but the status bar implementation you've got here looks pretty good too.

I think what you have is a very good start. Do you want to collaborate on a PR for this? I have some additional ideas. In the current main branch, there are pre-defined colours in the theme, and I was thinking about also having some options to colourise the progress bars. This can of course be done in separate PRs.

vkbo avatar Feb 17 '25 16:02 vkbo

Thanks! Yeh I'd be happy to collaborate on it. Should I create a branch with changes? There's be a place to add colour variables to style these progress bars, so that won't be trouble at all

BlayW avatar Feb 18 '25 14:02 BlayW

Yes, just create a branch on your fork of novelWriter and create a pull request against this repo. You can do it with the code you have so I can see how you've implemented it so far.

I'm not sure where you stored the settings, but they should be added to the NWProjectData class, although I'm uncertain in what form. I'm probably going to (re)write that part myself as I'm trying to plan ahead for more optional features and how they're encoded in XML.

vkbo avatar Feb 20 '25 09:02 vkbo

Okay, I've created a pull request here

BlayW avatar Feb 20 '25 13:02 BlayW