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

Version: 1.55
-------------

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:
	Suppress input filtering:	less file1:..:fileN:  (append 1 colon)
	Suppress decompression:		less file1:..:fileN:: (append 2 colons)

	Suppress syntax highlighting:	less file1:..:fileN:  (append 1 colon)
	Syntax highlighting is only tried if less is called with -r or -R !!!
	Force highlighting 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

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
	rar			requires rar or unrar
	7-zip			requires 7za
	lzma			requires lzma (limited support only)

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 		displays additional info if dpkg is installed
	html		requires html2text or links or lynx
	pdf		requires pdftotext (comes with xpdf)
	perl		requires pod2text
	rtf		requires unrtf (and optionally html2text)
	dvi		requires dvi2tty
	ps		requires pstotext or ps2ascii and gs
	mp3		requires id3v2 or mp3info
	jpg, png	requires identify
	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)
	MacOS X plist	requires plutil
	cab		requires cabextract (version 1.0 or above)
	gpg encrypted	requires gpg
	perl storable   requires perl
	Openoffice.org 1.x and Opendocument (OASIS) text documents
			requires o3read, html2text and an up to date
			magic file' from 'file' version 4.17 or later     

Conversion of files with alternate character encodings
------------------------------------------------------
	Depending on the content of the LANG variable files in the character
	encodings UTF-8, UTF-16, ISO-8859-1 are optionally converted.
			requires iconv

Latest version available from:
------------------------------
	http://freshmeat.net/projects/lesspipe/ or
	http://sourceforge.net/projects/lesspipe/

Extended description:
---------------------
	See the file english.txt. Other sources of documentation:
	http://ref.cern.ch/CERN/CNL/2002/001/unix-less/
	http://www.linux-magazine.com/issue/21/lesspipe.pdf
	Descriptions in german:
	german.txt (not updated)
	http://www.linux-magazin.de/ausgabe/2001/01/lesspipe/lesspipe.html
	http://www.linux-user.de/ausgabe/2002/04/060-ootb/lesspipe-1.html

Links to some utilities mentioned above (last checked: Jul 25 2008):
--------------------------------------------------------------------
	file       ftp://ftp.astron.com/pub/file/
	antiword   http://www.winfield.demon.nl/
	html2text  http://www.mbayer.de/html2text/
	cabextract http://www.cabextract.org.uk/

Thanks to (in alphabetical order):
----------------------------------
	Sören Andersen: PPD files colorization requested
	Andrew Barnert: shell syntax fix
	Peter D. Barnes, Jr.: plist files for Mac OS X
	Eduard Bloch: proposed support for ISO images
	Florian Cramer: MS Word, Openoffice support (o3read), ASCIIart
	Philippe Defert: unattended installation
	Bastian Fuchs: Issues using bash vs. sh
	Carl Greco: enhanced output for .deb files
	Stephan Hegel: suggested better 7za support
	Jürgen Kahnert: display debian files without dpkg
	Ben Kibbey: works on FreeBSD
	Heinrich Kuettler: formatting, html via lynx
	Vincent Lefevre: Openoffice support (sxw2txt)
	Vladimir Linek: inspired me to add ps and dvi support
	Istvan Marko: speedup of the procedure
	Markus Meyer: improved mp3 handling
	Remi Mommsen: Mac OS X support
	Derek B. Noonburg: PDF files support
	Slaven Rezic: Cygwin support, bug fixes
	Daniel Risacher: gpg support
	Jens Schleusener: ksh syntax fixes
	Ken Teague?: support more versions of file command
	Chelban Vasile: trap command not working under /bin/sh
	Götz Waschk: suggested lzma support
	Michael Wiedmann: Debian packages support

Author:	Wolfgang Friebel, DESY (Wolfgang.Friebel AT desy.de)
