rename Rule34 to gallery-dl
This commit is contained in:
5
gallery-dl/.gitignore
vendored
Normal file
5
gallery-dl/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
to_download_r34.txt
|
||||||
|
downloaded_r34.txt
|
||||||
|
archive-rule34.sqlite3
|
||||||
|
log.txt
|
||||||
|
Download
|
44
gallery-dl/config.json
Normal file
44
gallery-dl/config.json
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"extractor":
|
||||||
|
{
|
||||||
|
"base-directory": "./Download",
|
||||||
|
"archive": "./archive.sqlite3",
|
||||||
|
|
||||||
|
"rule34":
|
||||||
|
{
|
||||||
|
"archive": "./archive-rule34.sqlite3",
|
||||||
|
|
||||||
|
"filename": "{md5}.{extension}",
|
||||||
|
"directory": ["{search_tags}", "Rule34"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"downloader":
|
||||||
|
{
|
||||||
|
"part-directory": "/tmp",
|
||||||
|
"rate": "30M",
|
||||||
|
"retries": 3,
|
||||||
|
"timeout": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"output":
|
||||||
|
{
|
||||||
|
"ansi": true,
|
||||||
|
"log": {
|
||||||
|
"level": "info",
|
||||||
|
"format": {
|
||||||
|
"debug" : "\u001b[0;37m{name}: {message}\u001b[0m",
|
||||||
|
"info" : "\u001b[1;37m{name}: {message}\u001b[0m",
|
||||||
|
"warning": "\u001b[1;33m{name}: {message}\u001b[0m",
|
||||||
|
"error" : "\u001b[1;31m{name}: {message}\u001b[0m"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"logfile": {
|
||||||
|
"path": "./log.txt",
|
||||||
|
"mode": "w",
|
||||||
|
"format-date": "%Y-%m-%dT%H:%M:%S",
|
||||||
|
"level": "debug"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
27
gallery-dl/rule34.sh
Executable file
27
gallery-dl/rule34.sh
Executable 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
|
Reference in New Issue
Block a user