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-21-2018, 09:40 AM   #901
Rob557
Connoisseur
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: 79
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, 11: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: 22,489
Karma: 22514864
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
'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, 02: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: 3,230
Karma: 8666896
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, iPad 9.7, 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, 02: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: 5,345
Karma: 24282234
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, 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, 03: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: 3,230
Karma: 8666896
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, iPad 9.7, 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, 05: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: 3,230
Karma: 8666896
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, iPad 9.7, 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, 38 views)
ilovejedd is offline   Reply With Quote
Old 11-04-2018, 01:38 PM   #907
fncll
Enthusiast
fncll began at the beginning.
 
Posts: 25
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, 08: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, 10:09 PM   #909
compurandom
Addict
compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.
 
Posts: 342
Karma: 172672
Join Date: Jun 2015
Device: kobo aura h2o
Have fun upsizing. Make use of metadata plugins to find better covers...
compurandom is offline   Reply With Quote
Old 01-01-2019, 06:26 AM   #910
Rob557
Connoisseur
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: 79
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, 03: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
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 332 08-31-2018 09:54 AM
[GUI Plugin] Search the Internet kiwidude Plugins 294 07-11-2018 07:47 PM
[GUI Plugin] Clipboard Search kiwidude Plugins 9 08-12-2014 04:36 AM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 01:02 AM
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 08:47 PM


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


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