Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 05-28-2011, 11:17 AM   #1
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
Quality check some extra function

so here is a version I made myself with filetype extension finding support inside epubs.
I used it to search on: db, store

and found a lot of files.
Mind you, it is very verbose, just to test

THIS IS NO OFFICIAL RELEASE.
NO GUARANTEE, NO SUPPORT (AND KIWIDUDE HAS HAD NO HAND IN THIS RELEASE, SO DON'T BLAME HIM FOR ERRORS)

I did not see the quality check threat so started a new one.
While this is not a release by kiwidude, and I'm not usually programming in python, I moved it here.
This version is a little less verbose than the version I put in the original post.
It is also somewhat faster because I did put som code outside the loop.
Attached Files
File Type: zip qualcheck.zip (68.8 KB, 312 views)
drMerry is offline   Reply With Quote
Old 05-28-2011, 11:21 AM   #2
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
I must rebuild it to speed it up.
At this time it processes one extension per loop. so 10 extensions takes 10 times longer to process.
I will replace this with an or function..
drMerry is offline   Reply With Quote
Advert
Old 05-28-2011, 11:37 AM   #3
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
@kiwidude, if you are not interested in adding / supporting this options, please tell me, so I have some more functions I would like to add. If it will not be in the quality-check plugin, I will put it in a epub-check plugin myself.
drMerry is offline   Reply With Quote
Old 05-28-2011, 11:59 AM   #4
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,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
I will add something to quality check if I can be convinced that others will find it useful.

However in this case I am yet to agree that looking for files in an ePub by extension or file size falls in that category. They aren't a "quality check" as such, they are more like an epub search.

I already have the unmanifested files check, which in combination with the log will tell you which ePubs have unneeded files in them and what they are. So that picks up the stray files that are not supposed to be in there. I don't know what you mean by exe files in your epubs, but if they are not in the manifest the existing quality check function will pick them up.

So if you want to do your own "epub search" type plugin to put this functionality in then go for it. I can rename this thread for you if you want/decide to go down that route.
kiwidude is offline   Reply With Quote
Old 05-28-2011, 12:40 PM   #5
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
Thank you for this reaction.
I will go on with my own plugin in that case.
I did found an exe file inside an epub by using your plugin.
With my new function I also found som files that where manifested but I would not like to have there (think of large images, but allso once an exe file).

This exe file was inside a valid epub. So I could read normally. When I started the epub, I did see the .exe was completely integreted in the epub and had a link in the book. If you clicked it, there was a program to started.
All very nice, no virus or any thing, but I do not want to have that on for example, my ereader. So It should be nice to have a way to test for those files.

It are files that create a 'quality issue' when using the epubs on other devices. Or it are tempory check files of other programs that are not necessarily turning down your quality, but the consume useless space (and in my case, 2 test files caused your duplicate bit compare to fail, after remove they where the same).

Because I do not want to limit the file-types, I created this part.

While you do not implement this function in your code, I will have to start from scratch so maybe you'd better close or remove this threat so our plugins will not be 'connected' and I get some time before a first version is posted.
drMerry is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1184 04-17-2024 06:17 PM
Extra spaces in Sigil noteon Sigil 2 04-08-2011 02:42 PM
Getting extra Paragraphs MacEvansCB Calibre 5 12-19-2010 02:46 PM
Extra AC charger for the eReader? pluber Sony Reader 26 09-01-2007 12:36 PM


All times are GMT -4. The time now is 04:21 AM.


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