From: Guillaume Pellerin Date: Thu, 28 Oct 2021 10:22:46 +0000 (+0200) Subject: add statifier which replaces language buttons as href instead of form X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=754382085b0970b58accaa657b0f097e8731666f;p=docker-django-scripts.git add statifier which replaces language buttons as href instead of form --- diff --git a/misc/statifier.sh b/misc/statifier.sh new file mode 100755 index 0000000..262c24b --- /dev/null +++ b/misc/statifier.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +DOMAIN=$1 + +mkdir $DOMAIN +cd $DOMAIN + +LANG=en +wget -q --mirror -p --adjust-extension --header='Accept-Language: en' -e robots=off --base=./ -k -P ./ https://$DOMAIN +mv $DOMAIN $LANG +find $LANG/ -type f -print0 | xargs -0 sed -r -i -e 's,
,,g' +find $LANG/ -type f -print0 | xargs -0 sed -r -i -e 's,,,g' +find $LANG/ -type f -print0 | xargs -0 sed -r -i -e 's,
,,g' + +LANG=fr +wget -q --mirror -p --adjust-extension --header='Accept-Language: fr' -e robots=off --base=./ -k -P ./ https://$DOMAIN +mv $DOMAIN $LANG +find $LANG -type f -print0 | xargs -0 sed -r -i -e 's,
,,g' +find $LANG -type f -print0 | xargs -0 sed -r -i -e 's,,,g' +find $LANG -type f -print0 | xargs -0 sed -r -i -e 's,
,,g'