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-20-2011, 05:09 AM   #121
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 1,104
Karma: 1510724
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Aura HD
Quote:
Originally Posted by ldolse View Post
I still don't think it's safe to assume that prc is mobi - Calibre supports a number of ebook formats that were popular on PalmOS, mobi just happens to be the most popular one.
True (EReader comes to mind), but those would have a .PDB extension, as Palm datafiles should have. .PRC on Palm was supposed to be a program. AFAIK, there is no .PRC ebook that isn't a Mobi.

Still, we'll get there in the end, seeing Kiwidude's reaction
mbovenka is offline   Reply With Quote
Old 07-20-2011, 09:26 PM   #122
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 469
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows XP, Windows7
I'ts a bit roundabout way. but seemed to work:

Changed .prc extension to .mobi
Imported to Calibre (next to prc)
Got count
Deleted mobi

To be safer, in future I'd import to second (test) library and copy/paste the count. Just in case.
travger is offline   Reply With Quote
 
Enthusiast
Old 08-03-2011, 08:54 AM   #123
lathom
Kindle user
lathom began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Mar 2011
Location: Falls Church, VA
Device: Kindle
Two questions

Is there any way the plugin could have an option to allow the confirmation of import dialog to be skipped - i.e. just go ahead and update the page/word count field without additional input?

Any chance of adding pdf support?

Thanks!
-Andy
lathom is offline   Reply With Quote
Old 08-03-2011, 09:27 AM   #124
Vaesse
Connoisseur
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: 95
Karma: 33020
Join Date: May 2011
Device: Kindle 3 WiFi
I agree on the skipping confirm. I can see maybe leaving it there for people who start the process by accident, but... isn't a new count always going to be the same (or more accurate) than an old count? And we aren't offered a side-by-side comparison, so can't imagine catching problems at this stage in the process. At minimum, it should auto-apply if the field is empty.
Vaesse is offline   Reply With Quote
Old 08-03-2011, 11:18 AM   #125
Nyssa
Series Addict
Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.Nyssa ought to be getting tired of karma fortunes by now.
 
Nyssa's Avatar
 
Posts: 5,455
Karma: 53485457
Join Date: Dec 2010
Location: Florida, USA
Device: Kindle 3 (Wifi Only), Kindle Paperwhite
Quote:
Originally Posted by Vaesse View Post
I agree on the skipping confirm. I can see maybe leaving it there for people who start the process by accident, but... isn't a new count always going to be the same (or more accurate) than an old count? And we aren't offered a side-by-side comparison, so can't imagine catching problems at this stage in the process. At minimum, it should auto-apply if the field is empty.

I agree!
Nyssa is offline   Reply With Quote
Old 08-03-2011, 11:23 AM   #126
theducks
Grand Sorcerer
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: 14,219
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
I believe part of the reason for a Confirmation, is Count Pages runs in background and you may be doing something else with the Library in foreground.
Count Pages needs to know when it is OK(safe) to manipulate the permanent Calibre Database
theducks is offline   Reply With Quote
Old 08-03-2011, 04:04 PM   #127
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
As theducks has touched on, what people (certainly non-developers at least) don't seem to realise is that for the same reasons you cannot have two Calibre instances pointing at the database, you cannot have two threads or processes updating the database at the same time. Calibre does not have any kind of pessimistic locking mechanism. The only way to "safely" update the database is to do so back on the main UI thread. Since you could be doing any sort of other operation in Calibre at the time the only way to guarantee that the database and caches are updated without any conflicts or corruption is to do so in a synchronous fashion in a way the user is guaranteed to not be doing anything else with the database at the same time - by sticking a dialog up that once you click on prevents you from doing anything else until it is done.

It pretty much nothing to do with giving you the opportunity to "cancel" an update or viewing logs in this particular plugin.

If and when Kovid ever comes up with another mechanism for queuing database updates then we can look to change this.
kiwidude is offline   Reply With Quote
Old 08-07-2011, 06:02 PM   #128
Ron.
Evangelist
Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.
 
Ron.'s Avatar
 
Posts: 448
Karma: 864744
Join Date: Mar 2011
Device: Kindle 3, LookBook, Nook Simple Touch
This is a mighty fine plugin, thank you Sir!
Ron. is offline   Reply With Quote
Old 08-07-2011, 06:15 PM   #129
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
@Ron - thx mate, glad it is working well for you.
kiwidude is offline   Reply With Quote
Old 08-14-2011, 07:48 AM   #130
Ron.
Evangelist
Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.
 
Ron.'s Avatar
 
Posts: 448
Karma: 864744
Join Date: Mar 2011
Device: Kindle 3, LookBook, Nook Simple Touch
I notice if I save a book to disk it saves the page count in the opf file (which is cool) but it looks like this in the opf

Code:
<meta name="calibre:user_metadata:#pages" content="{&quot;is_category&quot;: false, &quot;is_editable&quot;: true, &quot;kind&quot;: &quot;field&quot;, &quot;is_custom&quot;: true, &quot;is_csp&quot;: false, &quot;#extra#&quot;: null, &quot;column&quot;: &quot;value&quot;, &quot;colnum&quot;: 1, &quot;rec_index&quot;: 21, &quot;search_terms&quot;: [&quot;#pages&quot;], &quot;link_column&quot;: &quot;value&quot;, &quot;label&quot;: &quot;pages&quot;, &quot;is_multiple&quot;: null, &quot;datatype&quot;: &quot;int&quot;, &quot;#value#&quot;: 501, &quot;category_sort&quot;: &quot;value&quot;, &quot;table&quot;: &quot;custom_column_1&quot;, &quot;is_multiple2&quot;: {}, &quot;display&quot;: {&quot;number_format&quot;: &quot;{0:,}&quot;}, &quot;name&quot;: &quot;Pages&quot;}"/>

do I have something configured wrong ?
Ron. is offline   Reply With Quote
Old 08-14-2011, 08:08 AM   #131
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
Nope, that is just how custom column metadata gets written to opf files by Calibre, nothing to do with this plugin.
kiwidude is offline   Reply With Quote
Old 08-24-2011, 07:46 AM   #132
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: 252
Karma: 69784
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Thanks again for a very convenient plugin!

Regarding the "FAILED TO COUNT PAGES" errors and updating: After updating to the latest 1.3.1 (from some early version, albeit one with word count, unfortunately I replaced it and don't remember exactly) I got this error with no traceback. It turned out that my custom column had moved from Word count options to Page count options, see attachment.

I don't use page count (which now had the #words column configured), and Word count suddenly had no column configured. Of course it's easy to fix if you know about it, but there was no hint about this in the error message making it a bit confusing. I am completely sure that I didn't change anything myself.

I guess this is due to a stale configuration, in config.py from the updated plugin the keys are named
Code:
KEY_PAGES_CUSTOM_COLUMN = 'customColumn'
KEY_WORDS_CUSTOM_COLUMN = 'customColumnWords'
And this suddenly became a too long post about something that's probably a non-issue
Attached Thumbnails
Click image for larger version

Name:	Page_count_error.PNG
Views:	92
Size:	16.1 KB
ID:	75720  
Man Eating Duck is offline   Reply With Quote
Old 08-31-2011, 08:22 AM   #133
han_32
Junior Member
han_32 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2011
Device: Kindle 3
I installed this plugin, and I love it. No major problems. Thank you very much to developer.

Is there any way to tweak the word count presentation? As it is I copied the word count column (integer, format {0:;} and it presents word count as for example 104563 or 34512 words. i would love to truncate it, to present just how many thousand words. I tried to read the documentation on python formating but am too computer illiterate to understand. Anybody got any suggestion, please, on how to do this?

I thought of another shortcut - set up a new column, reference to the word column data, divide by 1000 and truncate, and then hide the word column and show just the column with K-words. But I can also not figure out how to make it (I read documentation, really, but my programming foundations are non-existent and can not figure it out on my own so far). Anybody can helo?
han_32 is offline   Reply With Quote
Old 08-31-2011, 09:50 AM   #134
unboggling
by the bootstraps
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,052
Karma: 858115
Join Date: Jan 2011
Location: Southeast US
Device: PRS-T2, Nexus 7, KindleT, iPad1, Kindle3KB
Edit3: Please disregard these questions, Man Eating Duck answered downstream.

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 integer 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.

Edit1,2: oops, missed the last post, or is it Python formatting language?

Last edited by unboggling; 08-31-2011 at 10:41 AM. Reason: last para, fix mispelled "integer"; answered.
unboggling is offline   Reply With Quote
Old 08-31-2011, 10:05 AM   #135
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: 252
Karma: 69784
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by han_32 View Post
I thought of another shortcut - set up a new column, reference to the word column data, divide by 1000 and truncate, and then hide the word column and show just the column with K-words. But I can also not figure out how to make it (I read documentation, really, but my programming foundations are non-existent and can not figure it out on my own so far). Anybody can helo?
You're on the right track. This is not very elegant, but it works:

My words column is named, originally enough, #words. I add a custom column as follows:

Lookup: words1000

Column heading: 1000 words

Type: Column built from other columns

Template: {#words:'re(divide($,1000),'\..*','')'}

This gives you a plain number of thousands. Since the float is truncated by a regular expression you can add whatever suffix you want, for instance to get 100K you'd replace '\..*','' above with '\..*','K' or '\..*',' thousands'.

If you want a prefix it's also possible by using the re() function as an argument in a strcat.

Good luck
Man Eating Duck 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] Kindle Collections meme Plugins 2058 07-15-2014 01:36 AM
[GUI Plugin] Quality Check kiwidude Plugins 729 07-10-2014 06:35 PM
[GUI Plugin] Open With kiwidude Plugins 223 07-09-2014 02:42 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 04:15 PM.


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