Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Polishing capture script

  • Loading branch information...
commit 18881be46321d5d50715bba7c18736ca9a8383ab 1 parent 4ba535a
@miohtama miohtama authored
Showing with 19 additions and 8 deletions.
  1. +12 −1 buildout.cfg
  2. +7 −7 capture-widgets.sh
View
13 buildout.cfg
@@ -9,6 +9,7 @@ parts =
sphinx
funnelweb
instance-widget-capture
+ plonesite-widget-capture
extensions =
mr.developer
@@ -66,10 +67,20 @@ eggs =
recipe = plone.recipe.zope2instance
blob-storage = ${buildout:directory}/var/blobstorage
user = admin:admin
-http-address = 8080
+http-address = 127.0.0.1:9090
debug-mode = on
verbose-security = on
eggs =
Pillow
Plone
+[plonesite-widget-capture]
+recipe = collective.recipe.plonesite
+site-id = Plone
+instance = instance-widget-capture
+host = localhost
+protocol = http
+port = 9090
+enabled = true
+site-replace = true
+
View
14 capture-widgets.sh
@@ -3,7 +3,7 @@
# Capture plone.app.widgets widgets demo page
#
-URL="http://localhost:8080/Plone/@@widgets-demo"
+URL="http://localhost:9090/Plone/@@widgets-demo"
TARGET_FILE=widgets.html
@@ -18,8 +18,8 @@ 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"
+trap "cd $CWD" SIGINT
+cd $TDIR ; wget --no-directories --level=1 --recursive --convert-links "$URL"
GET_STATUS=$?
cd $CWD
@@ -27,14 +27,14 @@ cd $CWD
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"
+if [[ $GET_STATUS != 8 ]] ; then
+ echo "Could not succesfully read $URL, wget exit status $GET_STATUS"
exit 1
fi
-cp -r $TDIR $TARGET
+cp -r $TDIR/* $TARGET
-rm $TDIR
+rm -rf $TDIR
Please sign in to comment.
Something went wrong with that request. Please try again.