Skip to content

Instantly share code, notes, and snippets.

@tpraxl
Created August 24, 2018 14:43
Show Gist options
  • Save tpraxl/5528a7d2887a0019761c7ed1379c50a9 to your computer and use it in GitHub Desktop.
Save tpraxl/5528a7d2887a0019761c7ed1379c50a9 to your computer and use it in GitHub Desktop.
Install weasyprint on uberspace
#!/usr/bin/env bash
# Last modified 2018-08-24
# This script assumes that you are on a fresh uberspace with not so much as the
# required dependencies installed
#
# Make sure to chmod u+x this script
pip3.6 install virtualenv --user
virtualenv ./env-weasy
. ./env-weasy/bin/activate
pip install WeasyPrint
echo "Testing weasyprint"
weasyprint http://weasyprint.org ./weasyprint-website.pdf
echo -e "\n\nHave a look at ./weasyprint-website.pdf that was just generated using weasyprint"
echo -e "You may use weasyprint afterwards as follows:\n\nvirtualenv ./env-weasy\nweasyprint input output.pdf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment