From 354e52a3a62d8c285f119b8b1c3cfc5118a701c8 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 17 Sep 2016 19:33:11 +0200 Subject: Add script missing_screenshots.sh, modified to deal with draklive --- missing_screenshots.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100755 missing_screenshots.sh diff --git a/missing_screenshots.sh b/missing_screenshots.sh new file mode 100755 index 00000000..747c657f --- /dev/null +++ b/missing_screenshots.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +# THISMIN=$(date +%F%a.T%H.%M) use only the part between () or define it and +# use later as ${THISMIN} + +THISMIN=$(date +%F%a.%H:%M) + + +echo "Be patient, this will take a while" +echo "Installer for $1" + +mkdir -p en/installer/${THISMIN} +chmod o-w en/installer/${THISMIN} +cd en/installer/${THISMIN} +wget --spider -r --no-parent http://docteam.mageia.nl/en/installer/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_installer_PNGs + +cd ../../.. +mkdir -p $1/installer/${THISMIN} +chmod o-w $1/installer/${THISMIN} +cd $1/installer/${THISMIN} +wget --spider -r --no-parent http://docteam.mageia.nl/$1/installer/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee $1_installer_PNGs +cd ../../.. + +echo "Draklive for $1" + +mkdir -p en/draklive/${THISMIN} +chmod o-w en/draklive/${THISMIN} +cd en/draklive/${THISMIN} +wget --spider -r --no-parent http://docteam.mageia.nl/en/draklive/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_draklive_PNGs + +cd ../../.. +mkdir -p $1/draklive/${THISMIN} +chmod o-w $1/draklive/${THISMIN} +cd $1/draklive/${THISMIN} +wget --spider -r --no-parent http://docteam.mageia.nl/$1/draklive/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee $1_draklive_PNGs + +echo "Be patient, the MCC part that follows now takes longer than the installer part" + +cd ../../.. +mkdir -p en/MCC/${THISMIN} +chmod o-w en/MCC/${THISMIN} +cd en/MCC/${THISMIN} +wget --spider -r --no-parent http://docteam.mageia.nl/en/MCC/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_MCC_PNGs + +cd ../../.. +mkdir -p $1/MCC/${THISMIN} +chmod o-w $1/MCC/${THISMIN} +cd $1/MCC/${THISMIN} +wget --spider -r --no-parent http://docteam.mageia.nl/$1/MCC/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee $1_MCC_PNGs + +cd ../../.. +diff $1/installer/${THISMIN}/$1_installer_PNGs en/installer/${THISMIN}/en_installer_PNGs 2>&1 | tee Missing_$1_installer_sss_${THISMIN} + +sed -i 's/> /MISSING: http:\/\/docteam.mageia.nl\/en\/installer\/content\/images\//g' Missing_$1_installer_sss_${THISMIN} + +sed -i 's/< /NOT_IN_ENGLISH: http:\/\/docteam.mageia.nl\/$1\/installer\/content\/images\//g' Missing_$1_installer_sss_${THISMIN} + +diff $1/draklive/${THISMIN}/$1_draklive_PNGs en/draklive/${THISMIN}/en_draklive_PNGs 2>&1 | tee Missing_$1_draklive_sss_${THISMIN} + +sed -i 's/> /MISSING: http:\/\/docteam.mageia.nl\/en\/draklive\/content\/images\//g' Missing_$1_draklive_sss_${THISMIN} + +sed -i 's/< /NOT_IN_ENGLISH: http:\/\/docteam.mageia.nl\/$1\/draklive\/content\/images\//g' Missing_$1_draklive_sss_${THISMIN} + +diff $1/MCC/${THISMIN}/$1_MCC_PNGs en/MCC/${THISMIN}/en_MCC_PNGs 2>&1 | tee Missing_$1_MCC_sss_${THISMIN} + +sed -i 's/> /MISSING: http:\/\/docteam.mageia.nl\/en\/MCC\/content\/images\//g' Missing_$1_MCC_sss_${THISMIN} + +sed -i 's/< /NOT_IN_ENGLISH: http:\/\/docteam.mageia.nl\/$1\/MCC\/content\/images\//g' Missing_$1_MCC_sss_${THISMIN} + +echo -e "Done, you can find the results in\nMissing_$1_installer_sss_${THISMIN} and in\nMissing_$1_MCC_sss_${THISMIN}" -- cgit v1.2.1