#!/bin/bash # sec12 EN queue round 2 — small files first cd /home/dima/jung/downloads/12-practical-case || exit 1 LOG=/home/dima/jung/tools/sec12-en-queue2.log dl() { local fid="$1"; local out="$2"; local ed="$3" if [ -f "$out" ]; then echo "skip $out" >> "$LOG"; return; fi timeout 1500 python3 -u /home/dima/jung/tools/lgdl.py dl "$fid" . "$out.tmp" "$ed" >> "$LOG" 2>&1 for f in "$out.tmp".*; do [ -f "$f" ] && mv "$f" "$out" && echo "done $out" >> "$LOG" done } dl 99562078 29-hanna-encounters-en-1981.pdf 143312095 dl 91896401 35-yalom-gift-therapy-en-2002.pdf 136610054 dl 101202531 35-yalom-gift-therapy-en-2002b.epub 144953287 dl 101487057 35-yalom-gift-therapy-en-2002c.epub 145237701 dl 110582054 25-balint-basic-fault-en-2017b.pdf 153615743 dl 92165960 27-fordham-modern-science-en-1973.pdf 136888043 dl 99760709 29-hanna-encounters-en-1981b.pdf 143510726 dl 101302753 28-guggenbuhl-craig-power-en-1996.pdf 145053515 dl 115111994 31-leonard-witness-fire-en-1990.pdf 207759335 echo "QUEUE DONE" >> "$LOG"