rename Rule34 to gallery-dl

This commit is contained in:
2024-07-08 23:52:55 +02:00
parent 952709b4ae
commit 16902415ee
3 changed files with 76 additions and 0 deletions

27
gallery-dl/rule34.sh Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/bash
# for testing only
rm -f ./archive.sqlite3 ./archive-rule34.sqlite3 ./log.txt
rm -rf ./Download/*
[[ -f downloaded_r34.txt ]] || echo "no file to download from" || exit 1
cp downloaded_r34.txt to_download_r34.txt
while [ 1 ]
do
gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
if [ ! -s to_download_r34.txt ]; then
#success! just exit
echo "file empty"
rm to_download_r34.txt
exit 0
fi
echo "file not empty"
if [ $(ping -qc 3 rule34.xxx > /dev/null 2>&1) ]; then
echo "no internet"
exit 1
fi
echo "has internet"
done