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-18-2012, 12:17 PM   #556
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,601
Karma: 2092290
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.
kiwidude is offline   Reply With Quote
Old 07-18-2012, 12:42 PM   #557
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by kiwidude View Post
CSS validation I don't recall ever coming up on this thread (beyond the wish for detecting unused styles). I vaguely recall some discussion in the Sigil forum but I never paid any notice to it. It would have to be an offline option so if you have a particular candidate tool I'm happy to give it a quick whirl. Though of course it may suffer the same pitfalls as those other tools above and again be something that would be best implemented in Sigil...
Well, the w3 validation can be downloaded for offline use. The jar file can be downloaded and called with options. At least, that is what W3 is saying.

I tend to agree with the arguments of EpubCheck and FlightCrew, although I tend to solve all the errors.
Toxaris is offline   Reply With Quote
Old 07-18-2012, 01:02 PM   #558
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
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
kovidgoyal is offline   Reply With Quote
Old 07-18-2012, 01:13 PM   #559
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,601
Karma: 2092290
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...
kiwidude is offline   Reply With Quote
Old 07-18-2012, 01:59 PM   #560
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,601
Karma: 2092290
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
kiwidude is offline   Reply With Quote
Old 09-01-2012, 10:54 AM   #561
vargaviktor
Member
vargaviktor began at the beginning.
 
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
vargaviktor is offline   Reply With Quote
Old 09-01-2012, 11:19 AM   #562
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,601
Karma: 2092290
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?
kiwidude is offline   Reply With Quote
Old 09-01-2012, 11:35 AM   #563
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: 29,688
Karma: 54369090
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 kiwidude View Post
@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?
I think he wanted an average for the listed properties of the images inside
theducks is offline   Reply With Quote
Old 09-01-2012, 11:50 AM   #564
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,601
Karma: 2092290
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.
kiwidude is offline   Reply With Quote
Old 09-01-2012, 12:32 PM   #565
vargaviktor
Member
vargaviktor began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2012
Device: Alcatel T60 Tablet (Android 2.x)
Quote:
Originally Posted by theducks View Post
I think he wanted an average for the listed properties of the images inside
You have right. An average resolution can be a good measure about a CBZ or CBR file.

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
vargaviktor is offline   Reply With Quote
Old 12-02-2012, 04:33 AM   #566
samy2
Ebook-Fan
samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.
 
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.
samy2 is offline   Reply With Quote
Old 12-02-2012, 07:22 PM   #567
FaceDeer
Connoisseur
FaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enough
 
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.
FaceDeer is offline   Reply With Quote
Old 12-02-2012, 08:13 PM   #568
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: 29,688
Karma: 54369090
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 FaceDeer View Post
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.
Count Images? Not bad
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.
theducks is offline   Reply With Quote
Old 12-04-2012, 05:37 AM   #569
FaceDeer
Connoisseur
FaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enough
 
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.
FaceDeer is offline   Reply With Quote
Old 12-04-2012, 07:41 AM   #570
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,601
Karma: 2092290
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.
kiwidude 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] Search the Internet kiwidude Plugins 423 Today 06:53 AM
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 PM
[GUI Plugin] Clipboard Search kiwidude Plugins 24 03-16-2024 11:06 PM
[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


All times are GMT -4. The time now is 07:13 AM.


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