[Linux-bruxelles] tranferer une page man en fichier texte lisible
Olivier Laurent
oli at aragne.com
Mar 4 Fév 18:11:34 CET 2003
On mar, 04 fév 2003, at 17:11, Quy NGUYEN DAI wrote:
> Stanislas wrote:
> >Bonjour,
> >
> >Qqun sait comment transferer une manpage vers un fichier texte tel que
> >la manpage apparait a l'ecran?
J'utilise le script man2pdf, un jour trouvé sur le Net:
!/bin/sh
#
# man2pdf: Converts a manpage to PDF format.
#
# Requires ps2pdf utility. # Make sure the required argument is present.
if [ "$1" = "" ]; then
echo "Usage: `basename $0` [section] commandname"
exit
fi # Assign a section variable if specified on the command line
if [ -n "$2" ]; then
command="$2"
section="$1"
else
command="$1"
section=""
fi # Convert to Postscript
man -t $section $command > $command.ps # Convert to PDF
ps2pdf $command.ps # Check for success
if [ -f $command.pdf ]; then
echo "Created $command.pdf"
else
echo '$0 failed to create $1.pdf.'
fi # Remove intermediate Postscript file
rm $command.ps
# end of script
--
Olivier Laurent.
P3B : Club Python(-Zope) Belge ---------- http://www.p3b.org
OS3B : Club Open-Software(-Linux) Carolo http://www.os3b.org
Aragne : Python-Zope Solutions & Formations http://www.aragne.com
Plus d'informations sur la liste de diffusion Linux-bruxelles