Hi there

Sorry for delay in replying but still unwell (cue sadness and despondancy to
descend on list) ....

On Tue, 02 Sep 2003 19:19:13 +1200
Matthew Gregan <[EMAIL PROTECTED]> wrote:

> On Tue, Sep 02, 2003 at 07:03:38PM +1200, Volker Kuhlmann wrote:
> 
> > doesn't make it looke like I want to start either. The man page
> > doesn't say anything at all about rendering html. less 378+iso254.
> 
> That's because less doesn't render HTML.
> 

But it does!! 
Not all the time i'll admit - this depends on the html file in question - but
when it does 'work' (ie the file's rendered) the following text appears as the
first line:

        ==> append : to filename to view the HTML source

and if you do do this you'll be looking at the file as marked up html source, 
as promised. 

less version 381 at this end.

by the by thanks to this sub-thread i've learnt a lot about less. 
i never realised it could do so much.
its homepage <http://www.greenwoodsoftware.com/less> was well worth the read
i reckon.

AHHH NO! 
Bugger it - i've been exploring and found out how it's done.
/usr/bin/lesspipe.sh is using lynx. 
at line 260 i find -

elif [[ "$1" = *HTML* ]]; then
    echo "==> append $sep to filename to view the HTML source"
    lynx -dump -force_html "$2"

never mind. 
lesspipe is quite cool. 
it's a preprocessor for less which - quoting from its homepage  
<http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html> - provides
Support for the following compression methods:
----------------------------------------------
        gzip, compress, pack    requires gzip
        bzip2                   requires bzip2
        zip                     requires unzip

Preprocesssing of the following file types (also compressed):
-------------------------------------------------------------
        tar             requires GNU tar
        nroff(mandoc)   requires groff
        ar library      requires ar
        shared library  requires nm
        executable      requires strings
        directory
        RPM             requires rpm, rpm2cpio and GNU cpio
        Microsoft Word  requires antiword
        Debian          requires  dpkg, dpkg-deb
        html            requires html2text or lynx
        pdf             requires pdftotext
        perl            requires pod2text
        unmounted media requires programs to read from these media
                        (GNU file 3.27 or above, tar, mdir, mtype, mtoolstest)
        rtf             requires unrtf (and optionally html2text)
        dvi             requires dvi2tty
        ps              requires pstotext or ps2ascii and gs
        mp3             requires mp3info

So my apologies to you Matthew(as you said) less doesn't render html after
all.

cheers
peter

Reply via email to