#!/bin/bash # tools/lgdl-en0106-big.sh — resume the two big files (vol1 184MB, art 298MB) # .part files are resume-safe; long timeouts for CDN-throttled big scans. cd /home/dima/jung LOG=/tmp/enq-0106-big.log mkdir -p "$(dirname "$LOG")" dl() { local fid="$1" out="$2" name="$3" if [ -f "$out/$name" ]; then echo "skip $name"; return 0; fi timeout 3600 python3 -u -c " import sys; sys.path.insert(0, 'tools') import lgdl ok = lgdl.download('$fid', '$out', '$name', tries=3) print('DONE $name' if ok else 'FAIL $name') " >> "$LOG" 2>&1 } dl 93442007 downloads/03-myths-fairy-tales 50-historical-atlas-vol1-animal-powers-en-1983.pdf dl 93468973 downloads/04-pictures 04-art-of-c-g-jung-en-2018.epub echo "QUEUE DONE" > /tmp/enq-0106-big.DONE