git pull
git status
git log
git add filename.txt
git commit -m "my short summary of what has changed"
git push
We are using Weasyprint version 52.5 on the Soupboat. The latest version is 54.1 (https://github.com/Kozea/WeasyPrint/releases), but from version 53 on you need to have libpango version 1.44
installed, and on the current version of Raspian OS
(the operating system of the Soupboat) we can only have libpango version 1.42
. So we will stay with Weasyprint v52.
$ sudo pip3 install weasyprint==52.5
You can use Weasyprint as a Python library or from the command line.
from weasyprint import HTML, CSS
HTML(filename='playcard.html').write_pdf('playcard.pdf', stylesheets=[CSS(filename='playcard.css')])
! weasyprint --help
usage: weasyprint [-h] [--version] [-i] [-e ENCODING] [-f {pdf,png}] [-s STYLESHEET] [-m MEDIA_TYPE] [-r RESOLUTION] [-u BASE_URL] [-a ATTACHMENT] [-p] [-o] [-v] [-d] [-q] input output Renders web pages to PDF or PNG. positional arguments: input URL or filename of the HTML input, or - for stdin output Filename where output is written, or - for stdout optional arguments: -h, --help show this help message and exit --version Print WeasyPrint's version number and exit. -i, --info Print system information and exit. -e ENCODING, --encoding ENCODING Character encoding of the input -f {pdf,png}, --format {pdf,png} Output format. Can be omitted if `output` ends with a .pdf or .png extension. -s STYLESHEET, --stylesheet STYLESHEET URL or filename for a user CSS stylesheet. May be given multiple times. -m MEDIA_TYPE, --media-type MEDIA_TYPE Media type to use for @media, defaults to print -r RESOLUTION, --resolution RESOLUTION PNG only: the resolution in pixel per CSS inch. Defaults to 96, one PNG pixel per CSS pixel. -u BASE_URL, --base-url BASE_URL Base for relative URLs in the HTML input. Defaults to the input's own filename or URL or the current directory for stdin. -a ATTACHMENT, --attachment ATTACHMENT URL or filename of a file to attach to the PDF document -p, --presentational-hints Follow HTML presentational hints. -o, --optimize-images Try to optimize the size of embedded images. -v, --verbose Show warnings and information messages. -d, --debug Show debugging messages. -q, --quiet Hide logging messages.
! weasyprint playcard.html playcard.pdf
! weasyprint -s playcard.css playcard.html playcard.pdf