sec08 MANIFEST rebuilt to sec01-07 cancon (per-item 'N files' headers, Cross-references before Not downloadable); queue scripts generalized to tools/lgdl-queue.sh + lgdl-rounds.sh, logs/queue removed from downloads dir

This commit is contained in:
Dmitry Kokorin 2026-09-26 22:45:03 +03:00
parent 8e664c7099
commit 4bc2bfb6e4
8 changed files with 129 additions and 1031 deletions

20
tools/lgdl-rounds.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
# Cooldown-round runner for lgdl-queue.sh (ads.php throttle: 25-min pauses between rounds).
# Usage: tools/lgdl-rounds.sh <section-dir> <queue-file> [max_rounds]
cd /home/dima/jung
D="$1"; Q="$2"; MAX="${3:-6}"; RLOG="$D/rounds.log"
n=1
while [ "$n" -le "$MAX" ]; do
echo "=== ROUND $n $(date)" >> "$RLOG"
bash tools/lgdl-queue.sh "$D" "$Q"
remaining=0
while read -r f_id ed_id name; do
[ -z "$f_id" ] && continue
ls "$D/$name"*.pdf "$D/$name"*.epub "$D/$name"*.fb2 "$D/$name"*.doc "$D/$name"*.rtf "$D/$name"*.djvu >/dev/null 2>&1 || remaining=$((remaining+1))
done < "$Q"
echo "round $n done, remaining=$remaining $(date)" >> "$RLOG"
[ "$remaining" -eq 0 ] && { echo "ALL DONE" >> "$RLOG"; break; }
sleep 1500
n=$((n+1))
done
echo "=== ROUNDS COMPLETE $(date)" >> "$RLOG"