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-13-2012, 07:07 AM   #361
Boekenworm
Junior Member
Boekenworm is on a distinguished road
 
Posts: 4
Karma: 50
Join Date: Jun 2012
Device: iPad
Thumbs up Thanks, exactly what I asked for!

@Kiwidude ,
Thank you for upgrading the plugin and so quickly.
As far as I can tell it works perfectly, exactly what I was looking for!

I found a tiny documentation-bug. The link in the configuration screen to Flesch-Kincaid points to a wrong wikipedia page instead of here.

Just as theducks I noticed that the first time I opened the configuration screen it was too short and I had te resize it to be able to read it.

Thank you very much!
Boekenworm.
Boekenworm is offline   Reply With Quote
Old 07-13-2012, 10:19 AM   #362
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
@Boekenworm,

I will make sure the URL link is corrected. The url I had was correct in its raw form in the code but it got "double encoded" to become incorrect.

I think I will just put a minimum width on the dialog (rather than a mnimum height) and that should stop the resizing/word-wrap issue on that Readability statistics line.

Glad to hear it is doing what you asked for. I'll officially release it tonight or tomorrow.
kiwidude is offline   Reply With Quote
Old 07-14-2012, 11:41 AM   #363
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,591
Karma: 456789
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
FYI, the tooltip on 'Always overwrite an existing word/page count' needs some line wrapping. It's wider than my whole screen.

Is there supposed to be more than one Word count algorithm available? I'm only seeing one.
JimmXinu is offline   Reply With Quote
Old 07-14-2012, 11:48 AM   #364
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
Tooltip works fine on my triple monitor setup.

The dropdown has gone from the code for the official release but well spotted...
kiwidude is offline   Reply With Quote
Old 07-14-2012, 12:56 PM   #365
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
v1.6.0 Released

Changes in this release:
  • Add three new statistics for calculating readability - Flesch Reading Ease, Flesch-Kincaid Grade Level and Gunning Fog.
  • Remove the redundant Words algorithm combo since only one algorithm offered.
  • Make page algorithm a per library setting rather than a plugin level setting
  • For CBR and CBZ book formats, calculate the number of pages as being the number of image files rather than converting to ePub
  • For CBR and CBZ book formats, only allow the Count Pages statistic and ignore all other statistics
  • Fix tooltip missing line breaks in configuration dialog
kiwidude is offline   Reply With Quote
Old 07-15-2012, 09:00 PM   #366
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 241
Karma: 1009530
Join Date: Apr 2011
Location: Geelong, Australia
Device: Sony PRS-T1, Sony PRS-350, Palm TX
Hi Kiwi,

One of the books in my library gives the following error:

Spoiler:
Code:
Count Page/Word Statistics
-------------------------------
Logfile for book ID 51 (The Hitchhiker's Guide To The Galaxy)
	Found 109 pages
51
InputFormatPlugin: EPUB Input running
on C:\DOCUME~1\Simon\LOCALS~1\Temp\calibre_0.8.60_tmp_xclnhr\bw_e3g_count_pages\51.epub
Found HTML cover titlepage.xhtml
	Page count: 109.0
	Word count: 0
	Results of NLTK text analysis:
	  Number of characters: 0
	  Number of words: 0
	  Number of sentences: 1
	  Number of syllables: 0
	  Number of complex words: 0
	  Average words per sentence: 0
Traceback (most recent call last):
  File "calibre_plugins.count_pages.jobs", line 156, in do_statistics_for_book
  File "calibre_plugins.count_pages.statistics", line 290, in get_flesch_reading_ease
ZeroDivisionError: float division by zero


This is for an old eReader PRC that Calibre converted to ePub, and it looks like the conversion has gone horribly wrong. The <title> is approx 350kb and the body is:

Code:
<body class="calibre"/>
Should the plugin fail a bit more graciously here - perhaps catch the 0 word count and not update the databse?

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 07-15-2012, 09:43 PM   #367
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 6,529
Karma: 43521910
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
@snarkophilus: Not sure why you bother with word and page count on this book; you KNOW it's 42 for either one.
PeterT is offline   Reply With Quote
Old 07-16-2012, 03:08 AM   #368
odinokij
Member
odinokij began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2012
Device: Kindle 3
Thanks a lot, kiwidude, for your prompt support for cbr/cbz files. It works great. Thanks again.
odinokij is offline   Reply With Quote
Old 07-16-2012, 07:49 AM   #369
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
@snarkophilus - I've made a change for the next version which will do as you suggest of aborting calculating statistics for that particular book and printing why in the log. In that situation you displayed it would still store a page count, but it would leave any other word count or readability statistics untouched. So if you haven't yet set a value, they will stay blank, and if it already has a value, that will stay as it is.

I'll hold off on releasing the change for a few days to see if anything else comes up.
kiwidude is offline   Reply With Quote
Old 07-16-2012, 02:20 PM   #370
lbolton
Junior Member
lbolton began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2010
Device: android
Hi.

Like many, I've scoured the intermess to find, assemble and manage a large collection. Though I don't use it often, My wife is temporarily homebound and has found this a significant comfort.

Your plugin is one of the most useful tools I've found, and I've quickly come to rely on it heavily.

I've recently noted some behaviors that may not have been mentioned here.
I've included some representative log entries.

My system is:
Opensuse 12.12
KDE 4.7.2
Calibre 0.8.60

First, starting with the plugin versions available on 0.8.59,
And, using any of the three algorithms available,
scanning an entry with ONLY a pdf file, will give a valid page count, but a word count of 0 (zero). I haven't diagnosed this extensively. If I could relearn python, I'd have just helped rather then begged.

Second, unfortunately, the new word count WILL overwrite an older. no matter what settings are used.

Third, I'm sure its been noticed, but there seems to be a number of unicode characters
that throw a fatal error that will abort a job.

Most especially, I seem to have a large number of files originally encoded to include:
a particular rendition of single quotes with codes of \u2018 and \u2019. Though there are many others.

I would like to join other voices in encouraging a few enhancements to overcome these.

I wonder if there are not python libraries that more gracefully or completely handle
some of these problematic characters.
Or, include a user accessible enumerated list of potentially incorrect characters with
an appropriate mapping.
Or, mayhap, Both? I'd like to imagine that a list of exceptions or replacement rules could be called from calibre's existing conversion tools.

I wonder if it's possible to simply log such errors without aborting the job.

I wonder if it may be possible to allow an option to simply keep the epub conversion
created to enable the count of PDFs.

log follows.
----------------------------------------cut---------------------------------------

--------------------------------------------cut---------------------------------------
shire:~ # calibre-debug --gui
Starting up...
Started up in 6.74 seconds with 10029 books
Job: 1 Get device information started
DeviceJob: 1 Get device information done, calling callback
DeviceJob: 1 Get device information callback returned
Job: 2 Get list of books on device started
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= FOLDER_DEVICE oncard= None
DEBUG: 0.0 USBMS: dirs are: /local/staging/
DEBUG: 0.0 USBMS: scan from root False /local/staging/
DEBUG: 0.0 USBMS: count found in cache: 43, count of files in metadata: 43, need_sync: False
DEBUG: 0.0 USBMS: Finished fetching list of books from device. oncard= None
DEBUG: 0.1 USBMS: Fetching list of books from device. Device= FOLDER_DEVICE oncard= carda
DEBUG: 0.1 USBMS: Fetching list of books from device. Device= FOLDER_DEVICE oncard= cardb
DeviceJob: 2 Get list of books on device done, calling callback
Job: 1 Get device information finished
No details available.
Job: 2 Get list of books on device finished
No details available.
DeviceJob: 2 Get list of books on device callback returned
Job: 2 Get list of books on device finished
No details available.
Worker Launch took: 0.23487496376
InputFormatPlugin: EPUB Input running
on /local/books/James Patrick Kelly/10 16 to 1 (4098)/10 16 to 1 - James Patrick Kelly.epub
Found HTML cover titlepage.xhtml
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::begin: Paint device returned engine == 0, type: 2
/usr/bin/xdg-open: line 322: test: KDE Development Platform: 4.7.2 (4.7.2) "release 5": integer expression expected
/usr/bin/xdg-open: line 323: test: KDE Development Platform: 4.7.2 (4.7.2) "release 5": integer expression expected
/usr/bin/xdg-open: line 324: test: KDE Development Platform: 4.7.2 (4.7.2) "release 5": integer expression expected

(process:11870): GLib-CRITICAL **: g_main_context_pop_thread_default: assertion `g_queue_peek_head (stack) == context' failed
Worker Launch took: 0.245404005051
Job: 4 Convert book 1 of 1 (10 16 to 1) finished
Convert book 1 of 1 (10 16 to 1)
Resolved conversion options
calibre version: 0.8.60
{'asciiize': False,


.................deleted----------------


No TOC, MOBI index not generated
MOBI output written to /tmp/calibre_0.8.60_tmp_bbWOxU/QZ_OuQ.mobi


(process:11848): GLib-CRITICAL **: g_main_context_pop_thread_default: assertion `g_queue_peek_head (stack) == context' failed

(process:11848): GLib-CRITICAL **: g_main_context_pop_thread_default: assertion `g_queue_peek_head (stack) == context' failed
shire:~ #
-------------------------------------------------cut-------------------------------------


TIA
lbolton is offline   Reply With Quote
Old 07-16-2012, 02:42 PM   #371
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
@lbolton

1. You will get a word count of zero for PDFs that contain image pages (that haven't been OCR'd).

2. With the change I have mentioned in post right before yours the next release of the plugin will treat a zero word count as an "error" situation in that it will just write a message to the log and not write zero into the custom column.

3. Any issues to do with PDF conversions are *nothing* to do with this plugin. They are calibre/PDF library issues. If you have a specific pdf that causes a fault with this plugin, you will almost certainly get the same fault when you use calibre to do a PDF-> EPUB conversion. As such follow the official calibre support routes - you can raise a ticket, attach the PDF in question and it is possible someone will take a look at it. If calibre can convert the PDF without crashing, so should this plugin.

4. Keeping the temporary PDF to count pages is not going to happen. If you want an EPUB version, convert before you count pages, and this plugin will then work with that EPUB. As has been well documented PDF-> EPUB versions generally suck and require much editing and tuning to look anything like the original - what this plugin produces is designed only for the purposes of estimating a word count, not human readability.

5. As per my answers in 3, I'm afraid the log isn't something I can do anything about.
kiwidude is offline   Reply With Quote
Old 07-17-2012, 02:33 PM   #372
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
v1.6.1 Released

Changes in this release:
  • If a book has zero words, just display an error in log rather than storing zero in the column
kiwidude is offline   Reply With Quote
Old 07-19-2012, 02:05 AM   #373
bauerhjb
Enthusiast
bauerhjb began at the beginning.
 
bauerhjb's Avatar
 
Posts: 35
Karma: 19
Join Date: Apr 2010
Location: northern Idaho, USA
Device: netbook
Hi
I just installed v1.6.1 and it shows all books as having zero words. Counts the pages ok. Any idea why it might do this? The version before worked great for pdfs. I even re-did some counts as a check between this version and the one before. Books that had word counts previously now show zero words. Don't mean to complain. Is there a chance of getting the previous version to use instead?
Using calibre 8.60, windows vista (no cracks please..)

Thanks for all the great work you do on these plugins.

Last edited by bauerhjb; 07-19-2012 at 02:11 AM. Reason: added system & calibre version
bauerhjb is offline   Reply With Quote
Old 07-19-2012, 05:47 AM   #374
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
v1.6.2 Released

Changes in this release:
  • Make the html tag removal for body tag data case insensitive to fix issue with PDF conversions from 1.6.0
@bauerhjb - thx for bringing this to my attention, it would have been broken with the changes in 1.6.0. I don't store PDFs in my main library so I hadn't noticed it.
kiwidude is offline   Reply With Quote
Old 07-20-2012, 04:35 PM   #375
Josieb1
Wizard
Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.Josieb1 ought to be getting tired of karma fortunes by now.
 
Josieb1's Avatar
 
Posts: 1,348
Karma: 2526116
Join Date: Nov 2009
Location: UK
Device: KPW2, KPW1, Kobo Aura, Nook Glow, Ipad Air, Ipad Mini 2, IPhone 5
Hi I have just downloaded the new update to this plug in and I now get page counts not word counts, for mobi files, even though my settings appear to be on word count.

Can anyone help please? I really need word counts back
Josieb1 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] Quality Check kiwidude Plugins 736 Today 04:48 AM
[GUI Plugin] Open With kiwidude Plugins 228 Today 01:06 AM
[GUI Plugin] Kindle Collections meme Plugins 2058 07-15-2014 01:36 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 05:51 AM.


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