Auto pushed

This commit is contained in:
nannal 2020-01-25 13:59:41 +02:00
commit de3ec1f4bc

18
script.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
day=0
function daysago(){
day=$(date -d "$date -$1 days" +"%Y-%m-%d")
}
i=0
while [ $day != "1989-04-16" ]
do
daysago $i
echo $day
if [ ! -f ./imgs/$day.png ]
then
curl -sS https://dilbert.com/strip/$day|grep 'assets.amuniversal.com'|grep 'og:image'|cut -f 4 -d '"'|xargs curl -sS -o ./imgs/$day.png
fi
i=$(($i+1))
done