#!/bin/rc # # Lotus BBS query # bbs='http://www.british-cars.co.uk/cgi-bin/gen5?runprog=lotusbbs' idx='&access=&mode=tlist&subject=2050' art='&mode=thread&access=&subject=2050&source=T&thread=' if (~ $#* 0){ hget $bbs^$idx | htmlfmt -a | sed ' 1,/^Time$/d /^Start a new thread$/,$d ' | awk ' BEGIN {i = 0} { p[i++] = $0; if (i == 6){ id = p[1]; gsub("\]", "", id); gsub("^.*=", "", id); printf("elise %-22s # %-4s %s\n", id, p[3], p[0]); i = 0; } } ' } if not{ hget $bbs^$art^$1 | htmlfmt -l 80 | sed -n ' 1,/\| Advertisers \|/d /^If you would like to print this thread/,$d /^Thread: /{ s/^Thread: // p d } /^Posted /{ n /^$/d p d n d } s/^/ /p ' }