Updated by Moderator
There’s a word count plugin available. Search logseq-wordcount-plugin in plugin market place to check out.
Repo: GitHub - hkgnp/logseq-wordcount-plugin
Thanks to the awesome work of @hkgnp !
Hello,
Good afternoon everyone (UK time)
I really would love to have word, character and even reading time available.
Has anyone working on this or has any bits of code I can try out?
Any help would be great (I am not code-savvy by the way)
Hi @KaneDodgson, we are currently working on a plugin system and I think “word count” is a good candidate for a testing plugin. We may try to build one to test the plugin system’s capabilities.
That would be brilliant, even a simple basic word count would be helpful to me, to begin with. Loving this product. Ideally, word and character would be good. then if possible selective word count (highlight a block or blocks and see its word count) in an ideal world an estimated reading time also
I write a lot of funding bids for my projects and other similar things and they always insist on character counts. Now it is not so much of a problem as I screen everything through Grammarly and this has all those bells and whistles. But having it in the note app would stop me overwriting these kinds of things in the first place.
Thanks for getting back to me on this, appreciated
Kane
Definitely happy to try out as plugin and feedback
A block function that gives back the number of words / characters in all the blocks nested underneath (like in roam research).
Helps a lot in writing, adding it as a block function would enable to separately count the words in every paragraph also. Could be (optionally) omitted at export.
My work involves either producing essays to a precise word limit and also producing sermons which need to last for a given time (which I can quickly estimate with word count). At the moment I’m exporting to Word using Pandoc and counting there for an accurate count.
I’ve found a Chrome extension “Word Counter Plus” which gives a rough estmate which helps for now, but it breaks flow to have to select text then use the extension.
Working great. Much better than the one in Remnote (last time I used it!) that could only be used once per page. Having multiple instances is really powerful, and it works fine in document mode too.
Would the team accept a PR that adds a wordcount widget?
There are two approaches I’m considering, and we could do both or just one. I lean towards both because they achieve slightly different ends, but it might be better to keep it to one to keep the app simpler.
Approach #1
We could build a widget that works like the following example, where this markdown…
- {{wordcount}}
- this is a bullet with 7 words
- this bullet has 5 words
Wouldn’t this be better as a plugin? A while ago one of the devs mentioned they would prefer more functionality in plugins, which sounds reasonable: the smaller the code base, the easier it is to keep stable.
As far as the approaches go, I would prefer the first one, I never want word count, unless I specifically want it. The menu is filled with lots of stuff already, adding something you don’t need that often is just bloat.
Despite the negative tone of the previous comment, a word count widget would be really useful.
PS But anybody who collects Dune quotes gets a pass in my book
Good question! I must admit, I hadn’t considered that.
I haven’t written a Logseq plugin before (I’ve only made contributions to the core) so I don’t have a good sense of what their abilities/limitations are.
How are you envisioning that would work?
Also I agree, wordcount doesn’t feel important enough to warrant stuffing it in the main right-click menu.
But thinking about it, Logseq has a lot of meta-data in between text, so a really good word count plugin would be able to filter those out. Also embedded blocks, should they be counted or not? Honestly no idea if a plugin even has access to that information.
Thank you for the pointers! I’d been meaning to check out the plugin stuff for a while, so this is really helpful.
You’re right, we’ll definitely need to be careful of that when implementing this feature. Good call out!
I thought on it some more, and I think word count is a standard enough feature that it should be in the core. We should err on the side of plugins for most things in order to keep the core small, but I think most people would expect word count to be baked in.
I’ll let the core team make the final call though! @tienson what do you think?