/quotify

Quotify: A python library for creating inspirational quote images

Primary LanguagePython

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) => owocki#1

Why

To tweet out amazing quotes from @StartupCTOio

Running

  1. Clone repo, then in shell
cd repo
pip install -r requirements.txt
mkdir input 
mkdir output
mkdir fonts

  1. Populate the input directory with background images.

  2. Populate the fonts directory with fonts.

  3. 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()))