From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <82708d438b9ead33a3ee6a93255cb66e@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] How about some software? From: "rob pike, esq." MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 17 Jun 2002 12:56:31 -0400 Topicbox-Message-UUID: b1445cf8-eaca-11e9-9e20-41e7f4b1d025 here's the plumbing rule: # cheap html to text renderer type is text data matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?,%#~&/\-+=]+([:.][a-zA-Z0-9_?,%#~&/\-+=]+)*' plumb start wurl2txt $0 here's wurl2txt: #!/bin/rc switch($#*){ case 0 exit case 1 name = /`{echo $1 | sed 's;.*//;; s;/.*;;'}^/webpage # send hget errors to 2 so they appear in window hget $1 >[2=1]| {echo $1; echo; htmlfmt} >[2=1] | plumb -i -d edit -a 'action=showdata filename='$name exit case * for(i in *) wurl2txt $i }