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 09-19-2012, 07:47 AM   #451
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,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Walt has been spot on with all the right answers to this imo. I have no intention of adding more preferences at the moment, it will only add to the confusion about what gets used when.

Right now it is as simple as I think it can be - a user who has only one format for a book, will get a count of pages in that book as the result of converting it to ePub, assuming it wasn't an ePub to begin with. The special case exemptions to that are PDF, CBR and CBZ formats - in those circumstances for page counting it does no conversion and handles each with some format specific algorithms. Though if you had other statistics turned on like word counts then it would still attempt a conversion.

If you have multiple formats for a book, it uses your preferred input order to decide which to convert to ePub. Most people will (sensibly) leave it at the calibre default of ePub at the top - there is *no better* format to convert from than this. MOBI is not special cased, it just usually sits as second on the list on most people's systems, and converts very quickly/well to ePub.

Putting another format at the top of your preferred input list like RTF really doesn't make any sense to most people or in most circumstances, so I don't intend to complicate this all further with yet another preference for it.
kiwidude is offline   Reply With Quote
Old 09-25-2012, 10:24 AM   #452
BetterRed
null operator
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: 3,958
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
For the record running Count Pages on 3,247 EPUBS took 19 minutes, it ran at low priority on one core and never got above 15% total CPU utilisation. When I was running it on RTF's (same books) it was appreciably slower - 15 minutes for 40 books, and its CPU utilisation was up to 98% of all 4 cores.

On the issue of the plug-in using the first format in the Input list, I now have EPUB as number 1 input, and RTF as number 2, and EPUB as the Preferred Output. I tweaked my workflow, I now delete the current EPUB immediately prior to creating a new one via conversion from RTF. Yes its on backup, besides I delete to the rubbish bin so its there too, and Windows probably has a Previous Version from last nights system checkpoint.

rp
BetterRed is offline   Reply With Quote
Old 09-25-2012, 12:06 PM   #453
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,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@BetterRed - glad you got things figured out to something you are happy with. indeed now Count Pages will not have to do a (slow RTF) conversion in the background for every book - it just has to unzip the epub and parse the html within it hence the orders of magnitude speed difference.

And of course you can then be doing your editing of the ePub version of the book in the new shiny version of Sigil, rather than reconverting from RTF anyway...
kiwidude is offline   Reply With Quote
Old 09-25-2012, 03:12 PM   #454
rlh3
Enthusiast
rlh3 began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Jul 2012
Device: iPad 2
Is there any way to have the plugin calculate and display a sum of word and page counts for a set of books?

I imagine it working something like this: Select a set of books, click on the dropdown menu of the plugin, select something called 'sums' or 'totals', and then a window pops up giving the total number of words and pages in the selected group. The values calculated would not saved in any way, they are just a temporary calculation.

Part of my reasoning for asking about this is that my son's class is having a competition as to who reads the most over the school year, and, as my son does most of his reading on an old sony reader, or on my ipad, it would be nice to be able to give him a running total of words or pages read.
The other part of my reasoning for asking about this, is that I think it would be cool.
rlh3 is offline   Reply With Quote
Old 09-25-2012, 06:17 PM   #455
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,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@rlh3 - it would be a bit too expensive/slow to do this I think.

However you do have another option (presuming you are already calculating these for your books). Select the books and export as a CSV catalog - you can pick the columns to include, include your #pages and #words columns in there. Then just load it up in Excel and you can get your sums. You could turn it into a pretty report if you wanted to, track progress etc...
kiwidude is offline   Reply With Quote
Old 09-25-2012, 06:27 PM   #456
rlh3
Enthusiast
rlh3 began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Jul 2012
Device: iPad 2
Quote:
Originally Posted by kiwidude View Post
@rlh3 - it would be a bit too expensive/slow to do this I think.

However you do have another option (presuming you are already calculating these for your books). Select the books and export as a CSV catalog - you can pick the columns to include, include your #pages and #words columns in there. Then just load it up in Excel and you can get your sums. You could turn it into a pretty report if you wanted to, track progress etc...
Thanks for taking a look at this. I suspected that it would be resource intensive, but what I know about programming computers could be written inside a matchbook with a grease pencil.

I will give the catalog export trick a try. My son will just have to deal with weekly reports, rather than on demand...
rlh3 is offline   Reply With Quote
Old 09-25-2012, 08:05 PM   #457
hakan42
Zealot
hakan42 is on a distinguished road
 
hakan42's Avatar
 
Posts: 136
Karma: 60
Join Date: Jul 2009
Location: Munich, Germany
Device: Nook Classic rooted; Galaxy S IV with Aldiko, other older devices
Alternatively, create a goodreads account for your son. Whenever you would mark a book as "read" there, the book count and the cumulative number of pages gets updated in the "stats" area.

If the books there don't have a page count for the ebook version, it would become your task as a good Internet citizen to provide that data of course
hakan42 is offline   Reply With Quote
Old 09-25-2012, 08:58 PM   #458
BetterRed
null operator
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: 3,958
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
Quote:
Originally Posted by kiwidude View Post
@BetterRed - glad you got things figured out to something you are happy with. indeed now Count Pages will not have to do a (slow RTF) conversion in the background for every book - it just has to unzip the epub and parse the html within it hence the orders of magnitude speed difference.
There's always another way to skin the cat

The first post in this thread has

Quote:
Originally Posted by kiwidude
Word count is optionally calculated independently of page count. As this is unavilable on a website, it is subject to the same limitations as estimating page count above, in that you must have either an ePub or a format convertible to ePub available for it to work.
As I wasn't interested in page counts, I skimmed the preceding paragraphs. I read the above as saying - if a book has an ePub then Count Pages will use it, otherwise there must be a format that Count Pages can convert to a temporary ePub.

Doesn't explain why it took 15 minutes at 98% CPU usage to Count Words when RTF was top of the Preferred Input list, but only 10secs at 15% CPU usage to convert the same book from RTF to ePub, with the same Preferences. Anyway that issue, for me at least, is now moot.

Quote:
Originally Posted by kiwidude View Post
And of course you can then be doing your editing of the ePub version of the book in the new shiny version of Sigil, rather than reconverting from RTF anyway...
Theoretically creating the EPUB is my final task. It has sub tasks - if ePub exists delete it, update metadata, convert RTF to ePub, count words, modify the ePub- finito.

My toolkit to get to the RTF uses C++, Office Interop and Word macros that I've developed over a long time. I'm not sure if it could be ported to the Sigil environment; but even if it could, there's no incentive to do that.

rp
BetterRed is offline   Reply With Quote
Old 09-29-2012, 04:52 PM   #459
Firedancer885
Occassional Beta Tester
Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.
 
Posts: 230
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab
Hi Kiwidude,

I have a fairly big problem. I'm using the latest plugin and the latest calibre on an Ubuntu 12.04 system. I tried to do a mass count in my library (744 books) and the laptop unexpectedly shut itself down. This wasn't the first time the shutdown happened, and I was doing counts every time it did. Can you help me determine the cause?
Firedancer885 is offline   Reply With Quote
Old 09-29-2012, 05:01 PM   #460
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,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Firedancer885 - the standard checklist I would go through:

What format are you counting pages for? Are your books ePub or not?
If not, then the plugin is having to do a conversion for every book. Chances are your laptop CPU is overheating, crank down the processing allocated to calibre in Preferences, there's loads of comments on how to do this around the forums.

You can also break it down into smaller batches in the preferences for this plugin.

And of course the very obvious - don't select your whole library.

There will be *nothing* that is in my plugin code that it can do to help. It calls standard calibre code to do conversions. It uses the same mechanisms calibre does. As I have said already on this page, if you want the best performance, then use it against books which are ePubs, and convert to ePub beforehand if you intend to keep them.

Other than that nothing else I can suggest.
kiwidude is offline   Reply With Quote
Old 09-29-2012, 05:19 PM   #461
Firedancer885
Occassional Beta Tester
Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.
 
Posts: 230
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab
Thank you,

I tried to do a smaller batch even before reading your suggestions. With a batch of 40, it caused the same shutdown, and I thought it was caused by one of the books. Doing batches of 5, I managed to get through the 40 books without problems. I think from now on I'll stick to 15-20 books per batch.
thanks for the suggestions.
I'm mainly using Calibre as an offline repository for fanfic and I'm using FFDL to download books as epubs. I have two pdf only books (and have already used count pages on them), all the others (some 2300 books) have epub formats. I use epub as the default format.
Firedancer885 is offline   Reply With Quote
Old 09-29-2012, 06:38 PM   #462
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,474
Karma: 19300555
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2), Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
Quote:
Originally Posted by hakan42 View Post
Alternatively, create a goodreads account for your son. Whenever you would mark a book as "read" there, the book count and the cumulative number of pages gets updated in the "stats" area.

If the books there don't have a page count for the ebook version, it would become your task as a good Internet citizen to provide that data of course
I provide the page number for the ePub I read. But, please don't do this for any of the eBooks I read as that could change the page number. And if I ask for a page number for ePub you read, the page number could change. I don't read with DRM so the page number will be different because DRM & non-DRM have different page counts.
JSWolf is offline   Reply With Quote
Old 09-29-2012, 07:31 PM   #463
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,244
Karma: 6020307
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Firedancer885 View Post
Thank you,

I tried to do a smaller batch even before reading your suggestions. With a batch of 40, it caused the same shutdown, and I thought it was caused by one of the books. Doing batches of 5, I managed to get through the 40 books without problems. I think from now on I'll stick to 15-20 books per batch.
thanks for the suggestions.
I'm mainly using Calibre as an offline repository for fanfic and I'm using FFDL to download books as epubs. I have two pdf only books (and have already used count pages on them), all the others (some 2300 books) have epub formats. I use epub as the default format.
Your laptop may have grown (looks like lint ) cooling issues and overheats on long crunches.
or the inactivity power management may have kicked in (er..Out)
theducks is online now   Reply With Quote
Old 09-30-2012, 06:27 PM   #464
Firedancer885
Occassional Beta Tester
Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.Firedancer885 can teach chickens to fly.
 
Posts: 230
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab
Quote:
Originally Posted by theducks View Post
Your laptop may have grown (looks like lint ) cooling issues and overheats on long crunches.
or the inactivity power management may have kicked in (er..Out)
I think it's the "overheat on long crunches" issue. None of my power management options are set to shutdown or hibernate.
Firedancer885 is offline   Reply With Quote
Old 10-05-2012, 04:41 AM   #465
vargaviktor
Member
vargaviktor began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2012
Device: Alcatel T60 Tablet (Android 2.x)
Quote:
Originally Posted by Firedancer885 View Post
I think it's the "overheat on long crunches" issue. None of my power management options are set to shutdown or hibernate.
Random shutdowns can be occured because:
-Power voltage problems
1. check your power adator with multimeter, if you have the exact output, then look after the accumulator.
2. if you have enough voltage from the adaptor, maybe the internal electronics are going to be wrong (condensators)
if internal electronics converts 19 V to 12 V and 5 V, you need to check the voltage on the sata power adaptor too.
3. memory problems (use memcheck)
-Ventillation (overheat) problems (clean it)
vargaviktor is offline   Reply With Quote
Reply

Tags
page count

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 797 12-16-2014 01:01 PM
[GUI Plugin] Open With kiwidude Plugins 251 12-15-2014 01:07 PM
[GUI Plugin] Quick Preferences kiwidude Plugins 32 09-13-2014 11:34 PM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 01:02 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 12:28 AM.


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