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, 06: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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
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, 09:24 AM   #452
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: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney 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
Advert
Old 09-25-2012, 11:06 AM   #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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@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, 02:12 PM   #454
rlh3
Connoisseur
rlh3 began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jul 2012
Device: iPad
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, 05: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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@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
Advert
Old 09-25-2012, 05:27 PM   #456
rlh3
Connoisseur
rlh3 began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jul 2012
Device: iPad
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, 07: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, 07:58 PM   #458
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: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney 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, 03: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: 283
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab 4 (wifi only)
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, 04: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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@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, 04: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: 283
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab 4 (wifi only)
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, 05: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: 73,660
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
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, 06:31 PM   #463
theducks
Well trained by Cats
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: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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 offline   Reply With Quote
Old 09-30-2012, 05: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: 283
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab 4 (wifi only)
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, 03: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
count, count pages, page count, pages, plugin

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 1171 03-23-2024 05:18 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 PM
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 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 07:55 PM.


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