add config.json
This commit is contained in:
4
Rule34/.gitignore
vendored
4
Rule34/.gitignore
vendored
@ -1 +1,5 @@
|
|||||||
to_download_r34.txt
|
to_download_r34.txt
|
||||||
|
to_download_r34.txt.bak
|
||||||
|
archive-rule34.sqlite3
|
||||||
|
log.txt
|
||||||
|
Download
|
||||||
|
44
Rule34/config.json
Normal file
44
Rule34/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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
#cp downloaded_r34.txt to_download_r34.txt || exit 1
|
#cp downloaded_r34.txt to_download_r34.txt || exit 1
|
||||||
|
|
||||||
#try once
|
#try once
|
||||||
#gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
|
gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
|
||||||
|
|
||||||
if [ ! -s to_download_r34.txt ]; then
|
if [ ! -s to_download_r34.txt ]; then
|
||||||
#success! just exit
|
#success! just exit
|
||||||
@ -20,8 +20,10 @@ else
|
|||||||
echo "has internet"
|
echo "has internet"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
#try again
|
#try again
|
||||||
#gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
|
gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
|
||||||
|
|
||||||
if [ ! -s to_download_r34.txt ]; then
|
if [ ! -s to_download_r34.txt ]; then
|
||||||
echo "file empty"
|
echo "file empty"
|
||||||
|
Reference in New Issue
Block a user