From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] How about some software? Message-ID: <20020617102515.A14809@cnm-vra.com> References: <82708d438b9ead33a3ee6a93255cb66e@plan9.bell-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <82708d438b9ead33a3ee6a93255cb66e@plan9.bell-labs.com>; from rob@plan9.bell-labs.com on Mon, Jun 17, 2002 at 12:56:31PM -0400 From: Micah Stetson Date: Mon, 17 Jun 2002 10:25:15 -0700 Topicbox-Message-UUID: b14a3646-eaca-11e9-9e20-41e7f4b1d025 > # cheap html to text renderer ... If you use htmlfmt -u $1 in wurl2txt, you get links that you can right click on in acme. Also, images are placed in the output as [image ]. Then a slight modification of rob's plumbing rule can be used to view images in a separate window: type is text data matches 'image (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 wurl2img $0 and here's wurl2img: #!/bin/rc switch($#*){ case 0 exit case 1 # send hget errors to 2 so they appear in window hget $1 >[2=1]| plumb -i -d image exit case * for(i in *) wurl2img $i } Granted, htmlfmt -u is not as pretty as just htmlfmt, but the fact that acme gives you almost-hypertext at no extra cost is really cool nonetheless. Micah