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-24-2013, 06:49 PM   #616
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,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
It also suggests that the problem is in, or now mismatched with a core Calibre utility
Code:
calibre/customize/zipplugin.py
theducks is offline   Reply With Quote
Old 11-24-2013, 07:26 PM   #617
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Some time ago, Calibre changed something to the zip/unzip functionality. I assume Count Pages has been updated to take this into account.

If this is the latest version of Count Pages, installed in an old Calibre install, then this may be the issue.
Katsunami is offline   Reply With Quote
Advert
Old 11-25-2013, 01:11 AM   #618
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)
I'm using Ubuntu Linux 13.10 and both the latest official Calibre and all the latest plugins.
Firedancer885 is offline   Reply With Quote
Old 11-25-2013, 01:17 AM   #619
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error is because there is no hungarian translation for this plugin, and it can be ignored, it does not affect the functioning of the plugin.
kovidgoyal is offline   Reply With Quote
Old 11-25-2013, 01:46 AM   #620
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)
Thanks Kovid. But then why do I get it right at startup when I use calibre-debug -g?
And when I switch the language to en-gb, I get the same for english.
Firedancer885 is offline   Reply With Quote
Advert
Old 11-29-2013, 12:16 PM   #621
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.
 
JimmXinu's Avatar
 
Posts: 6,324
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Firedancer885 View Post
Hi,

when I try to use Count Pages, I get this:
Code:
Count Page/Word Statistics
Traceback (most recent call last):
  File "site-packages/calibre/customize/zipplugin.py", line 42, in get_resources
  File "zipfile.py", line 931, in read
  File "zipfile.py", line 957, in open
  File "zipfile.py", line 905, in getinfo
KeyError: "There is no item named u'translations/hu.mo' in the archive"
...
Those are probably from my plugins. The way Kovid implemented translation for plugins, you get that message for each plugin that has translations, but not for your language.
JimmXinu is online now   Reply With Quote
Old 01-22-2014, 05:29 PM   #622
sengian
Zealot
sengian doesn't littersengian doesn't litter
 
sengian's Avatar
 
Posts: 105
Karma: 132
Join Date: Jul 2010
Location: Roubaix, France
Device: PRS-T1;PRS-650;PocketBook Touch Lux 2
Translation + option for removing the update confirm dialog

A plugin modification adding translation of the plugin (general pot and french done) and an option to remove the confirmation dialog before updating.
Not extensively tested, for review and test.

Edit:
-22/01/2014: Changed the plugin zip to add a small bugfix and the correct(?) calibre version for plugin translation
-19/07/2014: Port to Qt5 (davidfor modifications included)
Attached Files
File Type: zip Translations.zip (6.2 KB, 214 views)
File Type: zip Count Pages.zip (258.0 KB, 236 views)

Last edited by sengian; 07-19-2014 at 06:47 AM.
sengian is offline   Reply With Quote
Old 01-25-2014, 01:41 PM   #623
Gary_M_Mugford
Groupie
Gary_M_Mugford has a complete set of Star Wars action figures.Gary_M_Mugford has a complete set of Star Wars action figures.Gary_M_Mugford has a complete set of Star Wars action figures.
 
Gary_M_Mugford's Avatar
 
Posts: 180
Karma: 299
Join Date: Jul 2010
Location: Brampton ON
Device: Kobo, Kindle3
Hi all,

At the risk of confirming my lack of expertise, I must admit to having a problem. I'm trying to write a search that, after using the Count plug-in, will show me the the books that have a blank value in the pgs column. I have tried date:>=2daysago and #pgs:blank and that earns me a red search box. date:>=2daysago and #pgs:empty does the same. Changing to #pgs:<1 gives me a green box, but no results. Which is wrong. Eliminating the # prefix to pgs produces almost the exact cycle, except all searches are green, with no results and wrong.

Pgs is an integer column and works perfectly fine with the count plug-in. When the Count plug-in returns an info box saying it couldn't calculate for x books, I've assumed it was because the file was in a format that can't be counted, DOC for example. And I let things go. But I found an instance of an EPUB that wasn't counted. I clicked on the book and discovered it was corrupted. I had to delete the book.

Where there is one, there are more. So, I'd like to write a search that would find problematical books so that I could investigate.

Any ideas on how I should create my search to do that?

Thanks in advance for any help, GM
Gary_M_Mugford is offline   Reply With Quote
Old 01-25-2014, 02:03 PM   #624
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Hold tight....

Code:
#pgs:false
That's it. It returns all books for which #pgs has no value. If #pgs is 0, it DOES have a value, and so the book will not be returned.

If you want to find all books that either have no value for #pgs or have a value of 0 or less (maybe due to an error), use this:

Code:
(#pgs:false OR #pgs:<=0)
And yes, this works as well to find all books for which no useful page number is defined:

Code:
(NOT #pgs:>=1)
The following finds all books by Tolkien, that have no page number, or a number of 0 or lower:

Code:
(#pgs:false OR #pgs:<=0) AND (author:Tolkien)
This also works:

Code:
(NOT #pgs:>=1) AND (author:Tolkien)
===

I like to use brackets to avoid confusion about where an operand belongs.

Code:
(NOT #pgs:>=1) AND (NOT author:Salvatore)
As I don't know Calibre's precedence rules by heart (and they are sometimes different between programming languages as well), I just avoid all confusion and always use brackets. It never fails.

Last edited by Katsunami; 01-25-2014 at 02:24 PM.
Katsunami is offline   Reply With Quote
Old 01-25-2014, 02:22 PM   #625
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,807
Karma: 54830978
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 Katsunami View Post

As I don't know Calibre's precedence rules by heart (and they are sometimes different between programming languages as well), I just avoid all confusion and always use brackets. It never fails.

Another believer in Mr. Murphy
theducks is offline   Reply With Quote
Old 01-25-2014, 02:28 PM   #626
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Murphy? Something could go wrong in that post, so it did.

() are parentheses .
[] are brackets.
{} are braces.
<> are chevrons.

So in Calibre's search, use parentheses , not brackets, or it won't work.

#$%@$#%$@#% MURPHY!! DIE!11

Spoiler:

In Dutch, they are all called brackets, or "haakjes":

() : ronde haakjes (round brackets).
[] : vierkante haakjes (square brackets).
{} : gekrulde haakjes (curly brackets).
<> : gebroken haakjes (broken brackets).

Last edited by Katsunami; 01-25-2014 at 02:33 PM.
Katsunami is offline   Reply With Quote
Old 01-26-2014, 02:27 AM   #627
Gary_M_Mugford
Groupie
Gary_M_Mugford has a complete set of Star Wars action figures.Gary_M_Mugford has a complete set of Star Wars action figures.Gary_M_Mugford has a complete set of Star Wars action figures.
 
Gary_M_Mugford's Avatar
 
Posts: 180
Karma: 299
Join Date: Jul 2010
Location: Brampton ON
Device: Kobo, Kindle3
Quote:
Originally Posted by Katsunami View Post
Hold tight....

Code:
#pgs:false
That's it. It returns all books for which #pgs has no value. If #pgs is 0, it DOES have a value, and so the book will not be returned.

If you want to find all books that either have no value for #pgs or have a value of 0 or less (maybe due to an error), use this:

Code:
(#pgs:false OR #pgs:<=0)
And yes, this works as well to find all books for which no useful page number is defined:
As a programmer, I'm a big believer in bracketed clauses ... er ... snippets of code inside parenthesis.

While I could have sworn I tried false, it appears I was wrong. Indeed, using the particular bit of code, properly parenthesized, along with my date parameter has done the trick. It found the eight offending docs AND the three other files of supposedly count-worthy format that failed due to corruption of some sort in the file. As a result, the potential issues have been excised and I feel better about ignoring those informative boxes after I do a count.

Thanks for all the of the help.
Gary_M_Mugford is offline   Reply With Quote
Old 02-26-2014, 10:09 AM   #628
Kraftwerk
Zealot
Kraftwerk began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Oct 2011
Location: UK
Device: Paperwhite 2
I have just installed this plugin, a plugin which will be very useful (can't believe I didn't see it years ago!).

I want to know the number of pages of all the books I have in my library:
Can I click one button to do this or do I have to manually choose every book that I have and do it that way?

Concerning the 'Sending your Custom Count to a Kindle':
Can you explain what this will do exactly and how it will look on my Kindle 4?

Thanks
Kraftwerk is offline   Reply With Quote
Old 02-26-2014, 10:29 AM   #629
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Quote:
Originally Posted by Kraftwerk View Post
I want to know the number of pages of all the books I have in my library:
Can I click one button to do this or do I have to manually choose every book that I have and do it that way?
Just select the books in your library all at once, and the plugin will count all of them.

Quote:
Concerning the 'Sending your Custom Count to a Kindle':
Can you explain what this will do exactly and how it will look on my Kindle 4?
There are Amazon books that have "Real Page numbers". They have an additional file, beside the book itself, which is downloaded if you get the book directly from the site using the Kindle. This extra file contains the information needed to make the Kindle display page numbers.

Normally, if you send books to the Kindle using Calibre, the Kindle driver generates that file.

You can right-click the Device icon (with the Kindle connected), and provide the #pages column (or the name you've chosen) to the driver. Instead of calculating the page number using an algorithm, it will use the page numbers that were counted by Count Pages. This gives you the option to set custom page counts.

I use a custom page count of 2400 characters a page; I obtained the number by counting the amount of characters in a few English Del Rey paperbacks.

If you tap the top of the screen on the Kindle, it'll show the page number at the bottom; either the one provided by Amazon (on a directly downloaded book), the one generated by the driver, or the one provided by Count Pages (if you put the column name into the driver).

One caveat: to get this to work on a new Kindle or one that has had a factory reset, you must first download and open a real, unmodified Amazon book, page through it a bit, and then display the page number. This seems to be necessary to activate this function. For me, it never worked if I didn't do this first. Afterward, you can remove the book from the Kindle.

Just buy a free book that has "real page numbers", and leave it in your library.

(Note: this behaviour could be different on different Kindles, or with different firmware.)
Katsunami is offline   Reply With Quote
Old 02-26-2014, 12:30 PM   #630
Kraftwerk
Zealot
Kraftwerk began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Oct 2011
Location: UK
Device: Paperwhite 2
Katsunami: Thank you for the detailed reply.
Kraftwerk 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 04:58 PM.


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