aboutsummaryrefslogtreecommitdiff
path: root/lib/httracker/functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/httracker/functions')
-rw-r--r--lib/httracker/functions10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/httracker/functions b/lib/httracker/functions
index d847769..ce3dd29 100644
--- a/lib/httracker/functions
+++ b/lib/httracker/functions
@@ -66,6 +66,16 @@ function httracker_get {
rm -rf $TARGET
fi
+ # Get a screenshot
+ if [ "$WEBKIT2PNG" == "1" ]; then
+ $DIRNAME/webkit2png/webkit2png/webkit2png.py -o $TARGET/screenshot.png "$url"
+ fi
+
+ # Build a PDF
+ if [ "$WKHTMLTOPDF" == "1" ] && which wkhtmltopdf &> /dev/null; then
+ wkhtmltopdf "$url" $TARGET/screenshot.pdf
+ fi
+
# Fix permissions again
if [ "`whoami`" != "$USER" ] && [ "`whoami`" == "root" ]; then
echo "Fixing $TARGET permissions..."