9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Micah Stetson <micah@cnm-vra.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] How about some software?
Date: Mon, 17 Jun 2002 10:25:15 -0700	[thread overview]
Message-ID: <20020617102515.A14809@cnm-vra.com> (raw)
In-Reply-To: <82708d438b9ead33a3ee6a93255cb66e@plan9.bell-labs.com>; from rob@plan9.bell-labs.com on Mon, Jun 17, 2002 at 12:56:31PM -0400

> # 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 <url>].  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



  reply	other threads:[~2002-06-17 17:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17 16:56 rob pike, esq.
2002-06-17 17:25 ` Micah Stetson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-19  4:40 okamoto
2002-06-19  4:36 rob pike, esq.
2002-06-19  4:31 okamoto
2002-06-19  4:22 rob pike, esq.
2002-06-21 10:08 ` peter a. cejchan
2002-06-19  4:00 okamoto
2002-06-19  2:46 rob pike, esq.
2002-06-19  2:45 rob pike, esq.
2002-06-18 17:05 Russ Cox
2002-06-17 18:35 rog
2002-06-17 18:17 rog
2002-06-17 16:51 andrey mirtchovski
2002-06-17 16:42 rob pike, esq.
2002-06-18 17:01 ` FJ Ballesteros
2002-06-17 13:40 rob pike, esq.
2002-06-17 15:58 ` Sam
2002-06-17 16:35 ` Ronald G Minnich
2002-06-17 18:53 ` Christopher Nielsen
2002-06-17  9:20 Ben

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020617102515.A14809@cnm-vra.com \
    --to=micah@cnm-vra.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).