Skip to content

mgiraldo/tenprintcover-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

10 PRINT book cover generation for Python

Read more about this project in this blog post.

Author of this Python port is Jens Tröger for Bookalope, based on the 10 PRINT "BOOK COVER" for Processing project.

Python-based book cover-generating algorithm inspired by 10PRINT. Artwork uses the symbols found on the Commodore PET keyboard: Commodore PET keyboard

Requirements

Runs on Python 2 and 3.

Requires Python bindings for Cairo installed. While pycairo should work but is outdated, this implementation currently uses cairocffi.

Requires Noto Sans and Noto Sans CJK SC fonts installed from Google Internationalization.

Usage

There are two ways of generating book covers with this tool: one, generate a single book cover image by passing information directly through the command line arguments; or two, by passing a JSON file with information and generate a batch of book cover images.

Note that the default dimension of the image is set to 600×900 pixels.

tenprintcover.py --help

This prints all command line parameters.

tenprintcover.py --author "Clive Barker" --title "Imagica" --cover barker-imagica.png

Generate a single PNG book cover file barker-imagica.png for the book titled Imagica by the novelist Clive Barker.

tenprintcover.py --json-covers my-covers.json

This generates a book cover image for each line in the JSON file, where a single line has the following format (where subtitle may be set to null):

{"authors": "...", "identifier": "...", "subtitle": "...", "title": "...", "identifier_type": "...", "filename": "..."}

Other Resources

License

See LICENSE.

About

Python book cover generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages