Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added script to capture widgets demo output

  • Loading branch information...
commit 4ba535a78215cba4f5e537e472599368b5c458bf 1 parent 7ee684c
@miohtama miohtama authored
View
1  .gitignore
@@ -60,3 +60,4 @@ buildout-cache/downloads/*
buildout-cache/eggs/*
source/_generated/*
+var
View
15 buildout.cfg
@@ -8,6 +8,7 @@
parts =
sphinx
funnelweb
+ instance-widget-capture
extensions =
mr.developer
@@ -58,3 +59,17 @@ recipe = zc.recipe.egg
eggs =
funnelweb
transmogrify.command
+
+
+# Plone instance used to create the widget capture page
+[instance-widget-capture]
+recipe = plone.recipe.zope2instance
+blob-storage = ${buildout:directory}/var/blobstorage
+user = admin:admin
+http-address = 8080
+debug-mode = on
+verbose-security = on
+eggs =
+ Pillow
+ Plone
+
View
40 capture-widgets.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# Capture plone.app.widgets widgets demo page
+#
+
+URL="http://localhost:8080/Plone/@@widgets-demo"
+
+TARGET_FILE=widgets.html
+
+TARGET=source/_generated/widgets/
+
+CWD=`pwd`
+
+# Start site temporary
+bin/instance-widget-capture start
+sleep 3
+
+TDIR=`mktemp -d`
+echo "Capturing page $URL to $TDIR"
+
+trap control_c "cd $CWD"
+cd $TDIR ; wget --quiet --no-directories --level=1 --recursive --convert-links "$URL"
+GET_STATUS=$?
+cd $CWD
+
+# Stop site
+bin/instance-widget-capture stop
+
+# man pages don't tell about wget exit codes
+if [[ $GET_STATUS != 0 ]] ; then
+ echo "Could not succesfully read $URL"
+ exit 1
+fi
+
+cp -r $TDIR $TARGET
+
+rm $TDIR
+
+
+
View
1  source/_generated/README.txt
@@ -1 +0,0 @@
-Static generated content. See buildout.cfg for more information
Please sign in to comment.
Something went wrong with that request. Please try again.