From 43a0e7aa675acc3347d134f459f6e1e116979e93 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 17 May 2018 21:58:46 -0500 Subject: [PATCH] Contrib: Update make_offlinedoc.sh - actually download all (online) portions of the documentation - improve sed command --- contrib/utilities/makeofflinedoc.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) 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!" -- 2.39.5