Skip to main content

Python utility for generating cover images for e-books.

Project description

CoverGenerator

CoverGenerator is a utility for generating simple book covers containing the book title nd author. The covers are generated using SVG and then rendered to an image file. This project is heavily inspired by racovimge and uses basically the same methods for creating covers, but this project has better multiline support and doesn't rely on any non-python applications for image exporting.

NOTE: Due to limitations with CairoSVG, CoverGenerator can't use embedded fonts and has to instead use system fonts. For proper word spacing and formatting, NotoSerif Bold & Bold Italic must be installed on your system. The program will still work without it, but you might have some odd word wrapping.

Installation

CoverGenerator can be downloaded from it's PyPI package using pip:

pip3 install CoverGenerator

If you are installing from source, the following python packages are required:

Command Line Script

You can generate a random cover with:

cover-generator -t "Title Text" -a "Author(s)"

You can specify the filename and image format with the --output tag, and set the width in pixels with the --width tag:

cover-generator -t "JPEG Cover" -a Writer -o coverimage.jpg -w 900

You can also specify a specific cover style and/or color palette using the --style and --palette tags:

cover-generator -t Title -a Author -s border -p ColorfulContrast

Available cover styles and color palettes are listed alongside options when using the --help command

Basic Python Usage

import cover_generator

# Create a random cover image
cover_generator.generate_cover(title="Title", author="author", path="/path/to/file.jpg")

# Create a random cover image with a specific cover style and color palette
cover_generator.generate_cover(title="Title", author="author", path="/path/to/file.jpg",
        cover_style="cross" palette_category="ColorfulContrast")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

CoverGenerator-0.1.1-py3-none-any.whl (37.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page