Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2022, 04:21 PM   #1
andy9279
Member
andy9279 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Sep 2013
Device: none
A way to find word length of chapters/stories in book?

I am trying to find some way; an app, a Calibre plugin, or something else that will find the word length of each story/chapter inside of a book. I have the Calibre plugin that will show the total word length for a book, but I mostly read short stories and I have an (extremely long) list of these stories in a wordpad document I want to read. Before I dive in and read, I'd like to know the approximate word count -- but this is something I want to see on my laptop where I keep this list, so I can survey this (long) list quickly, rather than doing it on my kobo and find something I'm interested in that I have time for. Currently the way I do it is just copy the entire story from Calibre's epub reader and pasting it into libreoffice and seeing what the word count is and adding that to the end of the story title, like....

James, M.R. - The Ash Tree 5k

A bit time consuming, but I've yet to find another way.

Maybe there's not one, but I figured I'd ask.

Last edited by andy9279; 11-16-2022 at 04:25 PM.
andy9279 is offline   Reply With Quote
Old 11-16-2022, 04:24 PM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
The only way I can think of is to use EpubSplit to break it up into chapters and then run each one through the Word Count plugin.
ownedbycats is offline   Reply With Quote
Old 11-16-2022, 04:48 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by andy9279 View Post
I am trying to find some way; an app, a Calibre plugin, or something else that will find the word length of each story/chapter inside of a book. I have the Calibre plugin that will show the total word length for a book, but I mostly read short stories and I have an (extremely long) list of these stories in a wordpad document I want to read. Before I dive in and read, I'd like to know the approximate word count -- but this is something I want to see on my laptop where I keep this list, so I can survey this (long) list quickly, rather than doing it on my kobo and find something I'm interested in that I have time for. Currently the way I do it is just copy the entire story from Calibre's epub reader and pasting it into libreoffice and seeing what the word count is and adding that to the end of the story title, like....

James, M.R. - The Ash Tree 5k

A bit time consuming, but I've yet to find another way.

Maybe there's not one, but I figured I'd ask.
If each story is in a separate XHTML file in an EPUB, then Sigil Reports should do the trick:

Click image for larger version

Name:	Screenshot 2022-11-17 083939.jpg
Views:	952
Size:	105.9 KB
ID:	197818

BR
BetterRed is offline   Reply With Quote
Old 11-17-2022, 02:31 AM   #4
kevin3289
Guru
kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.kevin3289 ought to be getting tired of karma fortunes by now.
 
kevin3289's Avatar
 
Posts: 793
Karma: 2139376
Join Date: Aug 2022
Location: Australia
Device: none
Open Office portable has a word count function in the text file section. Just copy the words you want to count and paste them into the Open Office pane.
You should be able to get the program from Portable apps.
You can copy the words from the file preview pane in Calibre.

Last edited by kevin3289; 11-17-2022 at 02:36 AM.
kevin3289 is offline   Reply With Quote
Old 11-17-2022, 03:22 AM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by BetterRed View Post
If each story is in a separate XHTML file in an EPUB, then Sigil Reports should do the trick
Yep. That's my absolute favorite way to get quick word counts of everything in the book.

Quote:
Originally Posted by kevin3289 View Post
Open Office portable has a word count function in the text file section. Just copy the words you want to count and paste them into the Open Office pane.
LibreOffice 7.0 (August 2020) introduced an easy chapter word count right into the Navigator.

See my comment in:

for how to use it.

- - -

Side Note: Do not use OpenOffice—it has been abandoned for 12 years. See the post I wrote just a few days ago for more details.

LibreOffice is OpenOffice+12 years of constant updates:
  • Every 6 months comes a major version with new functionality + performance improvements.
  • Every month comes a minor version with a ton of bugfixes + compatibility updates.

In 12 years, OpenOffice "fixed" ~12 bugs.

In that same time period, LibreOffice has continuously gotten better + fixed tens of thousands of issues.

- - -

Quote:
Originally Posted by kevin3289 View Post
You can copy the words from the file preview pane in Calibre.
I tend to do a Calibre EPUB (or whatever ebook format) -> DOCX conversion.

Doing it this way would carry over the book's chapters/headings.

Then you can just use the LO Navigator tip I taught above to get an instant word count for a given chapter.

Last edited by Tex2002ans; 11-17-2022 at 03:29 AM.
Tex2002ans is offline   Reply With Quote
Old 11-17-2022, 04:46 AM   #6
andy9279
Member
andy9279 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Sep 2013
Device: none
Thanks for the help and ideas everybody, I will try some of these. I do have Sigil, and that seems to work pretty well, at first it was a little challenging figuring out what XHTML corresponded to what story since they're usually just named 001, 002, etc. -- but then I discovered I can double click on a file and it shows up in the preview pane (lol I have way more experience editing books with Calibre than Sigil).

Thanks again.
andy9279 is offline   Reply With Quote
Old 11-18-2022, 12:53 AM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by andy9279 View Post
Thanks for the help and ideas everybody, [...]
You're welcome.

Quote:
Originally Posted by andy9279 View Post
Sigil, [...], at first it was a little challenging figuring out what XHTML corresponded to what story since they're usually just named 001, 002, etc.
One trick I do right in the beginning is create human-readable filenames:

Before:
  • index_split_001.xhtml
  • index_split_002.xhtml
  • index_split_003.xhtml
  • index_split_004.xhtml
  • [...]

After:
  • titlepage.xhtml
  • copyright.xhtml
  • Introduction.xhtml
  • Chapter01.xhtml
  • Chapter02.xhtml
  • [...]

How to Mass Rename Files?

In Sigil, you can easily do this by:

1) Go to the Book Browser along the left side.

2) Shift+Left-Click to highlight which files you want to change.

3) Right-Click > Rename.

Click image for larger version

Name:	Sigil.-.Rename.Chapters.png
Views:	73
Size:	10.3 KB
ID:	197845

4) In the "Rename files Starting at:" box, type in:
  • Chapter01.xhtml

5) Press OK.

Sigil will auto-rename the highlighted files from:
  • Chapter01.xhtml
  • [...]
  • Chapter99.xhtml

Click image for larger version

Name:	Chapters.After.Human-Readable.Rename.png
Views:	74
Size:	4.5 KB
ID:	197844

Now when you run the Reports, it'll be so much easier to understand:

Click image for larger version

Name:	Sigil.-.Reports.-.Human-Readable.Filenames.png
Views:	83
Size:	21.7 KB
ID:	197846

Quote:
Originally Posted by andy9279 View Post
but then I discovered I can double click on a file and it shows up in the preview pane (lol I have way more experience editing books with Calibre than Sigil).

Thanks again.
There's a lot more tricks with Reports you can do too.

I wrote about many just a few months ago:

and in Post #14, I linked to a lot more!

Quote:
Originally Posted by Tex2002ans View Post
The Reports are AMAZING. Definitely take lots of advantage of those.

You can also use them to list all links in a book, making it very easy to:
Human-readable filenames also make understanding links in footnotes/TOCs/Indexes way easier too.

Much easier to know where this link points:
  • <a href="../Text/Chapter001.xhtml#footnote1>

compared to:
  • <a href="../Text/index_split_006.xhtml#footnote1>

A few more renaming tricks are listed in my posts here:

Last edited by Tex2002ans; 11-18-2022 at 01:56 PM.
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
best way to add numbered chapters to a book with no chapters stumped Sigil 17 05-10-2017 03:30 AM
Word Titles to calibre chapters with numbering stanlefor Conversion 3 11-20-2015 05:32 AM
Help with Word - Find & Replace Big Kev Workshop 3 09-21-2010 06:51 PM
DR800 Find Word TGS iRex 4 05-03-2010 01:28 PM
Short science fiction stories, book fulls. How do I find them? peterbbb Reading Recommendations 7 08-22-2008 06:27 AM


All times are GMT -4. The time now is 06:49 AM.


MobileRead.com is a privately owned, operated and funded community.