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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file covergenerator-0.2.1-py3-none-any.whl.
File metadata
- Download URL: covergenerator-0.2.1-py3-none-any.whl
- Upload date:
- Size: 41.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74b47ed39f8a617cd63ecf288db0dd260f6651ddf26e3178d8e9885c1c4e5ddf
|
|
| MD5 |
5e9ff136e190a5314d241a1ee3cea112
|
|
| BLAKE2b-256 |
86d0759c97cff1e2dc04f1254b39486dfa7269763bcf381d36893386b58f2d4e
|