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 08-31-2011, 10:20 AM   #136
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by unboggling View Post
I recently started using Count Pages for page counts and love it. I have only one very minor question: Is it possible to change the format for the interger column to display the numbers aligned right somehow, if necessary with leading zeros? I spent an hour the other day messing around with {0:,} trying to get leading zero's to even things out at 4 digits, and couldn't get it to work. Maybe I just don't know enough template language yet.

Edit: oops, missed the last post. Or is it Python formatting language?
Have you tried right-clicking the column heading -> Change text alignment for ... -> Right?
Man Eating Duck is offline   Reply With Quote
Old 08-31-2011, 10:30 AM   #137
unboggling
Wizard
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
Quote:
Originally Posted by Man Eating Duck View Post
Have you tried right-clicking the column heading -> Change text alignment for ... -> Right?
Thanks.

I've been using calibre for eight months and this is the first time I right clicked a column heading.

It's productive to ask questions around here.
unboggling is offline   Reply With Quote
Advert
Old 08-31-2011, 11:27 AM   #138
han_32
Member
han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.
 
Posts: 20
Karma: 2139376
Join Date: Aug 2011
Device: Kindle 3
Thank you, Man Eating Duck! after onea false start (what, noticing your formula had "words" and I had called my column "word) it works perfectly. I am really not fussy about how it truncates, but I really like the information now. I think somehow Kwords is now taking the place of page count for me, I sort of got a mental idea of how long a 10K or 500K book is supposed to be.

Last edited by han_32; 08-31-2011 at 11:30 AM. Reason: typo.
han_32 is offline   Reply With Quote
Old 08-31-2011, 12:01 PM   #139
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by han_32 View Post
Thank you, Man Eating Duck! after onea false start (what, noticing your formula had "words" and I had called my column "word) it works perfectly. I am really not fussy about how it truncates, but I really like the information now. I think somehow Kwords is now taking the place of page count for me, I sort of got a mental idea of how long a 10K or 500K book is supposed to be.
Good, happy to help!

A minor correction to the template: The old one didn't round, this one will round to the closest thousand words:
{#word:'re(divide(add($, 500) ,1000),'\..*','k')'}
Ie 9500 -> 10k and 9499 -> 9k. Even nittier pick: Lower case 'k' is kilo, upper case 'K' is Kelvin.

On a side note I'd like a "test template with the following value" field on the "Edit a custom column" dialog, restarting Calibre after every change to check if it works quickly gets old
Man Eating Duck is offline   Reply With Quote
Old 08-31-2011, 12:03 PM   #140
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by unboggling View Post
Thanks.

I've been using calibre for eight months and this is the first time I right clicked a column heading.

It's productive to ask questions around here.
No problem. I actually prefer the same thing myself, but didn't think to investigate it until you requested it
Man Eating Duck is offline   Reply With Quote
Advert
Old 08-31-2011, 12:54 PM   #141
han_32
Member
han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.
 
Posts: 20
Karma: 2139376
Join Date: Aug 2011
Device: Kindle 3
It works - or I think so, I did not notice any counts changing, but it works. And now, for yet another bug (sorry) is there any chance we can put an if in the formula, so the formula is only done if the word count is not empty? As it is the new column is calculating 0 to all records with empty word (and page count). It´s not a big deal, asking just in case because it would be my next tweak, but do not know how.

And don´t worry, I would never multiply temperature by word count! (though it would be funny, what would be the entropy of each book. hmm)
han_32 is offline   Reply With Quote
Old 08-31-2011, 01:15 PM   #142
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by han_32 View Post
It works - or I think so, I did not notice any counts changing, but it works. And now, for yet another bug (sorry) is there any chance we can put an if in the formula, so the formula is only done if the word count is not empty? As it is the new column is calculating 0 to all records with empty word (and page count). It´s not a big deal, asking just in case because it would be my next tweak, but do not know how.
Try this (put something between the quotes before the last parentesis if you want something else than the empty string):
{#word:'test($,re(divide(add($, 500) ,1000),'\..*','k'),'')'}

Another issue, btw, is sorting. If you omit the suffix you can enable sorting by number, but there is no "sort numerically"-option if the field contains any letters.

Quote:
Originally Posted by han_32 View Post
And don´t worry, I would never multiply temperature by word count! (though it would be funny, what would be the entropy of each book. hmm)
Could be dangerous. My copy of War and Peace would be hot enough to fuse even heavy elements, with unpredictable results
Man Eating Duck is offline   Reply With Quote
Old 08-31-2011, 01:29 PM   #143
han_32
Member
han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.han_32 ought to be getting tired of karma fortunes by now.
 
Posts: 20
Karma: 2139376
Join Date: Aug 2011
Device: Kindle 3
Thanks yet again - you are right, sort was not too good, I will make do with the 0, for better sorting ability. I am going to look at those examples and hit the tutorials again, I really want to learn how to use this *more*.

Andyou are being really unfair to War and Peace And I think a lot of this IT documentation and guides, have unbeatable entropy, at least with W&P i feel like I get a chance if I try to tackle it on my own!
han_32 is offline   Reply With Quote
Old 09-11-2011, 06:19 AM   #144
kiwidude
Calibre Plugins 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,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.2.0 Released

Changes in this release:
  • Upgrade to support the centralised keyboard shortcut management in Calibre

Requires Calibre 0.8.18. Any keyboard shortcut you had previously assigned to the "Count Pages" action will be lost and manually reassigned either from the Customize Plugin option or Preferences->Keyboard.
kiwidude is offline   Reply With Quote
Old 10-19-2011, 06:50 PM   #145
GeekyGal
Enthusiast
GeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavensGeekyGal is a rising star in the heavens
 
Posts: 40
Karma: 13888
Join Date: Sep 2010
Device: Kindle FireHD, Kindle3G, iPad, MacBook, iRex Illiad (ret)
Thank you, kiwidude. I used Count Pages after a massive reorganization of my library recently. The trick earlier in the thread to convert the .MOBI files with illogical page counts to .EPUB and then re-count the .EPUBs worked almost every time. I found that I had a bare handful of files which still had counts very much too low. That acted as my list of obviously corrupted files I had to re-download or re-import into Calibre. Worked like a charm. Those all got fixed.

I still have some page counts which seem far too high - mostly for ominbus "Complete Works of ..." Sets in the 20K page range. But it does give what feels like accurate relative sizes - thin novel, average golden age mystery, long F & SF epic all seem to be about where the paper books would come out.

THANK YOU.
GeekyGal is offline   Reply With Quote
Old 10-25-2011, 07:05 PM   #146
ElMiko
Addict
ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.
 
ElMiko's Avatar
 
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
I've been thinking -- as I do -- about ways in which people who are more talented than I am could make my life easier. Which led me to wondering about the Goodreads metadata plugin and the Count Pages plugin. Specifically, Goodreads tracks book lengths (as do Amazon and B&N) by ISBN. I was wondering why metadata fetching couldn't access that field when its doing its queries from those sites. I'm curious as to the feasibility and/or desirability of integrating that reference-based functionality into the Count Pages plugin (or into basic metadata fetching).

PS - I started writing this as a new thread, then I changed my mind and started writing it in the Goodreads thread, and finally settled on this one. Sorry if I'm in the wrong place).
ElMiko is offline   Reply With Quote
Old 10-26-2011, 03:25 AM   #147
kiwidude
Calibre Plugins 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,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@ElMiko - the reason why it isn't integrated into the metadata download plugins is discussed in this thread. Basically it just isn't technically possible with the way Calibre works currently, and the intersection of those who want it vs those who have the knowledge of how to change Calibre to support it hasn't met yet

So that means it can't be done in a metadata download plugin. Could it be added to this plugin? Technically it would be possible. The main reason why I haven't is holding off to see if it was possible to do it with the metadata download plugin instead, which would be a better place for it imho.

If I did add it to this plugin, it needs some thought as to how it would work. For instance, does it become another "Page count algorithm" choice in the dropdown, so that you could choose Goodreads (or Amazon)? What does the plugin do if it cannot find the book or the book has no page count specified (not every edition on the website has page counts)? Does it leave it as zero? Or does the plugin have to support some sort of fallback option? People mixing page counts generated by the plugin vs page counts from the website could end up with a bit of a mess, but maybe that is the exception.
kiwidude is offline   Reply With Quote
Old 10-26-2011, 07:16 AM   #148
Zetmolm
Guru
Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.
 
Posts: 612
Karma: 2031728
Join Date: Jan 2010
Device: PocketBook Touch (622), PocketBook Touch Lux 2, Pocketbook Touch HD 3
Thanks for the plugin, kiwidude!
In addition to my epub and mobi books, I have a lot of fb2 books. Is there a chance that you can add support for this format in the (near) future? Of course I can convert my books to epub or mobi, but doing that just for the purpose of getting a page/word count seems like overkill (plus it takes a lot of processing time).
Zetmolm is offline   Reply With Quote
Old 10-26-2011, 07:23 AM   #149
Vaesse
Zealot
Vaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolate
 
Vaesse's Avatar
 
Posts: 107
Karma: 33020
Join Date: May 2011
Device: Kindle Paperwhite
And I'm still hoping for a TXT based word count, as that's my fall-back option for books.
Vaesse is offline   Reply With Quote
Old 10-26-2011, 07:55 AM   #150
ElMiko
Addict
ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.
 
ElMiko's Avatar
 
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
D'oh! As per usual, asked and answered!

Thank you for your explanation, though (and the interesting discussion that you linked). I am constantly being reminded that merely because something may be simply conceived, it's rarely simply achieved.

Unsurprisingly, you raise valid questions about the design characteristics involved in integrating this kind of functionality into the Count Pages plugin, particulary what kinds of processes woudl be most efficient for dealing with metadata retrieval exceptions. My inclination would be to answer "Yes" to all of the hypothetical solutions you propose! But, of course, I'm not the poor bastard figuring out how to do it and writing the code for it! I can, however, be more constructive in responding to the philosophical (rather than functional) question/concern you raise in the final sentence about pagecount consistency. Short version: I don't think this would be a problem. Longer version: As it stands, the Count Pages plugin (as I understand it) is using one of two algorithms to estimate the number of pages in a book. This quality of "estimation" is further evidenced by the substantial difference in page counts depending on which of these algorithms the user selects. One will result in page counts similar to the Kindle's, and another will results in page counts similar to Calibre's internal e-reader. And even there, it's not entirely consistent. And sometimes (rarely), due to hinky (yeah, technical term) formatting in the source file, Page Count will give up the ghost and come up with a page count of 1 (or 4, or 7, or 12) for what ought to be a novel-length work. At which point, the user goes in and manually changes the page count to what he thinks is closer to the reality he's aiming for. Given this, I would imagine that most users of the plugin are using it to establish a general concept of book-length, not some scietifically, objectively abosolute measure. Referring to physical pagecounts from a online source would merely be yet another (useful) way to conceptualize book-length, but it wouldn't be any more objectively "real" than the two page count algorithms currently available. In the event that a metadata retrieval came up empty, as I see it the user would either find that one of the available algorithms closely approximated the page count of the physical book, or he would manually input a page count that made him happy. The point is, since we're dealing with flexible process to begin with -- one of approximations -- I doubt that a user would lose too much sleep over small differences between algorithmically generated page counts and page counts retrieved from an external source.

---

PS - Not Page Count related: In the link you provided, I was gratified to see interest -- if only passing -- in extracting literary award information from Goodreads (or some other online source) to Tags. These kinds of functionality fantasies set my heart aflutter.

Last edited by ElMiko; 10-26-2011 at 08:19 AM.
ElMiko 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 05:32 PM.


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