A python application for generating Wordpress.com brand assets.
In the project's root directory, compile drawbot as a python module.
After compiling drawbot, install the remaining requirements. It's recommended to run this application using a python virtual environment. From your terminal:
virtualenv env
source env/bin/activate
pip install -r requirements.txt
The project depends on drawBot and python resize image.
./local.sh
OR
Invoke the python application directly:
python app.py [options]
Currently supports:
300_250
(70 character limit)300_600
(105 character limit)160_600
(140 character limit)970_250
(140 character limit)
The copy that should populate the asset. The character limit depends on the format.
The copy that should populate the button.
- Generate a setup file:
py2applet --make-setup app.py
- Edit
setup.py
to include the assets (images) and data (templates and faces) directories:
DATA_FILES = ['data', 'assets']
- Remove existing dist and build directories:
rm -rf dist build
- Build app:
python setup.py py2app
OpenCV is used to determine the position of faces in a batch of portraits. To use opencv for python:
- Install python bindings for OpenCV (here are instructions for MacOS)
- Link haar-cascade pre-trained classifier, e.g.:
$ ln -s /usr/local/opt/opencv/share/opencv4/haarcascades/haarcascade_frontalface_default.xml haarcascade_frontalface_default.xml
Portraits and other assets used in composing the images.
- There has active discussions around its usage in international markets, however automated translation is often imperfect. Adding the ability to export layers that can be pulled into image compositing software (e.g. Sketch, Figma) is an alternative to allow for global content managers to edit.
- Further automating this process to generate assets seeded with audience and market specific demographics.