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 11-04-2014, 08:58 PM   #676
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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..."?
Ripplinger is offline   Reply With Quote
Old 11-04-2014, 09:15 PM   #677
theducks
Well trained by Cats
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: 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:
Originally Posted by Ripplinger View Post
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..."?
No. You must do the confirmation to prevent DB access clashes.

But you can queue 1 or 42 books at a time, still only 1 confirmation per batch.
theducks is offline   Reply With Quote
Old 11-04-2014, 11:12 PM   #678
AnotherCat
....
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
Quote:
Originally Posted by theducks View Post
No. You must do the confirmation to prevent DB access clashes...
That response infers that the user knows if there are access clashes or not and the application does not .

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.
AnotherCat is offline   Reply With Quote
Old 11-04-2014, 11:13 PM   #679
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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.
Ripplinger is offline   Reply With Quote
Old 11-05-2014, 09:42 AM   #680
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,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...
kiwidude is offline   Reply With Quote
Old 11-05-2014, 03:13 PM   #681
AnotherCat
....
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
Quote:
Originally Posted by kiwidude View Post
@anotherCat - it is pretty clear you are not a developer......
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:
Originally Posted by kiwidude View Post
...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...
So you see, it seems you are now saying it may be possible - just not as you believe the code now is. Perhaps it is too much work, I realise the resource constraints, or perhaps it would turn out that it is not possible, but none of those things disqualify me from asking the questions I did nor be deserving of a dismissive response as your first line.

Last edited by AnotherCat; 11-05-2014 at 03:22 PM. Reason: Added missing [QUOTE] tag
AnotherCat is offline   Reply With Quote
Old 11-06-2014, 03:31 AM   #682
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,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.
kiwidude is offline   Reply With Quote
Old 11-12-2014, 01:48 AM   #683
stevenlebeau
Junior Member
stevenlebeau began at the beginning.
 
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.
stevenlebeau is offline   Reply With Quote
Old 11-12-2014, 05:05 AM   #684
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,881
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by stevenlebeau View Post
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.
For EPUB and AZW it already exists. The Spellchecker in the calibre editor (press 't' on a book) can list all the different words in a book with counts of each, and there's a Filter feature - so list words with 'strasse'.

BR
BetterRed is offline   Reply With Quote
Old 11-12-2014, 11:07 AM   #685
theducks
Well trained by Cats
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: 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:
Originally Posted by BetterRed View Post
For EPUB and AZW it already exists. The Spellchecker in the calibre editor (press 't' on a book) can list all the different words in a book with counts of each, and there's a Filter feature - so list words with 'strasse'.

BR
BR
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
theducks is offline   Reply With Quote
Old 11-12-2014, 03:26 PM   #686
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,881
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
BR
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
But why would I send someone off to use, and maybe install, Sigil when what they want is available in calibre. I'm pretty sure the OP has calibre installed, because he/she popped their question in a calibre plug-in thread.

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
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	314
Size:	223.9 KB
ID:	130995  

Last edited by BetterRed; 11-12-2014 at 03:33 PM.
BetterRed is offline   Reply With Quote
Old 11-12-2014, 03:50 PM   #687
theducks
Well trained by Cats
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: 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:
Originally Posted by BetterRed View Post
Anyway the OP can decide - attaching a side-by-side comparison

BR
Just tossing in OPTIONS

I use both editors, because they both (currently) offer different features
theducks is offline   Reply With Quote
Old 11-12-2014, 06:26 PM   #688
stevenlebeau
Junior Member
stevenlebeau began at the beginning.
 
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?
stevenlebeau is offline   Reply With Quote
Old 11-12-2014, 07:57 PM   #689
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,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
BetterRed is offline   Reply With Quote
Old 11-12-2014, 08:11 PM   #690
stevenlebeau
Junior Member
stevenlebeau began at the beginning.
 
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.
stevenlebeau 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 08:57 AM.


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