Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 02:17 AM   #1
arpeggioaccele
light mode user
arpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcoverarpeggioaccele exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 68
Karma: 16268
Join Date: May 2023
Location: New England
Device: I use the Calibre ebook-viewer on macos and Apple Books on ios.
Smile Disable calibre html → jpg cover generation when importing books with no cover.

I mostly deal with epubs that do not have any cover or images (custom generated, fanfiction, ao3, plain text). Calibre automatically generates a cover on import for epubs that I know do not have covers.

I usually use plugins to remove all covers on import. Only recently have I gotten adept at using an AI to assist looking through code to better understand it and I figured out why this was happening. (<3 open source calibre)

Based on what claude said, there's code in https://github.com/kovidgoyal/calibr...forms/cover.py
that decides what a book's cover should be. For imports that lack a cover, it falls to this function `_cover_from_html(hcover)` and does the work to temporarily render the html and turn it into a jpg for you.

This is nice, but there seems to be no setting to turn it off? I guess most people don't import things that aren't published books with covers. It is hooked into the get metadata setting that others mentioned, but that also controls other things that I do want. (There's lots of metadata in ao3 imports.)

I found a couple other threads on reddit and mobileread the calibre forum about these bare html covers, with the jpgs of blue hyperlinks and times new roman black text. There was some confusion as to what exactly was happening, but no help for disabling it.
https://www.mobileread.com/forums/sh...d.php?t=170633
https://www.mobileread.com/forums/sh...d.php?t=348115
https://old.reddit.com/r/Calibre/com...rating_covers/

Claude found this thread where Kovid helpfully explains the feature in reference to the CLI; I hadn't seen this before: https://www.mobileread.com/forums/sh...d.php?t=364309

Anyways, I was able to turn it off. Luckily it's already got a flag `no_default_cover` that is exposed for the CLI version of calibre I think? Or maybe it was like that for the metadata setting? Idk.

So what claude told me to do is add a customize.py file in the place that Calibre expects it (different based on mac or windows or linux) and write:

```python
import calibre.ebooks.metadata.epub as epub_meta
epub_meta.epub_allow_rendered_cover = False
```

I tested it a little and I think it worked. So it was really easy just to disable it. It just wasn't available from settings.

If you want to do the customize.py thing you should probably get an AI to walk you through it, I certainly didn't understand exactly what it suggested me to do. I asked it (and googled) if there were any guides or documentation online for this customize.py thing and there weren't.

Hope this helps.
arpeggioaccele is offline   Reply With Quote
Reply

Tags
cover, epub, import, jpg


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Books import: cover.jpg not uploaded senhal Library Management 2 09-13-2018 02:47 AM
Disable cover generation when adding books in Calibre? rebl Library Management 8 03-18-2013 06:56 AM
In Calibre v 0.7.28 the poor rendering of a jpg cover image. schooner1892 Calibre 19 09-16-2012 02:37 PM
Importing .mobi cover image from HTML wholcomb Conversion 2 02-17-2011 05:05 PM
Can't update cover if file cover.jpg is already in the directory ? q345 Calibre 14 06-08-2010 06:23 AM


All times are GMT -4. The time now is 12:03 AM.


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