3 fpath=($0:h:a/functions.zsh $fpath)
6 [[ -n "$dst" ]] || { dst=warcs ; dst=$dst:a }
8 autoload url-to-filename
9 zmodload -F zsh/datetime b:strftime
20 [[ "$line" != "" ]] || break
22 [[ $cols[1] = "X-URL:" ]] || continue
26 # Lazy temporary file creation
28 trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
29 wget_opts=(--output-document=$tmp $wget_opts)
31 fn=$(url-to-filename $url)-$(strftime %Y%m%d-%H%M%S)
32 wget $wget_opts --output-file=warcs.log --warc-file=$dst/$fn $url