Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-13-2011, 07:45 PM   #166
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: 6,180
Karma: 167189477
Join Date: Dec 2010
Location: Florida, USA
Device: Kindle Paperwhite (2nd Gen)
Quote:
Originally Posted by kiwidude View Post
@Nyssa - as I have said above there is very little I can do, beyond not using user_none's code for MOBI files. And even if I go down that route, you will still have the problem of when you send the book to your Kindle that the page count from the generated apnx file is going to be the same wildly inaccurate values for those books.

This has all been discussed previously on this thread (start looking at page 2). IIRC user_none was reluctant to change the existing logic because his focus was on performance, he did not want to significantly slow down the sending to device process.

The only resolution I can think of that "might" keep everyone happy, is offering an option in the APNX file generation to pull the value from a custom column, rather than always generating using its (clearly drastically flawed in some cases) current counting implementation. That way this plugin can use whatever approach it wants to (such as pulling from a website, with a fallback to counting based on the max of <div>,<p> or <blockquote> tags). And then when you send the book to your Kindle, this "better" page count value could be used on your Kindle.

How much work that would be to implement if it is agreed and whether user_none has an interest or is willing to have the existing code changed is quote another issue, it would impact his standalone apnx file generator plugin as well.
I just installed another of your plugins - "Search The Internet" and realized that I do not have user_none's APNX file generator plugin installed. So, does that make a difference as far as getting correct page counts, becuase to be perfectly honest, I don't understand half of this stuff.
Nyssa is offline   Reply With Quote
Old 11-14-2011, 05:00 AM   #167
kiwidude
Calibre Plugins 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,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@Nyssa - no, installing the APNX file generator plugin will make no difference. Both Count Pages and the APNX file generator plugin make use of the same piece of code that exists inside calibre itself. It is that piece of code where the "problem" lies. The only way to fix this as I said above is to either change that calibre code, or change Count Pages to not use that code and "do it's own thing" (like it does for ePubs). I have been reluctant to do the latter, because it won't solve the issue for when people actually send books to their Kindle, since the APNX code in calibre will be what is used to give you a page count on the Kindle itself.

The only satisfactory solution to all of this in my opinion is to change the calibre APNX code - I've PM'd user_none about this with my suggestions about what should be done (the idea of getting the value from a custom column if it exists, so users/plugins can populate the page count rather than relying on the existing calibre code which does not cope well for some books). He agreed to take a look into it, once he says something further I will revisit this.
kiwidude is offline   Reply With Quote
Advert
Old 11-14-2011, 08:23 AM   #168
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: 6,180
Karma: 167189477
Join Date: Dec 2010
Location: Florida, USA
Device: Kindle Paperwhite (2nd Gen)
Quote:
Originally Posted by kiwidude View Post
@Nyssa - no, installing the APNX file generator plugin will make no difference. Both Count Pages and the APNX file generator plugin make use of the same piece of code that exists inside calibre itself. It is that piece of code where the "problem" lies. The only way to fix this as I said above is to either change that calibre code, or change Count Pages to not use that code and "do it's own thing" (like it does for ePubs). I have been reluctant to do the latter, because it won't solve the issue for when people actually send books to their Kindle, since the APNX code in calibre will be what is used to give you a page count on the Kindle itself.

The only satisfactory solution to all of this in my opinion is to change the calibre APNX code - I've PM'd user_none about this with my suggestions about what should be done (the idea of getting the value from a custom column if it exists, so users/plugins can populate the page count rather than relying on the existing calibre code which does not cope well for some books). He agreed to take a look into it, once he says something further I will revisit this.
Okay. Thank you.
Nyssa is offline   Reply With Quote
Old 11-22-2011, 02:14 PM   #169
CRussel
(he/him/his)
CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.
 
CRussel's Avatar
 
Posts: 12,159
Karma: 79742714
Join Date: Jul 2010
Location: Sunshine Coast, BC
Device: Oasis (Gen3),Paperwhite (Gen10), Voyage, Paperwhite(orig), Fire HD 8
@kiwidude & @user_none: I've run into a consistent problem with some of the books uploaded to the Library here on MobileRead. An example is: Sherlock Holmes Omnibus. If I only download the .mobi version, the Count Pages plugin fails with an error "1050 Failed To Count Pages". If I download the ePub version, it counts them. (Are there really 2191 pages in that omnibus?! Impressive, HarryT.)

If I do a mobi to mobi conversion, it will now count them (and the count is pretty close to the ePub count at 2046 pages.)

Last edited by CRussel; 11-22-2011 at 02:27 PM. Reason: fixed to read "download the ePub"
CRussel is offline   Reply With Quote
Old 11-22-2011, 02:19 PM   #170
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Do you mean that if you download the ePub version it counts them, Charlie? You said the mobi version.

The book was created using Mobipocket Creator; is there perhaps something different about Calibre-created Mobi files, I wonder?
HarryT is offline   Reply With Quote
Advert
Old 11-22-2011, 02:25 PM   #171
CRussel
(he/him/his)
CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.
 
CRussel's Avatar
 
Posts: 12,159
Karma: 79742714
Join Date: Jul 2010
Location: Sunshine Coast, BC
Device: Oasis (Gen3),Paperwhite (Gen10), Voyage, Paperwhite(orig), Fire HD 8
Quote:
Originally Posted by HarryT View Post
Do you mean that if you download the ePub version it counts them, Charlie? You said the mobi version.

The book was created using Mobipocket Creator; is there perhaps something different about Calibre-created Mobi files, I wonder?
Yes, my typo. If I download the ePub, it counts them. If I download the mobi, and do a mobi to mobi conversion, it counts them. If I just download the mobi, and don't have any other versions, it does NOT count them.
CRussel is offline   Reply With Quote
Old 11-22-2011, 02:41 PM   #172
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
One thing that occurs to me:

You've said elsewhere, I think, that this plug-in is counting paragraphs? The tool that I use to create ebooks, Book Designer, uses <div> tags to mark paragraphs, rather than the more usual <p> tags. I wonder if it might be that that's causing the plug-in to fail?
HarryT is offline   Reply With Quote
Old 11-22-2011, 02:54 PM   #173
kiwidude
Calibre Plugins 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,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
See the previous page of posts (and top of this one) for the discussion on this issue for some MOBI files.
kiwidude is offline   Reply With Quote
Old 11-22-2011, 03:34 PM   #174
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by kiwidude View Post
See the previous page of posts (and top of this one) for the discussion on this issue for some MOBI files.
Thanks - sounds as if my guess was right; it's the fact that my books are using <div> tags to mark paragraphs, rather than <p>, which is the cause of the trouble. I would guess that when you do a Mobi to Mobi conversion in Calibre, Calibre is replacing the <div> with <p>, so it then works.
HarryT is offline   Reply With Quote
Old 11-22-2011, 05:15 PM   #175
CRussel
(he/him/his)
CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.
 
CRussel's Avatar
 
Posts: 12,159
Karma: 79742714
Join Date: Jul 2010
Location: Sunshine Coast, BC
Device: Oasis (Gen3),Paperwhite (Gen10), Voyage, Paperwhite(orig), Fire HD 8
Quote:
Originally Posted by HarryT View Post
Thanks - sounds as if my guess was right; it's the fact that my books are using <div> tags to mark paragraphs, rather than <p>, which is the cause of the trouble. I would guess that when you do a Mobi to Mobi conversion in Calibre, Calibre is replacing the <div> with <p>, so it then works.
I think you're right, Harry. From how it looks on my Kindle, I see no difference, but clearly the page counter of user_none is not liking those <div> tags.
CRussel is offline   Reply With Quote
Old 11-22-2011, 06:50 PM   #176
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by HarryT View Post
Thanks - sounds as if my guess was right; it's the fact that my books are using <div> tags to mark paragraphs, rather than <p>, which is the cause of the trouble. I would guess that when you do a Mobi to Mobi conversion in Calibre, Calibre is replacing the <div> with <p>, so it then works.
This comment turned out rather lengthy - TL;DR: Use word count! Page count for *any* book (paper as well as digital) will be completely arbitrary. Consider yourselves warned

I just wanted to throw in a general comment about metrics here. The reason I quoted you, HarryT, is that I recently re-read all of the Sherlock Holmes stories from your epub. I'd like to thank you for making the effort; you did a very good job . Also, thanks to kiwidude for the word count that he made for all of us, it is indispensable to me.

Now on to my comment: Page count is a bad metric for "book length", not just with digital books. There are obvious issues for digital publications like the one HarryT mentions which makes it pretty much a no-go for digital books, but the problem is also evident in paper prints. As someone mentioned earlier in the thread, page count depends on layout, font size, and format (as in paper size). I work at a publishing house, and it turns out that seasoned authors tend to focus on word count, while freelance copy-editors bill not by printed pages, but by "pages" defined as 2400 characters per page (IIRC). Some also bill per hour, which doesn't concern my point at all. My point is that all of these are in a business which is very well acquainted with the concept of pages, and they know that it doesn't work as a metric.

My advice to anyone who wants to just get a feel for how long a digital book in their library is: use word count. Divide by 1000 if you want to have numbers that are easy to read (I outline how this can be done in Calibre in this post. The point (for me, at least) is to be able to distinguish at a glance the difference between a short story, a novella, short and longer novels, and the bricks that you could use to defend yourself with in a dark alley if it had been a hardcover copy. I use it to decide if my reading list will last me for the holiday, or if I should consider buying/acquiring more books for my reader.

Now for some nitpicking: Word count is a good metric because it gives you the best idea of how long time it'll take you to read the book. It's even better than letter count because you'll read a text that consists of long words in about the same time as you'd read a text containing the same number of shorter words (assuming that you know all those longer words), even if it consists of more letters . For the English language most books will average around 5.5 to 6 letters per word, being it Hemingway, pulp fiction or Dostoevsky. There are other metrics for readability and language complexity, but word count is probably the most accurate for the general case.
Man Eating Duck is offline   Reply With Quote
Old 11-22-2011, 10:59 PM   #177
Vaesse
Zealot
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: 107
Karma: 33020
Join Date: May 2011
Device: Kindle Paperwhite
Thank you, Man Eating Duck. I agree and personally only use word count. I'm still hoping for word count on TXT files. I didn't know about reading time being the same regardless of word length. Cool fact. I read so fast (bad habit from youth) that I tend to carry lots of extras (just in case).
Vaesse is offline   Reply With Quote
Old 11-23-2011, 03:07 AM   #178
kiwidude
Calibre Plugins 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,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@Vaesse - I haven't forgotten your request, but apart from having to spend the time updating other plugins I am waiting to see what if anything user_none is doing about changes to his APNX generation. The changes are mostly independent of each other but with all the other possible changes for this plugin I would rather make them all at once and be done with it for a while.

@Man Eating Duck - I wasn't aware of the word length readability comments you made, interesting. Personally I only have visible the word count column in my calibre UI from this plugin. Regardless of the debate over how page counts are computed (retrieved from a web page, calc'd from <p> tags or whatever), the simple fact is that you can more easily get a consistent result with word count.

The more "difficult" part for me and I suspect many others is training the brain to turn a whole new scale of numbers into something meaningful. As I have spent a lifetime reading paperbacks, I know roughly how many hours a book of a certain page size will take me to read. I have not bothered to figure out some "multiplier" to estimate a page count based on a word count (which could only be a range due to the well covered issues of page size, print size etc).

I'm more comfortable with it now than at first glance, but I still wouldn't say that in casual conversation if asked how long a book was that I would expect anything other than a blank stare if I said "120,000 words" instead of "500 pages" or whatever.
kiwidude is offline   Reply With Quote
Old 11-23-2011, 07:42 AM   #179
Vaesse
Zealot
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: 107
Karma: 33020
Join Date: May 2011
Device: Kindle Paperwhite
I completely understand having other things to do. And I'm not in dire need of word counts on my txt files. Just trying to balance reminders such that it doesn't get forgotten without getting into nagging.
Vaesse is offline   Reply With Quote
Old 12-12-2011, 07:19 AM   #180
ijonikis
Junior Member
ijonikis began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2011
Device: Kindle
Count Page custom column not accessible

I've created the recommended columns, installed the plugin and see the icon in the Calibre window but when I try to configure and use the pull down menu for Custom Columns there are no options. How do I fix that?

Sorry if this is a dumb question - I'm a brand new user.
ijonikis is offline   Reply With Quote
Reply

Tags
count, count pages, page count, pages, plugin


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1184 04-17-2024 06:17 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 PM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 12:02 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 06:37 PM.


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