07-18-2012, 12:17 PM | #556 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Yeah found it in the Sigil/FlightCrew source. Any error code less than 2000 is an error, everything else is a warning.
|
07-18-2012, 12:42 PM | #557 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
I tend to agree with the arguments of EpubCheck and FlightCrew, although I tend to solve all the errors. |
|
Advert | |
|
07-18-2012, 01:02 PM | #558 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@kiwidude: FYI the cssutils package (part of calibre) can do CSS validation.
However, I agree with you that validation tools are pretty useless. They check things that can be easily checked rather than things that actually lead to rendering errors. Validation tools are really a sort of "something must be done, but doing anything useful is too hard so lets do this instead" type of response to the problem of invalid markup. That is why you see HTML 5 for example moving emphasis away from validation and towards defining a parse algorithm instead. The approach I take in calibre is to ignore validation and instead detect and correct patterns that lead to actual user visible problems when rendered in some real world viewer. Often these patterns are perfectly valid as per the validation tools and are bad only because of bugs in the viewers. You are, of course, free to do whatever you like in your plugin |
07-18-2012, 01:13 PM | #559 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Thanks for the CSS link. I'll take a look sometime.
I'm still not convinced about FlightCrew for QC as yet, just in case theducks was getting excited at the prospect . I see that those "errors" I pointed out earlier of stuff that Adobe puts into ePubs are still going to show as "errors" and not "warnings". And I would also guess the reason for that - that there are other html situations which that same error number is being used which aren't because of an adobe meta tag. Its a non-trivial amount of work. I can't see everything being just dumped into an enormous log file being useful or practical. I think theducks had a good suggestion of a feature which gave a count of the errors/warnings, without the details - you open it in Sigil if you want those. However to me the tool looks flawed in the sheer number of "errors" it is going to produce, which means I won't ever use it, and consequently means I have no personal motivation to spend hours adding an implementation for it. If it is a custom column approach, there's all the configuration and implementation of that, plus handling other issues - like theducks suggesting a single column with stuff like "3E2W" but clearly that isn't going to be sortable or naturally searchable which might be an issue for some. So then you would need separate columns for each count. I'm going to pass at this point, I've got one big feature for Find Duplicates I started on today, an official release of Import List and then I am retiring from plugin updates for a while again after this latest 3 month spurt to catchup the todo lists... |
07-18-2012, 01:59 PM | #560 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Ahh, sorry Kovid, I missed your post while I was typing mine. And yes it seems we agree
|
Advert | |
|
09-01-2012, 10:54 AM | #561 |
Member
Posts: 11
Karma: 10
Join Date: Sep 2012
Device: Alcatel T60 Tablet (Android 2.x)
|
Hi kiwidude,
At first congrats for this plugin. Would you like to support CBZ and CBR files too? I had a lot of them and an average DPI and an average x,y size can be a good measure for this. (Just read dpi and x,y size out from the zip or rar, then make an average from it, and put into a field.) Regards. Viktor |
09-01-2012, 11:19 AM | #562 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@vargaviktor - I'm not sure what you are asking for. What feature of Quality Check (there are a lot of them) are you asking about CBR/CBZ support for?
|
09-01-2012, 11:35 AM | #563 |
Well trained by Cats
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
09-01-2012, 11:50 AM | #564 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@theducks - oh, so nothing to do with any existing features of the plugin then, I was trying to figure out if they meant something to do with covers or something.
So to compute averages of image statistics and putting them into custom columns? Not something I'm interested in doing personally, nor is it a fit for this plugin I believe which has no other features which populate custom columns. |
09-01-2012, 12:32 PM | #565 | |
Member
Posts: 11
Karma: 10
Join Date: Sep 2012
Device: Alcatel T60 Tablet (Android 2.x)
|
Quote:
When I first saw the Quality Check plugin I was very happy, because i though this was what I looking for. But I found out, that I have mainly comic books in scanned format. An addition and another addition to the Count Pages can give to the comics book collectors a big help. When a new scan appears, the DPI, and the pixels is the measure of its quality. (If you count the number of files too, you do the latest important measure, how many pages were scanned.) regards, Viktor |
|
12-02-2012, 04:33 AM | #566 |
Ebook-Fan
Posts: 398
Karma: 698564
Join Date: Feb 2011
Device: PRS T1
|
Problem/Bug:
Solved. Got it myself. It was this highlight/not highlight stuff... Last edited by samy2; 12-02-2012 at 04:36 AM. |
12-02-2012, 07:22 PM | #567 |
Connoisseur
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
|
Is there a way to use this (or some other similar plugin) to identify epubs in my library that have images other than the cover image (ie, disregarding the cover image entirely)? I just learned that the fan fiction downloader can be set to not compress images, so I've got a bit of updating to do and don't want to just re-download everything. There aren't a lot of epubs in my collection that have illustrations but they're well hidden in amongst those that don't.
I think I'll be able to hack a crude image count into the page count plugin for this one-time use, so no worries if there isn't. I'll probably learn a lot about writing Calibre plugins if I end up having to go that route. |
12-02-2012, 08:13 PM | #568 | |
Well trained by Cats
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It might be useful to have an optional: over n bytes in size (to leave out small dingbat sized images. I said bytes so the image did not have to be opened). Sort of a count pages. |
|
12-04-2012, 05:37 AM | #569 |
Connoisseur
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
|
Unfortunately the quick-and-dirty hack didn't work out as easily as I'd hoped - the iterator.spine thingy that looked really promising at first glance turns out to only index the HTML files inside an epub. Work's been crazy busy so I didn't dig deeper, probably won't for a few days yet. At which point I'll take this over to the Count Pages plugin thread, since that still seems like the most appropriate plugin to be fiddling with.
|
12-04-2012, 07:41 AM | #570 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@FaceDeer - which approach you take depends on what you want to do. If like theducks said you just want to find epubs that have more than one image, then it would be trivial to hack that into this plugin. If you look in check_epub.py and the check_epub_unused_images function you have a more complex example of everything you need - it builds up a list of all the images in the epub (as well as a list of html files in its case which you don't need), you can just check the length of the list and if >1 then return True. Put that in a new function, add it to the config.py file so it appears in the menu and job done. Running the check would then display all epubs with more than one image, which you could use bulk edit to add a tag to or whatever. Of course when I release a new version of Quality Check you will have to reintegrate your changes each time, but I can't see any general interest in this feature of finding a count of images greater than a threshold to put it into the main release?
If instead you want that count recorded in a custom column or you want it to run in the background then doing a version of Count Pages for your own requirements would work. However it would be a lot more work. I will say if you go down the latter approach then rather than posting on the Count Pages thread, post any questions in the development forum since you are making a new plugin. Just keeps the noise down in that Count Pages thread. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Clipboard Search | kiwidude | Plugins | 29 | 04-02-2024 10:05 PM |
[GUI Plugin] Search the Internet | kiwidude | Plugins | 433 | 04-01-2024 05:48 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Kindle Collections (old) | meme | Plugins | 2070 | 08-11-2014 12:02 AM |
[GUI Plugin] Book Sync **Deprecated** | kiwidude | Plugins | 111 | 06-07-2011 07:47 PM |