quotify
quotify copied to clipboard
Quotify: A python library for creating inspirational quote images
What
Quotify: A python library for creating inspirational quote images
Creates inspiring quotes with beautiful backgrounds, like these:





Fonts/Images used above (not owned or liscense by this project in any way, provided for conveneience) => https://github.com/owocki/quotify/issues/1
Why
To tweet out amazing quotes from @StartupCTOio
Running
- Clone repo, then in shell
cd repo
pip install -r requirements.txt
mkdir input
mkdir output
mkdir fonts
-
Populate the
input
directory with background images. -
Populate the
fonts
directory with fonts. -
Then, in python:
# text
text = "This is a test. This is a test. This is a test. This is a test. "
output_filename = "output/{}.png".format(int(time.time()))
# config
FONT = select_font()
FONT_SIZE = recommend_font_size(text)
print(FONT_SIZE)
IF = ImageFont.truetype(FONT, FONT_SIZE)
IMAGE_WIDTH = 600
IMAGE_HEIGHT = 350
COLOR = (255, 255, 255)
SPACING = 3
print(write_image(text, output_filename, background_img=select_background_image()))