Marcus Rohrmoser 1 year ago
parent
commit
7aad8001d1

+ 5 - 5
pull.sh

@@ -13,11 +13,11 @@ dir=Fahrplan
 url="https://${dir}.events.ccc.de/congress/2017/${dir}/version"
 dst="${dir}.version"
 
-curl --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
+curl --silent --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
   url="$(fgrep "URL: " < "${dst}" | cut -d ' ' -f 2)"
   dst="${dir}.tar.gz"
 
-  curl --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
+  curl --silent --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
     rm -rf "${dir}"
     tar -xzf "${dst}" && mv 34c3 "${dir}"
     sed -i -e "s:/congress/2017/${dir}/:./:g" "${dir}"/*.html
@@ -40,7 +40,7 @@ for part in everything workshops
 do
   dst="${dir}/${part}.schedule.xml"
   url="https://${dir}.events.ccc.de/congress/2017/${dst}"
-  curl --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
+  curl --silent --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
     {
       echo '<?xml-stylesheet type="text/xsl" href="../assets/schedule2html.xslt"?>'
       fgrep -v "<?xml version=" "${dst}"
@@ -60,11 +60,11 @@ dir="wiki"
 url="https://events.ccc.de/congress/2017/${dir}/version"
 dst="${dir}.version"
 
-curl --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
+curl --silent --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
   url="$(fgrep "URL: " < "${dst}" | cut -d ' ' -f 2)"
   dst="${dir}.tbz"
 
-  curl --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
+  curl --silent --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
     rm -rf "${dir}"
     tar -xjf "${dst}"
   }

+ 30 - 0
wiki-clean.sh

@@ -0,0 +1,30 @@
+#!/bin/sh
+
+dir=wiki
+
+sed --in-place --regexp-extended \
+  -e 's|<script>.+window\.RLQ=window\.RLQ[^<]+</script>|<!-- script purged -->|g' \
+  -e 's|Cached time:\s+[0-9]+|Cached time: foo|g' \
+  -e 's|Preprocessor visited node count:\s+[0-9]+/[0-9]+|Preprocessor visited node count: foo/bar|g' \
+  -e 's|Preprocessor generated node count:\s+[0-9]+/[0-9]+|Preprocessor generated node count: foo/bar|g' \
+  -e 's|Post‐expand include size:\s+[0-9]+/[0-9]+ bytes|Post‐expand include size: foo/bar bytes|g' \
+  -e 's|Template argument size:\s+[0-9]+/[0-9]+ bytes|Template argument size: foo/bar bytes|g' \
+  -e 's|[^-]+- -total|foo - -total|g' \
+  -e 's|[^-]+- Template:Assembly/TableEntry|foo - Template:Assembly/TableEntry|g' \
+  -e 's|[^-]+- Template:Assembly/TagLinks|foo - Template:Assembly/TagLinks|g' \
+  -e 's|[^-]+- Template:Assembly/CenterList|foo - Template:Assembly/CenterList|g' \
+  -e 's|[^-]+- Template:List/End|foo - Template:List/End|g' \
+  -e 's|[^-]+- Template:List/Start|foo - Template:List/Start|g' \
+  -e 's|[^-]+- Template:Refresh|foo - Template:Refresh|g' \
+  -e 's|and timestamp [0-9]+ and revision id [0-9]*|and timestamp foo and revision bar|g' \
+  -e 's|CPU time usage: [0-9.]+ seconds|CPU time usage: bar seconds|g' \
+  -e 's|Expensive parser function count: [0-9]+/[0-9]+|Expensive parser function count: foo/bar|g' \
+  -e 's|Highest expansion depth: [0-9]+/[0-9]+|Highest expansion depth: foo/bar|g' \
+  -e 's|mw\.config\.set.."wgBackendResponseTime":[0-9]*..;|mw.config.set({"wgBackendResponseTime":-123});|g' \
+  -e 's|Post.+expand include size: [0-9]+/[0-9]+ bytes|Post-expand include size: foo/bar bytes|g' \
+  -e 's|Preprocessor generated node count: [0-9]+/[0-9]+|Preprocessor generated node count: foo/bar|g' \
+  -e 's|Preprocessor visited node count: [0-9]+/[0-9]+|Preprocessor visited node count: foo/bar|g' \
+  -e 's|Real time usage: [0-9.]* seconds|Real time usage: foo seconds|g' \
+  -e 's|Template argument size: [0-9]+/[0-9]+ bytes|Template argument size: foo/bar bytes|g' \
+  -e 's|This page has been accessed [0-9,]* times\.|This page has been accessed foo times.|g' \
+"${dir}"/*/*.html

+ 28 - 14
wiki.sh

@@ -24,7 +24,7 @@ do
   url="https://events.ccc.de/congress/2017/${dir}/${page}"
   dst="${dir}/${page}/index.html"
   curl --silent --create-dirs --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
-    echo postproc
+    echo "postproc ${url}"
   }
 done
 
@@ -34,7 +34,7 @@ do
   url="https://events.ccc.de/congress/2017/wiki/load.php?debug=false&amp;lang=en&amp;modules=${css}*&amp;only=styles&amp;skin=vector&amp;*"
   dst="${dir}/${css}.css"
   curl --silent --create-dirs --location --remote-time --output "${dst}" --time-cond "${dst}" --user-agent "${USER_AGENT}" "${url}" && {
-    echo postproc
+    echo "postproc ${url}"
   }
   sed -i -e "s|https://events.ccc.de/|/|g" "${dir}"/*/*.html
   sed -i -e "s|/congress/2017/${dir}/|../|g" "${dir}"/*/*.html
@@ -42,15 +42,29 @@ do
   sed -i -e "s|${url}|../${css}.css|g" "${dir}"/*/*.html
 done
 
-sed -i -e 's|This page has been accessed [0-9,]* times\.|This page has been accessed foo times.|g' "${dir}"/*/*.html
-sed -i -e 's|mw\.config\.set.."wgBackendResponseTime":[0-9]*..;|mw.config.set({"wgBackendResponseTime":-123});|g' "${dir}"/*/*.html
-sed -i -e 's|Real time usage: [0-9.]* seconds|Real time usage: foo seconds|g' "${dir}"/*/*.html
-sed -i -e 's|CPU time usage: [0-9.]* seconds|CPU time usage: bar seconds|g' "${dir}"/*/*.html
-sed -i -e 's|and timestamp [0-9]* and revision id [0-9]*|and timestamp foo and revision bar|g' "${dir}"/*/*.html
-sed -i -e 's|Preprocessor visited node count: [0-9]+/[0-9]+|Preprocessor visited node count: foo/bar|g' "${dir}"/*/*.html
-sed -i -e 's|Preprocessor generated node count: [0-9]+/[0-9]+|Preprocessor generated node count: foo/bar|g' "${dir}"/*/*.html
-sed -i -e 's|Post.+expand include size: [0-9]+/[0-9]+ bytes|Post-expand include size: foo/bar bytes|g' "${dir}"/*/*.html
-sed -i -e 's|Template argument size: [0-9]+/[0-9]+ bytes|Template argument size: foo/bar bytes|g' "${dir}"/*/*.html
-sed -i -e 's|Highest expansion depth: [0-9]+/[0-9]+|Highest expansion depth: foo/bar|g' "${dir}"/*/*.html
-sed -i -e 's|Expensive parser function count: [0-9]+/[0-9]+|Expensive parser function count: foo/bar|g' "${dir}"/*/*.html
-
+sed --in-place --regexp-extended \
+  -e 's|[^-]+- -total|foo - -total|g' \
+  -e 's|[^-]+- Template:Assembly/CenterList|foo - Template:Assembly/CenterList|g' \
+  -e 's|[^-]+- Template:Assembly/TableEntry|foo - Template:Assembly/TableEntry|g' \
+  -e 's|[^-]+- Template:Assembly/TagLinks|foo - Template:Assembly/TagLinks|g' \
+  -e 's|[^-]+- Template:List/End|foo - Template:List/End|g' \
+  -e 's|[^-]+- Template:List/Start|foo - Template:List/Start|g' \
+  -e 's|[^-]+- Template:Refresh|foo - Template:Refresh|g' \
+  -e 's|<script>.+window\.RLQ=window\.RLQ[^<]+|<script>/* script purged */|g' \
+  -e 's|and timestamp [0-9]+ and revision id [0-9]*|and timestamp foo and revision bar|g' \
+  -e 's|Cached time:\s+[0-9]+|Cached time: foo|g' \
+  -e 's|CPU time usage: [0-9.]+ seconds|CPU time usage: bar seconds|g' \
+  -e 's|Expensive parser function count: [0-9]+/[0-9]+|Expensive parser function count: foo/bar|g' \
+  -e 's|Highest expansion depth: [0-9]+/[0-9]+|Highest expansion depth: foo/bar|g' \
+  -e 's|mw\.config\.set.."wgBackendResponseTime":[0-9]*..;|mw.config.set({"wgBackendResponseTime":-123});|g' \
+  -e 's|Post‐expand include size:\s+[0-9]+/[0-9]+ bytes|Post‐expand include size: foo/bar bytes|g' \
+  -e 's|Post.+expand include size: [0-9]+/[0-9]+ bytes|Post-expand include size: foo/bar bytes|g' \
+  -e 's|Preprocessor generated node count: [0-9]+/[0-9]+|Preprocessor generated node count: foo/bar|g' \
+  -e 's|Preprocessor generated node count:\s+[0-9]+/[0-9]+|Preprocessor generated node count: foo/bar|g' \
+  -e 's|Preprocessor visited node count: [0-9]+/[0-9]+|Preprocessor visited node count: foo/bar|g' \
+  -e 's|Preprocessor visited node count:\s+[0-9]+/[0-9]+|Preprocessor visited node count: foo/bar|g' \
+  -e 's|Real time usage: [0-9.]* seconds|Real time usage: foo seconds|g' \
+  -e 's|Template argument size: [0-9]+/[0-9]+ bytes|Template argument size: foo/bar bytes|g' \
+  -e 's|Template argument size:\s+[0-9]+/[0-9]+ bytes|Template argument size: foo/bar bytes|g' \
+  -e 's|This page has been accessed [0-9,]* times\.|This page has been accessed foo times.|g' \
+"${dir}"/*/*.html

File diff suppressed because it is too large
+ 24 - 19
wiki/Static:Assemblies/index.html


File diff suppressed because it is too large
+ 10 - 10
wiki/Static:Crawling/index.html


File diff suppressed because it is too large
+ 10 - 10
wiki/Static:Design/index.html


File diff suppressed because it is too large
+ 14 - 14
wiki/Static:Lightning_Talks/index.html


File diff suppressed because it is too large
+ 13 - 13
wiki/Static:Main_Page/index.html


File diff suppressed because it is too large
+ 22 - 19
wiki/Static:Projects/index.html


File diff suppressed because it is too large
+ 12 - 12
wiki/Static:Self-organized_Sessions/index.html