diff --git a/Rule34/.gitignore b/Rule34/.gitignore index 3121c5e..e1c7a79 100644 --- a/Rule34/.gitignore +++ b/Rule34/.gitignore @@ -1 +1,5 @@ to_download_r34.txt +to_download_r34.txt.bak +archive-rule34.sqlite3 +log.txt +Download diff --git a/Rule34/config.json b/Rule34/config.json new file mode 100644 index 0000000..5e1567e --- /dev/null +++ b/Rule34/config.json @@ -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" + } + } +} + diff --git a/Rule34/gallery-dl.sh b/Rule34/gallery-dl.sh index cfb4aaf..47ceaa2 100755 --- a/Rule34/gallery-dl.sh +++ b/Rule34/gallery-dl.sh @@ -4,7 +4,7 @@ #cp downloaded_r34.txt to_download_r34.txt || exit 1 #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 #success! just exit @@ -20,8 +20,10 @@ else echo "has internet" fi +exit 0 + #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 echo "file empty"