07-20-2011, 05:09 AM | #121 | |
Wizard
Posts: 2,018
Karma: 13471689
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
Quote:
Still, we'll get there in the end, seeing Kiwidude's reaction |
|
07-20-2011, 09:26 PM | #122 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
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. |
Advert | |
|
08-03-2011, 08:54 AM | #123 |
Kindle user
Posts: 22
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 |
08-03-2011, 09:27 AM | #124 |
Zealot
Posts: 107
Karma: 33020
Join Date: May 2011
Device: Kindle Paperwhite
|
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.
|
08-03-2011, 11:18 AM | #125 | |
Series Addict
Posts: 6,180
Karma: 167189477
Join Date: Dec 2010
Location: Florida, USA
Device: Kindle Paperwhite (2nd Gen)
|
Quote:
I agree! |
|
Advert | |
|
08-03-2011, 11:23 AM | #126 |
Well trained by Cats
Posts: 29,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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 |
08-03-2011, 04:04 PM | #127 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
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. |
08-07-2011, 06:02 PM | #128 |
Evangelist
Posts: 448
Karma: 864744
Join Date: Mar 2011
Device: Kindle 3, LookBook, Nook Simple Touch
|
This is a mighty fine plugin, thank you Sir!
|
08-07-2011, 06:15 PM | #129 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Ron - thx mate, glad it is working well for you.
|
08-14-2011, 07:48 AM | #130 |
Evangelist
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="{"is_category": false, "is_editable": true, "kind": "field", "is_custom": true, "is_csp": false, "#extra#": null, "column": "value", "colnum": 1, "rec_index": 21, "search_terms": ["#pages"], "link_column": "value", "label": "pages", "is_multiple": null, "datatype": "int", "#value#": 501, "category_sort": "value", "table": "custom_column_1", "is_multiple2": {}, "display": {"number_format": "{0:,}"}, "name": "Pages"}"/> do I have something configured wrong ? |
08-14-2011, 08:08 AM | #131 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Nope, that is just how custom column metadata gets written to opf files by Calibre, nothing to do with this plugin.
|
08-24-2011, 07:46 AM | #132 |
Addict
Posts: 254
Karma: 69786
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' |
08-31-2011, 08:22 AM | #133 |
Member
Posts: 20
Karma: 2139376
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? |
08-31-2011, 09:50 AM | #134 |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
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. |
08-31-2011, 10:05 AM | #135 | |
Addict
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
|
Quote:
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 |
|
Tags |
count, count pages, page count, pages, plugin |
|
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 |