From: Matthias Maier Date: Fri, 18 May 2018 02:58:46 +0000 (-0500) Subject: Contrib: Update make_offlinedoc.sh X-Git-Tag: v9.1.0-rc1~1129^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43a0e7aa675acc3347d134f459f6e1e116979e93;p=dealii.git Contrib: Update make_offlinedoc.sh - actually download all (online) portions of the documentation - improve sed command --- diff --git a/contrib/utilities/makeofflinedoc.sh b/contrib/utilities/makeofflinedoc.sh index d6b8641725..ecc0356ca1 100755 --- a/contrib/utilities/makeofflinedoc.sh +++ b/contrib/utilities/makeofflinedoc.sh @@ -24,19 +24,22 @@ then exit 1 fi -mkdir -p images +echo "Patching html files ..." +sed -i 's#"https\?://www.dealii.org/images/#"images/#g' step_*.html class*.html -echo "Downloading images (press ctrl-c to cancel) ..." -cd images -{ -trap "echo \"(skipping)\"" SIGINT -wget -q -nd -A svg,png,gif,webm -m -l 1 -np https://www.dealii.org/images/steps/developer/ -} -rm robots.txt* -cd .. +echo "Downloading images (this will take a long time; press ctrl-c to cancel) ..." -echo "Patching html files ..." -sed -i 's#"http://www.dealii.org/images/steps/developer/\(step-.*\)"#"images/\1"#g' step_*.html -sed -i 's#"https://www.dealii.org/images/steps/developer/\(step-.*\)"#"images/\1"#g' step_*.html +for i in steps/developer \ + shape-functions/{DGPMonomial,DGPNonparametric,DGP}/P{1,2,3,4} \ + shape-functions/{hierarchical,lagrange}/Q{1,2,3,4}; do + echo " ... processing images/$i" + mkdir -p images/"$i" + ( + cd images/"$i" + trap "echo \"(skipping)\"" SIGINT + wget -q -nd -A svg,png,gif,webm -m -l 1 -np "https://www.dealii.org/images/$i" + rm -f robots.txt* + ) +done echo "all done!"