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 01-19-2017, 07:41 AM   #1006
bravosx
Zealot
bravosx began at the beginning.
 
Posts: 106
Karma: 10
Join Date: Jun 2014
Location: Poland, Żory
Device: Prestigio PER3464B, Onyx Lynx, Lenovo S5000 i Tab4-8"
@BeckyEbook

Quote:
Originally Posted by BeckyEbook View Post
Version 1.6.13 - 19 Jan 2017 - by Becky
Added option to download page count from Lubimyczytac.pl website
New: Polish translation
Thanks for the Polish version of the plugin.

bravosx
bravosx is offline   Reply With Quote
Old 01-19-2017, 07:37 PM   #1007
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by BeckyEbook View Post
Version 1.6.13 - 19 Jan 2017 - by Becky
Added option to download page count from Lubimyczytac.pl website
New: Polish translation

Based on 1.6.12 beta by davidfor
German and Spanish translations was updated for support 1.6.13
Thanks for the new translation and the function. You did base this one a slightly older beta, so I'll merge this with the later version over the weekend.

One thing is, I'm a little hesitant about adding the page download for other sites. The number of users that downloading from Lubimyczytac.pl website will help is relatively small. And what happens if someone wants to add another source? The menu could start getting long. But, the added function is very useful to those who want it. That makes me think about how to handle it.

The simplest is of course just to display all the items. But, I'm going to see the "Lubimyczytac.pl" and want to press it Better would be to have some options in the config to set which menu options are displayed. That way it can be clean for those who want it.

An alternative is to stick with one menu item that is something like "Get page count from web sources". Then choose the source based on the identifiers on that book. Plus a priority for the sources. That way you could set Lubimyczytac.pl as first followed by Goodreads. If the book has both identifiers, then Lubimyczytac.pl will be used, if it only has Goodreads, then the Goodreads will be used. And if the page count isn't found on the first source, should the later ones be tried?

And writing that makes me fell like both options should be available. Anyone with an opinion? Or even better, a useful opinion?

In the meantime, I will merge the code and do some cleanup. Once I have done that I'll decide whether to release it or post a beta. I might release it to get the other changes out and then decide about the best way to handle the multiple web sources.
davidfor is offline   Reply With Quote
Old 01-19-2017, 08:38 PM   #1008
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: 21,766
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidfor View Post
I might release it to get the other changes out and then decide about the best way to handle the multiple web sources.
I agree - get the version with your ICU and Use Preferred Output related changes released before adding any new functionality.

BR
BetterRed is offline   Reply With Quote
Old 01-20-2017, 03:03 AM   #1009
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
Quote:
Originally Posted by davidfor View Post
An alternative is to stick with one menu item that is something like "Get page count from web sources". Then choose the source based on the identifiers on that book. Plus a priority for the sources. That way you could set Lubimyczytac.pl as first followed by Goodreads. If the book has both identifiers, then Lubimyczytac.pl will be used, if it only has Goodreads, then the Goodreads will be used.
This is great idea to handle the other sources the page count. I really like it.

Quote:
And if the page count isn't found on the first source, should the later ones be tried?
Maybe additional checkbox in config?
[ ] If the page count isn't found on the first source, stop searching.
or opposite:
[ ] If the page count isn't found on the first source, search in other.

I am a complete beginner in Python, therefore if you find any bug in this edition, please do not yell at me. As soon as the idea of adding a new service to the plugin came into my head -- I had to do it. Really I tried to test all the options.

Speaking of the beta I agree with BetterRed. First, you can publish the final version with the ICU and later thought-out version with support for multiple sources. Version 1.6.13 is not important (you can omit it) -- most important is the idea.
BeckyEbook is online now   Reply With Quote
Old 01-20-2017, 07:20 AM   #1010
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: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One problem with getting page counts from an external site. I've never ever seen an eBook listing that has the correct page number for the eBook. ePub has a specific page count algorithm that does not correspond to a paper book's count. Kindle books have a different algorithm for books that do not have page number file.
JSWolf is offline   Reply With Quote
Old 01-21-2017, 09:47 PM   #1011
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Update to version 1.7.0

Count Pages version 1.7.0 has been release. This includes most of the changes discussed in the last few weeks and at this time last year. The full list of changes is:
  • Fix: Adobe Page count on Mac machines with calibre 2.76 or later.
  • New: Add callback for other plugins calling the count pages. See method call_plugin_callback in common_utils.py.
  • New: Add option to choose between ICU word count and the old one. The default is ICU word count.
  • New: Add language awareness for ICU word count. Uses the language in the book, otherwise defaults to English
  • New: Added German version of Flesch Reading Ease.
  • Update: Changed tooltip in configuration dialog to show on field as well as label.
  • Update: Change way statistics were written to the metadata to reduce side effects.
  • Fix: For word count, text from all files was appended together without a space in between.
  • Update: Only write changes if they are different to the current values.
  • New: Add option to use Preferred Input Format if it is available.
  • New: Added localization support for dialogs.
  • New: Spanish translation thanks to Terisa de morgan.
  • New: Polish translation thanks to BeckyEbook.
  • New: German translation thanks to Dirk-71.
  • Fix: "Fog", not "Fox".

The only recent change not included is downloading the count from Lubimyczytac.pl. I'll work on including that soon. I want to make it easy to add other sites if they come along. Also, it will need at least one extra option and I think it's time to rework the configuration page.

Version 1.7.0 should be available to you the next time you restart calibre. If there are any problems, please report them here.
davidfor is offline   Reply With Quote
Old 01-21-2017, 10:55 PM   #1012
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: 21,766
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
For me it's now lightning fast when the Preferred Output Format (EPUB) option is set compared with using first available Input Format (most often DOCX).

For a 140K word book, 2 seconds versus 28 seconds - in my book that's a massive improvement. Curious - how many lines of code did that change entail - roughly?

Well done

BR

Last edited by BetterRed; 01-21-2017 at 11:55 PM.
BetterRed is offline   Reply With Quote
Old 01-22-2017, 12:49 AM   #1013
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by BetterRed View Post
For me it's now lightning fast when the Preferred Output Format (EPUB) option is set compared with using first available Input Format (most often DOCX).
That should just be because it doesn't have to do the partial conversion of the DOCX to get a format that is easy to count.
Quote:
For a 140K word book, 2 seconds versus 28 seconds - in my book that's a massive improvement. Curious - how many lines of code did that change entail - roughly?
I think the code to add the input format was four of five lines, but having it as an option took it to 20 or 30.
davidfor is offline   Reply With Quote
Old 01-22-2017, 11:54 AM   #1014
BananaTricky
Junior Member
BananaTricky began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jan 2017
Device: Kindle Paperwhite
Question I seem to get the Goodreads word count instead of pages

Hi

I love this plug in and have used it for ages. I use the download word count from Goodreads function but about two months ago I noticed that the page numbers had gone haywire.

I now suspect that it is downloading the word count but bizarrely it doesn't happen for every book, some books it does download the page count.

I was hoping that the new version would 'fix' this issue but I have just run the word count for 14 books and three returned normal page counts, seven returned page counts ranging from 31,000 to 106,000 and four books haven't been linked to Goodreads and/or haven't been linked to books with a page number set.

Is the problem at my end or yours and how can I fix it?
BananaTricky is offline   Reply With Quote
Old 01-22-2017, 05:09 PM   #1015
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by BananaTricky View Post
Hi

I love this plug in and have used it for ages. I use the download word count from Goodreads function but about two months ago I noticed that the page numbers had gone haywire.

I now suspect that it is downloading the word count but bizarrely it doesn't happen for every book, some books it does download the page count.

I was hoping that the new version would 'fix' this issue but I have just run the word count for 14 books and three returned normal page counts, seven returned page counts ranging from 31,000 to 106,000 and four books haven't been linked to Goodreads and/or haven't been linked to books with a page number set.

Is the problem at my end or yours and how can I fix it?
The latest release didn't touch the page count download. And I hadn't looked at it as no-one has reported any problems. About all I can say is that the few times I have tried it, the downloaded count matched what was on the page. Did you check the dowloaded page count against what is actually on the Goodreads page? And make sure you look at the same edition.

To look at this, I need examples. Can you post the goodreads link for the books both the books that got the wrong count and those that got the right count? I can test these and hopefully see what is wrong.
davidfor is offline   Reply With Quote
Old 01-23-2017, 01:55 PM   #1016
Nicolas F
Groupie
Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.
 
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
French translation

Hi

I've been using (and enjoying) this plugin for a long time, so thanks a lot !

I saw in the latest release that you support translations so I made one for french.
I saw that Sengian did one in 2014, but it wasn't complete, so I completed it and I changed some parts as well.
I hope you can include it in the next update.

If there are some french speakers here, feel free to check for spelling mistakes!
Attached Files
File Type: zip CountPages-TradFr.zip (8.3 KB, 221 views)
Nicolas F is offline   Reply With Quote
Old 01-23-2017, 05:41 PM   #1017
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Nicolas F View Post
Hi

I've been using (and enjoying) this plugin for a long time, so thanks a lot !

I saw in the latest release that you support translations so I made one for french.
I saw that Sengian did one in 2014, but it wasn't complete, so I completed it and I changed some parts as well.
I hope you can include it in the next update.

If there are some french speakers here, feel free to check for spelling mistakes!
Thanks, I'll add it to the next release.
davidfor is offline   Reply With Quote
Old 01-25-2017, 05:38 AM   #1018
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Ever since the last version, my custom shortcut for 'Estimate page/word counts' stops working fairly quickly (haven't pinpointed yet how long or after which function). I have to restart Calibre to get it to work again. All other custom shortcuts work -- I've checked them the last 5 times the Estimate one doesn't work any more to be sure, so I figured it was connected to the plugin rather than Calibre.

Any ideas?
MerlinMama is offline   Reply With Quote
Old 01-25-2017, 07:54 AM   #1019
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by MerlinMama View Post
Ever since the last version, my custom shortcut for 'Estimate page/word counts' stops working fairly quickly (haven't pinpointed yet how long or after which function). I have to restart Calibre to get it to work again. All other custom shortcuts work -- I've checked them the last 5 times the Estimate one doesn't work any more to be sure, so I figured it was connected to the plugin rather than Calibre.

Any ideas?
Nope, no ideas.

When it happens, can you start the count using the menu or toolbar button? And is the shortcut still configured?
davidfor is offline   Reply With Quote
Old 01-25-2017, 08:10 AM   #1020
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Quote:
Originally Posted by davidfor View Post
Nope, no ideas.

When it happens, can you start the count using the menu or toolbar button? And is the shortcut still configured?
Yes to both. I also deleted the shortcut and recreated it (twice, once using the same sequence, once with a different sequence). I've been using the custom shortcut for about 6 months, and this started with the last plugin update. I don't think I'm doing anything new or different from before, but who knows.

I'll try and keep watch to figure out if there's something in particular that might be the cause.
MerlinMama 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 1252 08-02-2025 09:53 AM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 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 11:30 AM.


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