lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV External filters (was: converting Pine addressbook to html)


From: Jim Spath (Webmaster Jim)
Subject: Re: LYNX-DEV External filters (was: converting Pine addressbook to html)
Date: Tue, 25 Feb 1997 06:25:34 -0500 (EST)

On Mon, 24 Feb 1997, Klaus Weide wrote:
> Tom Zerucha wrote:
> > Jim Spath wrote:
> > > Tom Zerucha wrote:
> > > > Since we have multiple bookmarks, could there be read-only bookmarks 
> > > > that
> > > > take the output of a command, e.g.
> > > > Bookmark P = "#!/bin/sh;cat ~/.addressbook | pineab2html"
> > > Ahh.  So we need Lynx to be able to read from stdin, or a pipe, to extend
> > Different locus of change.  If I already use Pine (since I don't think
> > Lynx supports pop3: URLs), I might want to maintain my mail reader
> > separately from Lynx, but be able to mailto: using the file.
> ... 
> [ I am commenting mostly on the last sentence, I haven't tried to
> understand exactly the exact use of this w.r.t. bookmarks, pine, etc. ]

Okay, I've now learned how to use lynxcgi :-)  From some of the tasks
under discussion (but not tables), this is the Lynx way to go. First, you
must have LYNXCGI_LINKS defined in userdefs.h. 

I've been checking out the latest NS beta, which, bizarrely, seems to
encourage putting HTML tags into email messages.  So reading those
messages, as well as being able to use embedded URLs in mail is a useful
task.  I've modified an existing email-to-html filter program,
"babymail.pl" so that it simply reads its stdin and generates html on
stdout.  It's at http://www.bcpl.lib.md.us/~jspath/perl/sonofbabymail.pl.
It's not complete, but it will parse an email folder into messages
separated by "name" tags and highlight http, ftp, and mailto URLs.

Here's a simple front end page for it:

<html>
<head>
<title>Read EMail Folders With Lynx CGI</title>
</head>
<body>
<br>
<a href="lynxcgi://usr/home/jim/lynxcgi/readmail.sh">mbox</a>
<ul>
<li><a href="lynxcgi://usr/home/jim/lynxcgi/readmail.sh?gnats">gnats</a>
<li><a href="lynxcgi://usr/home/jim/lynxcgi/readmail.sh?mtools">mtools</a>
</ul>
</body>
</html>

I used a shell script as the wrapper to be able to easily add the
email folders I might have.  readmail.sh looks like this:

#!/bin/sh
MYHOME=/usr/home/jim ; export $MYHOME
if [ $# = 0 ]
then
  echo "Content-type: text/html"
  echo
  ${MYHOME}/perl/sonofbabymail.pl <${MYHOME}/mail/mbox
else
  echo "Content-type: text/html"
  echo
  ${MYHOME}/perl/sonofbabymail.pl <${MYHOME}/mail/$1
fi

Did I mention you have to define  LYNXCGI_LINKS ? :-)

------
<http://www.cs.indiana.edu/picons/db/users/us/md/lib/bcpl/jspath/face.xbm>



;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]