xkcd-uri - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- xkcd-uri (259B) --- 1 #!/bin/sh 2 3 if [ $# -lt 1 ]; 4 then 5 printf "usage: %s xkcduri\n" "$(basename "$0")" >&2 6 exit 1; 7 fi 8 9 xkcduri="$(hurl "${1}" \ 10 | xml2tsv 2>/dev/null \ 11 | grep div/img \ 12 | grep comics \ 13 | cut -f 2 \ 14 | sed 's,src=\(.*\),https:\1,')" 15 printf "%s\n" "${xkcduri}"