Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-10-2011, 09:30 AM   #106
Vaesse
Connoisseur
Vaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolate
 
Vaesse's Avatar
 
Posts: 95
Karma: 33020
Join Date: May 2011
Device: Kindle 3 WiFi
Just a quick question. I've been using this plugin since I found it a couple weeks ago, but never bothered to read the forum, as it seemed very straightforward. But today, I had some extra time, so I figured I'd read the forums of my favorite plugins to see if I was missing anything.

I only use the word-count feature, as I (without really thinking about it) expected the page count problem of not being able to directly relate to physical books (and since I'm just comparing books against each other, one number is as good as the next). Am I correct in believing that the "wonkiness" of html programming for page count estimates is avoided in using word counts (ie, the plugin counts words by the spaces around them or some such, so <div> vs <p> vs <br> shouldn't matter)?

Also, is there any particular reason why word counts can't be done on TXT files? I keep two formats in my library (assuming I don't have any conversion errors, which I'll go back later and try to pick through): MOBI and TXT. It would be nice to not have to keep MOBI for my TXT files that have no special formatting whatsoever, but if I can't get word count from TXT, I'll end up converting everything to MOBI (because word count is just that important to me now).

By the way, before I found this plugin, I was opening the TXT version in Open Office Writer, running a "word count" and manually updating the word count column... your plugin is a MUCH better method for getting this data!
Vaesse is offline   Reply With Quote
Old 07-10-2011, 09:49 AM   #107
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
The word count function creates a version of the book without any html tags, and then counts the words in that - so you're correct, anything the html markup adds is not considered in the word count. It's got some functionality built in for non-ascii/Asian characters/words, but I'm not sure how accurate that portion is.

There's no real reason the word count function itself can't be applied to text files, but I believe the core of the plugin was aimed at mobi/epub, and I'm not sure how easy it would be to add other formats.
ldolse is offline   Reply With Quote
Old 07-10-2011, 09:56 AM   #108
Vaesse
Connoisseur
Vaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolate
 
Vaesse's Avatar
 
Posts: 95
Karma: 33020
Join Date: May 2011
Device: Kindle 3 WiFi
I can certainly understand the problem of trying to add another format to the plugin (theoretically, my programming knowledge is mostly theoretical).

I was just thinking that a "pure" format like TXT would be relatively simple to add (compared to PDF or something that could need radical conversion). My initial thought was that the plugin could reference TXT ONLY for word count, then as I started to type that, I realized that a conversion from words to pages was already being made per some of the initial posts (x words = 1 page), so counting only words wouldn't likely be any real effort saved.

As I said, if TXT word count is not something likely to happen soon/at all, I'll just convert my TXTs to MOBIs and count them that way.
Vaesse is offline   Reply With Quote
Old 07-16-2011, 07:56 AM   #109
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@mbovenka/Vaesse:

There is no real reason why other formats could not be supported in this plugin. It just requires putting an up/down list of formats in the configuration dialog (allowing you to set your own preference order for which format to get the count from for when there are multiple) and a couple of ther tweaks. The code is already in place to behind the scenes convert the book into a format that allows the count to be performed - it just means that the plugin will run slower when it hits nasty things like a book for which you only have a PDF format.

However as it would allow users to have better coverage of page/word count in their libraries without having to convert to EPUB/MOBI just to get one it sounds a nice addition. I'll put it on the list for the next version (no promises on when it will get done at this point).
kiwidude is offline   Reply With Quote
Old 07-16-2011, 09:29 AM   #110
Nyssa
Series Addict
Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.
 
Nyssa's Avatar
 
Posts: 5,455
Karma: 53485457
Join Date: Dec 2010
Location: Florida, USA
Device: Kindle 3 (Wifi Only), Kindle Paperwhite
Hi KiwiDude,

With the newest version of Calibre 0.8.10, this plugin has gone a bit goofy. The word count seems to be working fine but the page count is not.

I have a 84,322-word novel showing up w/ 1 page, and 28,929-word novella showing up with 0 pages (actually the field is just blank, it doesn't even say zero).

All of my books are MOBI.

T.I.A.

Last edited by Nyssa; 07-16-2011 at 09:48 AM. Reason: typo - "but" not "put"
Nyssa is offline   Reply With Quote
Old 07-16-2011, 09:40 AM   #111
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Nyssa - been using it myself with no problems. What algorithm do you have configured and what format are you scanning. Have you tried with multiple books?
kiwidude is offline   Reply With Quote
Old 07-16-2011, 09:48 AM   #112
Nyssa
Series Addict
Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.
 
Nyssa's Avatar
 
Posts: 5,455
Karma: 53485457
Join Date: Dec 2010
Location: Florida, USA
Device: Kindle 3 (Wifi Only), Kindle Paperwhite
What algorithm? I don't know how to answer that question.

As for the formats, they were both converted from AZW to MOBI.

Those were the last 2 books I uploaded. I will search for other free material and try them out.
Nyssa is offline   Reply With Quote
Old 07-16-2011, 09:58 AM   #113
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
By algorithm I mean look at the settings for the plugin and see what you have selected in the algorithm dropdown for pages - APNX Accurate or Adobe.
kiwidude is offline   Reply With Quote
Old 07-16-2011, 10:27 AM   #114
Nyssa
Series Addict
Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.
 
Nyssa's Avatar
 
Posts: 5,455
Karma: 53485457
Join Date: Dec 2010
Location: Florida, USA
Device: Kindle 3 (Wifi Only), Kindle Paperwhite
Ah.

Ok the algorithm is set to paragraphs (APNX accurate).

I found 2 new books and they worked just fine. I went back and re-converted the 2 problem books, and Word Count worked the 2nd time around.
Nyssa is offline   Reply With Quote
Old 07-17-2011, 07:58 AM   #115
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 469
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows XP, Windows7
Thank you for the great plugin!

I so second the post that said mobi=prc. Why only mobi?
travger is offline   Reply With Quote
Old 07-19-2011, 09:14 AM   #116
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quote:
Originally Posted by travger View Post
Thank you for the great plugin!

I so second the post that said mobi=prc. Why only mobi?
PRC can actually contain many things, as it's originally a PalmOS extension/container format. Anyway Calibre looks inside the PRC container during import and if it's really a mobi file it changes the extension to mobi. If you have prc files in your library that are actually mobi it's because you imported these with a really old version of Calibre.
ldolse is offline   Reply With Quote
Old 07-19-2011, 11:54 AM   #117
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,022
Karma: 777817
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
It occurs to that it might be possible for this plugin to generate epub page map files for those who would like their epub files to reflect the number of pages reported by this plugin.

What do you think - would this be useful?
itimpi is online now   Reply With Quote
Old 07-20-2011, 03:14 AM   #118
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 1,104
Karma: 1510724
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Aura HD
Quote:
Originally Posted by ldolse View Post
PRC can actually contain many things, as it's originally a PalmOS extension/container format. Anyway Calibre looks inside the PRC container during import and if it's really a mobi file it changes the extension to mobi. If you have prc files in your library that are actually mobi it's because you imported these with a really old version of Calibre.
True, PRC files *can* be many things. But if they're in a Calibre library, I think it's a good bet they are books, and thus in effect Mobi files .

I imported my ebooks a few months ago (so not with 'a really old version of Calibre'), and there are lots of 'PRC' format books in my library. Calibre does not rename them, and treats them as a different format from Mobi. I'm not really sure why that is; I know modern Mobi files have a more extensive header than old PRC files do, but AFAIK they are basically the same thing (i.e. the PRC header is a subset of the Mobi one). I'd think the Pagecount plugin should be able to handle them simply by treating them as Mobi files, but perhaps it's trickier than I know.

Perhaps Kiwidude 'll chime in on that; he should know.
mbovenka is offline   Reply With Quote
Old 07-20-2011, 03:40 AM   #119
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
There are two ways the plugin tries to count the pages in the files. If it sees it is a format of type "MOBI" then it uses a special MobiReader class inside Calibre. If it sees the format is anything else (currently only EPUB supported in that bucket), it opens the file using a class that will convert to EPUB.

The risk of treating a PRC file as a MOBI file is that the MobiReader does not find what it expects - because in fact it is not "MOBI" content as it knows it inside it. However opening such a file using the EPUB conversion type approach should work.

I've already got on the todo list sometime to allow additional formats to be counted which will include PRC and they will all use that latter approach. Using the MobiReader is simply an optimisation for MOBI files.
kiwidude is offline   Reply With Quote
Old 07-20-2011, 04:15 AM   #120
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quote:
Originally Posted by mbovenka View Post
True, PRC files *can* be many things. But if they're in a Calibre library, I think it's a good bet they are books, and thus in effect Mobi files .

I imported my ebooks a few months ago (so not with 'a really old version of Calibre'), and there are lots of 'PRC' format books in my library. Calibre does not rename them, and treats them as a different format from Mobi. I'm not really sure why that is; I know modern Mobi files have a more extensive header than old PRC files do, but AFAIK they are basically the same thing (i.e. the PRC header is a subset of the Mobi one). I'd think the Pagecount plugin should be able to handle them simply by treating them as Mobi files, but perhaps it's trickier than I know.

Perhaps Kiwidude 'll chime in on that; he should know.
'Really Old' does appear to be a slight falsehood - the last book in my library that is a real mobi with a PRC extension is from December 2010, so it must have been a release that month that changed the logic. I've been regularly adding prc files since that time (just did some today) and they all have a .mobi extension after Calibre processes them. Still, seven months is a while.

I still don't think it's safe to assume that prc is mobi - Calibre supports a number of ebook formats that were popular on PalmOS, mobi just happens to be the most popular one.
ldolse is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Kindle Collections meme Plugins 2058 07-15-2014 01:36 AM
[GUI Plugin] Quality Check kiwidude Plugins 729 07-10-2014 06:35 PM
[GUI Plugin] Open With kiwidude Plugins 223 07-09-2014 02:42 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 28 04-23-2014 05:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 12:29 PM.


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