foliate icon indicating copy to clipboard operation
foliate copied to clipboard

Word/character count under 'About this book'

Open emes81 opened this issue 3 years ago • 2 comments

I occasionally receive epubs for translation, so this feature would be useful to me in estimating workloads.

emes81 avatar Mar 02 '21 15:03 emes81

Be advised that such a feature at best could only be rough indication.

Index pages, notes, content pages and many other types of meta will cause the count to be erroneous.

Look in the bottom location bar (Ctrl+L). There you will see the word "Location" and a number out of a total. That is a much better estimate.

You can also consider "Time left in book" / WPM count. A related issue is https://github.com/johnfactotum/foliate/issues/341 .

itprojects avatar Mar 02 '21 16:03 itprojects

Each "location" (as seen in the Ctrl+L popover) contains 1024 characters. These "locations" are used to display the reading progress slider. It's independent from display size.

You should be able to get a pretty good character count by multiplying the total number of locations by 1024. I think it would make sense to present this character count in "About This Book". Maybe presented in the form of "218k characters (about 3 hours to read)", or something similar.

On the other hand, a word count could be much more useful than a character count, and it probably won't be too hard to implement. It should also be possible to refine this to count only content pages if such semantic information is provided by the EPUB file.

johnfactotum avatar Mar 03 '21 05:03 johnfactotum