ebooklib icon indicating copy to clipboard operation
ebooklib copied to clipboard

Non-image cover?

Open aaannestad opened this issue 11 months ago • 0 comments

Is it possible to create a cover for an ebook that's just pure text, and not an image?

My initial guess on how to do it was this, and it generated an error involving self._get_nav(item):

cover = '''<head></head>
        <title></title>
        <body style="text-align: center">
            <h1>{title}</h1>
        </body>
        '''.format(title=self.novel_title)
self.book.set_cover('cover.html',cover)

I assume the issue is that set_cover() is expecting an image file, but I'd be surprised if there's no way to define a cover that's plain text, even if that involves instead adding it via other means.

aaannestad avatar Mar 04 '24 20:03 aaannestad