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