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 10-14-2020, 01:05 PM   #1021
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: 25,688
Karma: 35353741
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Calibre 5.2 and Quality check PI, Check Metadata is behaving odd.
When I ran Check Author Sort or Check Title Sort it NOW is very bursty
(does a bunch, pauses, does more. overall, a lot slower)
theducks is offline   Reply With Quote
Old 10-21-2020, 07:35 AM   #1022
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 147
Karma: 10500
Join Date: Dec 2017
Device: Kobo
I just had an idea for a new feature :
Check if the ePub contain a another ePub file.

It may be extremely specific, but I've come across far too many books with this that I'm looking for a reliable way to hunt them down.
Thanks
un_pogaz is offline   Reply With Quote
Advert
Old 10-21-2020, 07:37 AM   #1023
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 60,056
Karma: 56698693
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by un_pogaz View Post
I just had an idea for a new feature :
Check if the ePub contain a another ePub file.

It may be extremely specific, but I've come across far too many books with this that I'm looking for a reliable way to hunt them down.
Thanks
What ePub has another ePub? I've never see this. can you point out some eBooks that have this?
JSWolf is online now   Reply With Quote
Old 10-21-2020, 08:35 AM   #1024
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 147
Karma: 10500
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by JSWolf View Post
What ePub has another ePub? I've never see this. can you point out some eBooks that have this?
I can't give any specifics name. but I saw her. I don't know where it comes from, but, it's a real pain in the ass.
This kind of thing can make an ePub get really big.
original ePub < 500 kb
inner ePub > 4 MB

And in fact... I managed to modify my Quality Check to include the feature.

Code
config.py
Code:
       ('check_epub_inside_epub',  {'name': 'Check ePub inside ePub',             'cat':'epub',     'sub_menu': 'Check ePub Structure',     'group': 3, 'excludable': True,  'image': 'images/check_book.png',        'tooltip':'Check for ePub formats containing a ePub inside'}),
check_epub.py
Code:
EPUB_FILES = ['.epub']
ALL_ARTIFACTS = ITUNES_FILES + BOOKMARKS_FILES + OS_FILES + EPUB_FILES

...

    def perform_check(self, menu_key):

...

        elif menu_key == 'check_epub_inside_epub':
            self.check_epub_inside_epub()

...
...

    def check_epub_inside_epub(self):

        def evaluate_book(book_id, db):
            path_to_book = db.format_abspath(book_id, 'EPUB', index_is_id=True)
            if not path_to_book:
                self.log.error('ERROR: EPUB format is missing: ', get_title_authors_text(db, book_id))
                return False
            try:
                found = False
                displayed_path = False
                with ZipFile(path_to_book, 'r') as zf:
                    for resource_name in self._manifest_worthy_names(zf):
                        extension = resource_name[resource_name.rfind('.'):].lower()
                        if extension in EPUB_FILES:
                            if not displayed_path:
                                displayed_path = True
                                self.log('ePub found in: <b>%s</b>'%get_title_authors_text(db, book_id))
                            self.log('\t<span style="color:darkgray">%s</span>'%resource_name)
                            found = True
                return found

            except InvalidEpub as e:
                self.log.error('Invalid epub:', e)
                return False
            except:
                self.log.error('ERROR parsing book: ', path_to_book)
                self.log(traceback.format_exc())
                return False

        self.check_all_files(evaluate_book,
                             no_match_msg='No searched ePub books have a ePub inside',
                             marked_text='epub_inside_epub',
                             status_msg_type='ePub books with a ePub inside')
A good listener, Chalut

EDIT: I realize that FONT_FILES does not include '.woff' and '.woff2'. It's true that the formats are recent and not supported on all reader, but they have become very common and I wouldn't be surprised to see them appear in a ePub.

Last edited by un_pogaz; 10-21-2020 at 08:47 AM.
un_pogaz is offline   Reply With Quote
Old Yesterday, 03:40 PM   #1025
ownedbycats
Guru
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
Posts: 933
Karma: 288270
Join Date: Oct 2018
Device: Kobo Aura HD
Small request: Could it be possible to use ellides (...) for lengthy titles in the progress dialog? I have a book with an extremely lengthy title and after QC processes it the dialog becomes wide enough to push the Cancel button off-screen.

Click image for larger version

Name:	2020-10-29 16_39_01-Checking 4346 books for invalid title sort  (0 matches)....png
Views:	13
Size:	4.3 KB
ID:	183068

ownedbycats is offline   Reply With Quote
Advert
Old Yesterday, 04:20 PM   #1026
Section8
Addict
Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.
 
Section8's Avatar
 
Posts: 221
Karma: 1700000
Join Date: Oct 2011
Location: Arlington, TX
Device: Kindle PW2, Nook ST, Nook Color, Sony PRST1
Quote:
Originally Posted by JSWolf View Post
What ePub has another ePub? I've never see this. can you point out some eBooks that have this?
My guess is, he/she is just talking about an omnibus.
Section8 is offline   Reply With Quote
Old Yesterday, 05:13 PM   #1027
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 60,056
Karma: 56698693
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by Section8 View Post
My guess is, he/she is just talking about an omnibus.
But that's not an ePub within an ePub. An ePub within an ePub would be a ePub eBook inside the first ePub and that I've never seen or heard of before this thread. If that's not what's meant, then please explain what's meant and how to detect whatever it is.
JSWolf is online now   Reply With Quote
Old Yesterday, 05:34 PM   #1028
ownedbycats
Guru
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
Posts: 933
Karma: 288270
Join Date: Oct 2018
Device: Kobo Aura HD
Some sort of packaging error? I've never seen one myself.
ownedbycats is offline   Reply With Quote
Old Yesterday, 08:25 PM   #1029
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 20,260
Karma: 33549158
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by un_pogaz View Post
I just had an idea for a new feature :
Check if the ePub contain a another ePub file.

It may be extremely specific, but I've come across far too many books with this that I'm looking for a reliable way to hunt them down.
Can you point to an example? I have never seen an epub within an epub like you seem to be describing. I don't know if it is allowed by the epub specs or is a packaging error as @ownedbycats. About the only thing I can think of is a zip file containing epubs that was added to calibre and it decided to treat it as an epub. Calibre does look at the contents of zip files when they are added to see if they should be treated as something else.
davidfor is online now   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] Open With kiwidude Plugins 362 Today 08:52 AM
[GUI Plugin] Search the Internet kiwidude Plugins 333 09-05-2020 05:04 PM
[GUI Plugin] Clipboard Search kiwidude Plugins 17 03-29-2020 03:07 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


All times are GMT -4. The time now is 09:24 AM.


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