]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Contrib: Update make_offlinedoc.sh
authorMatthias Maier <tamiko@43-1.org>
Fri, 18 May 2018 02:58:46 +0000 (21:58 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 18 May 2018 04:38:10 +0000 (23:38 -0500)
 - actually download all (online) portions of the documentation
 - improve sed command

contrib/utilities/makeofflinedoc.sh

index d6b8641725148836bd819aef91a349dc29fc6e7c..ecc0356ca1aee06d022b10f6e58c9d172611d4f2 100755 (executable)
@@ -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!"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.