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 10-21-2018, 08:40 AM   #901
Rob557
Zealot
Rob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-books
 
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
thread: "[GUI Plugin] Quality Check"
Quote:
Originally Posted by fncll View Post
... the log for "Search ePub" ... Where can I view this log?
Hi fncll,
Each time a Quality Check "Search ePub" is run, a small pop-up box appears with the options of either clicking "OK", or first clicking on "view log". That latter option allows you to see the "Search ePub" results log and copy its contents. I don't otherwise know how to access that log via its filename on the hard drive but it may not be a simple stand-alone text file anyway.

FWIW, could you clarify what you mean by seeing a note in the "changelog" ... assuming that is different from the "Search ePub" results log, what action produces a "changelog" and how do you access that log?
Cheers,
Rob
Rob557 is offline   Reply With Quote
Old 10-21-2018, 10:33 AM   #902
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,781
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
'Log" files are almost always TXT files every place I have seen them over the 40 years I have been using computers (as always, there are those who think they have a better way, and use a special dataset. Duho! The computers is broken, I need a SIMPLE / UNIVERSAL way to get the log)
Notepad, Notepad++, even Copy foo.log CON: (with the optional pipe to MORE )
theducks is online now   Reply With Quote
Advert
Old 10-22-2018, 01:20 AM   #903
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Question, has anyone used "Check and repair book sizes recently"? It's not working for me at all. It didn't find any discrepancies (it reported all file sizes matched) whereas there should have been thousands given I just restored ~2,000 mobi files from my backup.
ilovejedd is offline   Reply With Quote
Old 10-23-2018, 01:40 AM   #904
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,307
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ilovejedd View Post
Question, has anyone used "Check and repair book sizes recently"? It's not working for me at all. It didn't find any discrepancies (it reported all file sizes matched) whereas there should have been thousands given I just restored ~2,000 mobi files from my backup.
Worked for me last week. I had editing some epubs in Sigil removing embedded fonts (who the bleep picks those fonts?) and the file sizes don't get updated so Quality Check reports them.
DNSB is offline   Reply With Quote
Old 10-23-2018, 02:12 AM   #905
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by DNSB View Post
Worked for me last week. I had editing some epubs in Sigil removing embedded fonts (who the bleep picks those fonts?) and the file sizes don't get updated so Quality Check reports them.
Thanks. Maybe the plugin just didn't like seeing thousands of discrepancies. Either that or it doesn't play nice in portable mode.

In any case, I just made a #size custom column that I manually update using formats_sizes().
ilovejedd is offline   Reply With Quote
Advert
Old 10-23-2018, 04:18 PM   #906
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Hmm, looking further into this issue, there appears to be two possible causes:

1.) Caching: If I change files while Calibre is shut down, the Quality Check plugin doesn't catch any of the changes but sometimes it does if I make changes while Calibre is running.

2.) Possible use of a mapped legacy function to get the "db" size.

/src/calibre/db/legacy.py -> I believe format_metadata uses os.stat which would give the same file size as os.path.getsize
Code:
    def sizeof_format(self, index, fmt, index_is_id=False):
        book_id = index if index_is_id else self.id(index)
        return self.new_api.format_metadata(book_id, fmt).get('size', None)
/src/calibre/library/database.py
Code:
    def sizeof_format(self, index, format, index_is_id=False):
        ''' Return size of C{format} for book C{index} in bytes'''
        id = index if index_is_id else self.id(index)
        format = format.upper()
        return self.conn.get('SELECT uncompressed_size FROM data WHERE data.book=? AND data.format=?', (id, format), all=False)

Quality Check/check_fix.py
Code:
    for fmt in formats.split(','):
        db_size = db.sizeof_format(book_id, fmt, index_is_id=True)
        book_path = db.format_abspath(book_id, fmt, index_is_id=True)
        if not book_path:
            self.log.error('Unable to find path to book id:', book_id, db.title(book_id, index_is_id=True))
            continue
        if os.path.exists(book_path):
            actual_size = os.path.getsize(book_path)
            if actual_size != db_size:
That's pretty much the extent of my practically non-existent Python reading skills.

Fixing the code so sizeof_format gets information from database instead of os.stat or to prevent caching is way beyond my skill set. I'm fairly adept at cut-and-paste though, so I managed to add a nuclear option Force repair book sizes. Per the option name, this will forcibly update the sizes for all formats regardless if it's been changed or not so use with care. I only use it with Search scope - Selected book(s).
Attached Files
File Type: zip Quality Check-mod.zip (128.9 KB, 246 views)
ilovejedd is offline   Reply With Quote
Old 11-04-2018, 12:38 PM   #907
fncll
Enthusiast
fncll began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Oct 2002
Location: AK
Quote:
Originally Posted by Rob557 View Post
thread: "[GUI Plugin] Quality Check"
Hi fncll,
Each time a Quality Check "Search ePub" is run, a small pop-up box appears with the options of either clicking "OK", or first clicking on "view log". That latter option allows you to see the "Search ePub" results log and copy its contents. I don't otherwise know how to access that log via its filename on the hard drive but it may not be a simple stand-alone text file anyway.

FWIW, could you clarify what you mean by seeing a note in the "changelog" ... assuming that is different from the "Search ePub" results log, what action produces a "changelog" and how do you access that log?
Cheers,
Rob
Thanks. I've overlooked that button a thousand times!

By "changelog" I meant the one that is inside the ZIP file along with the plugin source. I made a copy and modified the plugin to provide more lines of context (if I can figure it out I will offer code to the developer to make that a user-selectable option). I also want to have it write a copy of the log each time it is run!
fncll is offline   Reply With Quote
Old 12-31-2018, 07:41 PM   #908
MsBarrows
Junior Member
MsBarrows began at the beginning.
 
MsBarrows's Avatar
 
Posts: 8
Karma: 10
Join Date: Dec 2013
Device: none
Fantastic plug-in! I just finished upsizing a bunch of covers on some ebooks I'd purchased today, and found myself wondering just how many ebooks I had with covers of less than my preferred minimum size (which is only 500x700 pixels, so it's not like it's particularly vast by today's tablet screen sizes). Found a reference to this plug-in on a different thread, just ran it... I have over 500 books whose covers also need upsizing, OUCH!

But at least now I know
MsBarrows is offline   Reply With Quote
Old 12-31-2018, 09:09 PM   #909
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 918
Karma: 417282
Join Date: Jun 2015
Device: kobo aura h2o, kobo forma
Have fun upsizing. Make use of metadata plugins to find better covers...
compurandom is offline   Reply With Quote
Old 01-01-2019, 05:26 AM   #910
Rob557
Zealot
Rob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-books
 
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
Resize Cover plug-in

Quote:
Originally Posted by MsBarrows View Post
... I have over 500 books whose covers also need upsizing, OUCH! But at least now I know.
Hi MsBarrows ... after using the "Quality Check" plug-in to list out all the books for which you want to resize the cover, you can use a separate Calibre plug-in called "Resize Cover" that allows you to select those books, and bulk-resize them. FWIW, a size of 435(w) x 680(h) generally seems pretty good, and you can individually adjust for necessary cropping or distortions.

The following is a link to the "Resize Cover" plug-in page
https://www.mobileread.com/forums/sh...d.php?t=150982
i.e. mobileread.com/forums/showthread.php?t=150982

Rob
Rob557 is offline   Reply With Quote
Old 01-04-2019, 02:01 PM   #911
MsBarrows
Junior Member
MsBarrows began at the beginning.
 
MsBarrows's Avatar
 
Posts: 8
Karma: 10
Join Date: Dec 2013
Device: none
Quote:
Originally Posted by Rob557 View Post
The following is a link to the "Resize Cover" plug-in page
https://www.mobileread.com/forums/sh...d.php?t=150982
i.e. mobileread.com/forums/showthread.php?t=150982
Thanks for the advice, I've bookmarked that for future reference, though I've already worked my way manually through the vast majority of them over the last few days.

For commercially published ebooks I've been taking the time to Google for higher resolution images of the official covers, since readers and tablets are only going to continue gaining screen resolution and memory over time.

For downloaded fanfiction it was much less of a problem, since those ebooks were mostly already using covers I'd created over the years using either the Generate Cover plugin or Photoshop, so it was only a comparative handful with associated fanart used for covers that needed a size tweak.

Doesn't make much of a visual change in Calibre itself, of course, but the difference in image quality was very noticeable once I transferred all the ebooks back over to my tablet and opened them there.
MsBarrows is offline   Reply With Quote
Old 04-08-2019, 12:54 AM   #912
bluepiggy42
Member
bluepiggy42 began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jun 2016
Device: none
Any thought on how I can us the quality check; search epubs function to look for the title of the book within the body of the book?

I'm am not a tech person in the least....so I am sure that i'm not even close. I've tried:

<title>
(?P<title>.+)
(title)

Thank you!!!! I love this function and use the search epubs all the time.
Christa
bluepiggy42 is offline   Reply With Quote
Old 04-08-2019, 01:10 AM   #913
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by bluepiggy42 View Post
<title>
Assuming you have HTML search enabled, this should already show at least part of the title if it's actually set correctly.

Unfortunately, if your EPUB doesn't have correct title metadata in its OPF file, the <title> tag in the HTML files could very well have completely bogus info, too. Skimming with ebook-viewer might be your only recourse.
ilovejedd is offline   Reply With Quote
Old 04-08-2019, 01:49 AM   #914
bluepiggy42
Member
bluepiggy42 began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jun 2016
Device: none
Quote:
Originally Posted by ilovejedd View Post
Assuming you have HTML search enabled, this should already show at least part of the title if it's actually set correctly.

Unfortunately, if your EPUB doesn't have correct title metadata in its OPF file, the <title> tag in the HTML files could very well have completely bogus info, too. Skimming with ebook-viewer might be your only recourse.
How would I check to see if the HTML Search is enabled?
bluepiggy42 is offline   Reply With Quote
Old 04-08-2019, 05:40 AM   #915
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by bluepiggy42 View Post
How would I check to see if the HTML Search is enabled?
Iirc, there's like an option for plain text search in the search epub dialog. You need to uncheck that if it's checked. There might be an option for HTML search as well. If so you need to check that one.

Also, I think there's an option to show all results. Check that one. You might get lucky and the correct title might be in use in later matches.

On an iPad and I'm doing this from memory so not 100% sure what all the options are.

Like I mentioned though, if embedded title metadata in EPUB is incorrect, chances are low that you can extract the correct title programmatically.
ilovejedd is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:51 PM.


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