[elinks-users] Links and pipes

Nick Simicich njs at scifi.squawk.com
Mon Aug 1 09:59:14 PDT 2005


(Previously posted to links-list).

I maintain a perl script called demime.  demime takes a message and
unmercifully flattens it - the message that comes out of demime is a
single section plain text message with attachments elided.

Currently, I use either lynx or HTML::FormatText when I must interpret a
text/html section.

Frankly, both of these programs format html poorly. I recognize that
plain text formatting will always have issues when people expect full
graphical formatting, but, well, I do not care all that much.  The real
problem is that the above schemes either elide things or the order is
screwed up.

I was considering the use of elinks to do this formatting.

I looked at the man page and decided that this would be a good start for
a command line:

elinks -anonymous 1 -default-mime-type text/html -dump 1  -dump-width 70
-no-connect 1 -no-home 1 -stdin 1

But this does not work. Specifying anonymous (which I need so that
people can't use frames or other includish things to read files on my
system) conflicts with -stdin 1 since that simply uses a
file:///dev/stdin reference.

But I don't want them to be able to crash my system or casually
compromise it. I think what I really need is an option that says, "Do
not resolve any urls in what I present you, just render it as best you
are able without referencing anything out of the stream."

I've read the doc and I can't find that option. Am I missing something
or does that option not exist?

(And, finally, is it time to modify the --stdin 1 command line flag so 
that it reads from the stdin passed to the program instead of 
file:///dev/stdin ? Or does that matter? Can the stdin file just be 
removed from the list of things that are tested)


-- 
Blog: http://majordomo.squawk.com/njs/blog/blogger.html
Atom: http://majordomo.squawk.com/njs/blog/atom.xml
RSS: http://majordomo.squawk.com/njs/blog/atom.rdf



More information about the elinks-users mailing list