Talk:RawPedia Book

From RawPedia
Jump to navigation Jump to search

This is a first stab at manually organizing content for a printable book.

I'm doing it this way because then we can use a headless Chrom(e|ium) to fetch a single page and print to PDF automatically.

I'm doing it on my side with:


chromium-browser --headless -disable-gpu --print-to-pdf="/home/pat/Documents/RawPedia.pdf" 'http://rawpedia.rawtherapee.com/index.php?title=RawPedia_Book&printable=yes'

I'll then scp this file up to the base of rawpedia: https://rawpedia.rawtherapee.com/RawPedia.pdf

I'm using this simple bash script on my server to generate + upload the file:

#!/bin/bash

chromium-browser --headless -disable-gpu --print-to-pdf="/home/pat/Documents/RawPedia.pdf" 'http://rawpedia.rawtherapee.com/index.php?title=RawPedia_Book&printable=yes'

if [ $? -eq 0 ]; then
    chmod a+r /home/pat/Documents/RawPedia.pdf
    rsync -PSauve ssh /home/pat/Documents/RawPedia.pdf pixls.us:/home/pixlsus/rawpedia.rawtherapee.com/RawPedia.pdf
    if [ $? -eq 0 ]; then
        echo "Good!"
    else
        echo "Failed upload..."
    fi
else
    echo "Rendering failed..."
fi
0 3 * * 0 /home/pat/bin/rawpedia-book > /home/pat/bin/rawpedia-book.log

If anyone wants to fiddle with the print styles, modify this page: http://rawpedia.rawtherapee.com/MediaWiki:Print.css

Note: this will modify print styles for any page that people try to print.