lesspipe.sh, a preprocessor for less
====================================

Version: 1.52
-------------

License: GPL
------------

Usage:	lesspipe.sh is called when the environment variable LESSOPEN is set:
------	LESSOPEN="|lesspipe.sh %s"; export LESSOPEN	(sh like shells)
	setenv LESSOPEN "|lesspipe.sh %s"		(csh, tcsh)
	Use the fully qualified path if lesspipe.sh is not in the search path
	View files in multifile archives:
			less archive_file:contained_file
	This can be used to extract single files from a multifile archive:
			less archive_file:contained_file>extracted_file
	As less is not good for extracting binary data use instead:
			lesspipe.sh archive_file:contained_file>extracted_file
        Even a file in a multifile archive that itself is contained in yet
        another archive can be viewed this way:
				less super_archive:archive_file:contained_file
	Display the last file in the file1:..:fileN chain in raw format:

	Syntax highligting is only tried if less is called with -r or -R !!!
	Suppress syntax highligting:	less file1:..:fileN:  (append 1 colon)
	Force highligting for another language:	less file1:..:fileN:suffix
	where suffix denotes the language: .ada .asm .inc .awk .c .h .cpp .cxx
					   .groff .html .php .xml .java .js .lsp
					   .m4 makefile .pas .patch .diff .pm
					   .pl .pod .pov .py .rb .sh .sql

	Suppress input filtering:	less file1:..:fileN:   (append a colon)
	Suppress decompression:		less file1:..:fileN::  (append 2 colons)
	To view files and filesystems on removable media (examples: DOS
	formatted disk or floppy containing tar file) use the appropriate
	device file (e.g. less /dev/fd0)

Required programs:
------------------
	bash (at least version 2.03) or zsh or ksh (also pdksh, tested with
          version 5.2). Configure puts an appropriate first line in the script
	file (a version that recognizes the supported formats)
          (GNU file 3.27 or above recommended)
	perl (for configure and code2color, lesspipe.sh can work without it)
	ls, rm, cat, cut and further programs for special formats (see below)

Support for the following compression methods:
----------------------------------------------
	gzip, compress, pack	requires gzip
	bzip2			requires bzip2
	zip			requires unzip

Syntax highlighting for the following types of languages:
---------------------------------------------------------
	ada, asm, awk, c, c++, groff, html, xml, java, javascript, lisp, m4,
	make, pascal, patch, perl, povray, python, ruby, shellscript, sql
	requires the installation of the perl program 'code2color'
	(included in the lesspipe package)

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
	iso images	requires isoinfo
	MacOSX archives requires lsbom (and an updated /etc/magic file)
	MacOS X bom	requires lsbom (and an updated /etc/magic file)
	cab		requires cabextract (version 1.0 or above)
	perl storable   requires perl

Latest version available from:
------------------------------
	http://www.desy.de/zeuthen/~friebel/unix/lesspipe.html

Extended description:
---------------------
        http://www.linux-magazin.de/ausgabe/2001/01/lesspipe/lesspipe.html
	Appeared in Linux-Magazin 1/2001 pp. 172-174 (in german)
        http://ref.cern.ch/CERN/CNL/2002/001/unix-less/ (in english)
	(see also the files english.txt and german.txt with a similar content)

Thanks to:
----------
	Florian Cramer: MS Word support, ASCIIart
	Michael Wiedmann: Debian packages support
	Derek B. Noonburg: PDF files support
	Heinrich Kuettler: formatting, html via lynx
	Philippe Defert: unattended installation
	Vladimir Linek: inspired me to add ps and dvi support
        Carl Greco: enhanced output for .deb files
        Eduard Bloch: proposed support for ISO images
	Istvan Marko: speedup of the procedure
        Remi Mommsen: Mac OS X support
        Bastian Fuchs: Issues using bash vs. sh
        Slaven Rezic: Cygwin support, bug fixes
        Ben Kibbey: works on FreeBSD
        Sren Andersen: PPD files colorization requested
        Chelban Vasile: trap command not working under /bin/sh
        Jens Schleusener: ksh syntax fixes
	
Author:  Wolfgang Friebel DESY Zeuthen (Wolfgang.Friebel AT desy.de)
