Transmogrify 1.0.1b2 documentation
Pillow requires certain native libraries in order to decode certain types of files.
Typically you will need these libraries (these are the Ubuntu names):
If you want Transmogrify to also better handle the conversion of CMYK images to RGB, you need to add littleCMS libaries.
Example:
# sudo apt-get install python-dev libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
Create a “home” for transmogrify
# mkdir -p /etc/transmogrify
# cd /etc/transmogrify
Download the setuptools and pip wheels
# mkdir virtualenv_support
# cd virtualenv_support/
# sudo wget https://pypi.python.org/packages/py2.py3/p/pip/pip-1.5.6-py2.py3-none-any.whl#md5=4d4fb4b69df6731c7aeaadd6300bc1f2
# sudo wget https://pypi.python.org/packages/3.4/s/setuptools/setuptools-8.2-py2.py3-none-any.whl#md5=44a36e437d09e3eb125a14c3a428b0f8
# cd ..
Download and run the bootstrap program:
# curl https://raw.github.com/callowayproject/Transmogrify/master/bootstrap.py | python
You can install the latest development release using this command:
# curl https://raw.github.com/callowayproject/Transmogrify/master/bootstrap.py --dev | python
These create a python virtualenv and installs Transmogrify.
source virtualenv/bin/activate to activate the Transmogrify’s virtualenv.configure_transmogrifySpecify your Secret Key, or use this random key [p9pmpo)-l@c=ux06#ucezz@t4f1j6*_re%-area6xk&_ic#u0r]:
Where are your original files stored [/etc/transmogrify/originals]:
Where will your modified files be stored [/etc/transmogrify/modified]:
Where would you like to store the settings [transmogrify_settings.py]:
source virtualenv/bin/activate to activate the Transmogrify’s virtualenv.Make a file called /etc/transmogrify/conf/gunicorn_conf.py
NAME = 'transmogrify'
bind = "unix:///var/run/%s.sock" % NAME
pidfile = "/var/run/%s.pid" % NAME
user = "www-data"
group = "www-data"
accesslog = "/var/log/gunicorn/%s.access.log" % NAME
errorlog = "/var/log/gunicorn/%s.error.log" % NAME
proc_name = NAME
Create a script called /etc/transmogrify/transmogrify
#!/bin/bash
HOMEDIR="/etc/transmogrify"
CONF="$HOMEDIR/conf/gunicorn_conf.py"
NAME=transmogrify
cd $HOMEDIR
source virtualenv/bin/activate
TRANSMOGRIFY_SETTINGS=transmogrify_settings exec $HOMEDIR/virtualenv/bin/python \
/etc/transmogrify/virtualenv/bin/gunicorn \
--config $CONF transmogrify.wsgi:app
Make the script executable
# chmod a+x transmogrify
Make a startup script
description "Transmogrify"
start on runlevel [2345]
stop on runlevel [06]
respawn
respawn limit 10 5
script
/etc/transmogrify/transmogrify
end script