![]() |
#676 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
Is there a setting I'm missing so that the plugin will just add the page and word counts without the additional popup box that you need to click OK for each book where it says "Count Complete, Proceed with updating columns..."?
|
![]() |
![]() |
![]() |
#677 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,164
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
But you can queue 1 or 42 books at a time, still only 1 confirmation per batch. |
|
![]() |
![]() |
![]() |
#678 | |
....
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
|
Quote:
![]() So how does the user know when there are no clashes and so safe for them to hit "OK", and why does the application not know all by itself if there are any clashes or not? If the application does know (which one would assume is the case) then why can it not automatically implement the action, at the completion of the count, that would otherwise follow the hitting of the "OK" button? Or is there some limitation in the plugins' API or Python that prevents files being rewritten without user sanction (which would be a surprise) even though the user's knowledge regarding whether it is safe to do so or not would appear to me to be non-existent. It has seemed to me that apparently redundant "OK" buttons appear with a number of plugins e.g. Modify Epub. |
|
![]() |
![]() |
![]() |
#679 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
Ah, got the reasoning behind it, thanks for the info.
And I'd bet anything I never waited for the current jobs to finish and I just clicked that button OK, and it just increased the job count by 1 more if I remember. I'll have to purposely try forcing that situation and see if that's really what happens. |
![]() |
![]() |
![]() |
#680 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,733
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@anotherCat - it is pretty clear you are not a developer.
The point of the confirmations are that at the end of the day the library for integrity reasons can only have one action being performed on it at a time. This is a combination of the file system that books are stored in and the actual database that stores your library metadata. You cant run the risk of having two simultaneous actions taking place that result in a conflict that potentially leaves either in a corrupted state. What if you were renaming the author at the same time as a plugin tries to write a new version of the epub into the folder? The action to move books into a new folder from the authot rename, and the action to write the book file are independent of each other, and depending on whether one completes first (or indeed both try at the same time) you get any number of potential problems happen. Like the new version of the epub gets written to the old (now orphaned) folder for that book. Or the book move fails because the file is in use because it is currently being written to. Or any number of other problems that leave you in a right messy state. So the simplest solution is to prevent those two conflicting actions from occurring at the same time. And the way this is done is by the mere fact that by forcing the user to click ok on the button, control is not returned to you as a user until the action that the confirmation wants to perform is completed. This guarantees the plugin has exclusive access to your library to do its work without fear of conflicts. So no the buttons are not "redundant". I do agree that they are something it would be nice to avoid, but I cant guarantee that the user will not do something "dumb" at the same time as the plugin tries to do its ing that results in some nasty errors in calibre. In the case of page counts, what happens if you do a page count, then delete the book before you do the confirmation for instance. Or delete or rename the custom column? There are just too many things that "could" have nasty consequences and potentially resulting in calibre crashes, which noone is happy about a plugin causing. Sure people could swear black and blue that they would never do any sort of conflicting action (that they know of) but that 1 in x chance that someone does could have such dire consequences it is not worth the risk. The one proviso I will add is that these plugins were written a long time ago, and calibre has moved on since then. Perhaps Kovid now has other protection available via the code to offer an alternative to the prompts, certainly there was not back then and this was the standard pattern every plugin that manipulated the calibre library in this sort of way followed... |
![]() |
![]() |
![]() |
#681 | |
....
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
|
No I am not a developer and have not claimed to be so I wonder why you are wanting to point that out.
However, I have managed some very big complex technology projects of values >$100millions and have had my own employees seconded into one of the worlds largest defence contractors as the client's software engineer contributors to the development. I am used to searching for reasons when software engineers claim something cannot be done and have often enough led them to discovering clues for themselves as to resolving issues in software through that questioning. So, if I were to be of the same dismissive mindset (I am not) I could perhaps echo your own words along the lines of "it is pretty clear you have not managed large complex development projects". But I am in no position to know your background and make assumptions about it, just as you are in no position to make such judgements about mine. Quote:
Last edited by AnotherCat; 11-05-2014 at 03:22 PM. Reason: Added missing [QUOTE] tag |
|
![]() |
![]() |
![]() |
#682 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,733
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Sometimes I wonder why I bother replying. Good grief. Whatever dude. You pissed me off with your "redundant" comment above and all this "would be a surprise" nonsense, making it sound like I had no clue what I was doing. Hence why you got the first line back. If I was really being dismissive I wouldn't have wasted the next 10 minutes writing the rest of the technical explanation as to why the plugin is the way it is.
Don't bother replying, MobileRead has a marvellous feature that allows me to be "truly" dismissive. Last edited by kiwidude; 11-06-2014 at 04:17 AM. |
![]() |
![]() |
![]() |
#683 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2014
Device: Kindle Paperwhite
|
Fantastic plug-in!
I had an idea for a feature: Would it be possible to list the number of *unique* words, i.e., so you can see how many actual different words are in a book? I'm currently learning German, and I have a bunch of children's ebooks, with varying levels of vocabulary. If I could go through them from the most limited vocabulary to the largest, I think it'd be awesome. It'd be great for other language learners as well, and also be very telling about which writers use the most verbal variety. ![]() |
![]() |
![]() |
![]() |
#684 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,881
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#685 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,164
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Sigil's spell checker will show (also can be sorted) those also. Just tick the box at the bottom of the list. Lots of ways to reach the destination ![]() |
|
![]() |
![]() |
![]() |
#686 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,881
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I can't think of anything in the Sigil word list that's not the calibre list - but there are things in the calibre list that are not in the Sigil list - numeric 'words', language, case sensitive filtering and clearer indication of misspellings are a few I can see. BTW I use the Sigil spell checker because it is (was maybe, haven't checked in recent times) significantly faster when using large dictionaries. Anyway the OP can decide - attaching a side-by-side comparison - the great Sigil v Calibre word list shoot-out ![]() BR Last edited by BetterRed; 11-12-2014 at 03:33 PM. |
|
![]() |
![]() |
![]() |
#687 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,164
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#688 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2014
Device: Kindle Paperwhite
|
That's great, but what if I want to sort my book collection by NDW (Number of different words)? I want to read the books in my target language with the least amount of vocabulary first, and then move up to books with more lexical diversity later. I'd have to do that 't' thing for hundreds of ebooks and then manually add the data to a custom column. Is there a way to automate the process?
|
![]() |
![]() |
![]() |
#689 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,881
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@stevenlebeau - counting unique words is probably not enough, you need something like the FK and GF Readability Indices PI already has, but for German - here's a paper I found on that ==>> Readability Classification for German using lexical, syntactic, and morphological features
You could hack the PI source to add more indices - the source is in the ZIP. If you're reading standard student texts there could be an external source that has something you can grab via a metadata download PI. The German language is regulated by the Rat für deutsche Rechtschreibung, so they may have something, or you could try your local branch of Goethe-Institut. BR |
![]() |
![]() |
![]() |
#690 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2014
Device: Kindle Paperwhite
|
It's a crude metric for sure, but I think it'll still be beneficial.
I thought about hacking the source code and adding the code to do this myself, but was hoping to avoid it. I've programmed quite a bit in Python, but I've only ever done command-line stuff, and never anything with significant OO. I'll look at the source code and see if I can figure something out, though. |
![]() |
![]() |
![]() |
Tags |
count, count pages, page count, pages, plugin |
|
![]() |
||||
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 |