Enscript

Liste des GroupesRevenir à col advocacy 
Sujet : Enscript
De : OFeem1987 (at) *nospam* teleworm.us (Chris Ahlstrom)
Groupes : comp.os.linux.advocacy
Date : 23. Oct 2024, 13:54:11
Autres entêtes
Organisation : None
Message-ID : <vfarm9$21oij$1@dont-email.me>
User-Agent : slrn/1.0.3 (Linux)
I haven't used enscript for quite awhile. I used it all the time at work to
print code without having to use a text editor to do it. Here's part of a
script to convert a text file to PDF, with line numbers and a narrow font
suitable to printing. Blank lines and some info output removed.

#!/bin/bash
FONT="Monospace8"
OPTIONS="q -B -C -G -T3"
for FILENAME in $* ; do
#  Get the whole filename, then strip off the whole file extension.
   BASENAME="${FILENAME%%.*}"
   EXTENSION="${FILENAME##*.}"
   EOPTION="E"
   [ "$EXTENSION" == "hpp" ] && EOPTION="Ecpp"
   [ "$EXTENSION" == "h" ] && EOPTION="Ec"
enscript -$OPTIONS -$EOPTION -f $FONT -p - $FILENAME  | ps2pdf - $BASENAME.pdf
done

--
A selection from the Taoist Writings:
 
"Lao-Tan asked Confucius: `What do you mean by benevolence and righteousness?'
 Confucius said:  `To be in one's inmost heart in kindly sympathy with all
 things; to love all men and allow no selfish thoughts: this is the nature
 of benevolence and righteousness.'"
-- Kwang-tzu

Date Sujet#  Auteur
23 Oct 24 * Enscript18Chris Ahlstrom
23 Oct 24 `* Re: Enscript17Farley Flud
23 Oct 24  +* Re: Enscript12Chris Ahlstrom
23 Oct 24  i`* Re: Enscript11Farley Flud
23 Oct 24  i +* Re: Enscript9Chris Ahlstrom
24 Oct 24  i i`* Re: Enscript8rbowman
24 Oct 24  i i +* Re: Enscript6Chris Ahlstrom
24 Oct 24  i i i+* Re: Enscript4Farley Flud
24 Oct 24  i i ii+- Re: Enscript1Chris Ahlstrom
24 Oct 24  i i ii+- Re: Enscript1DFS
25 Oct 24  i i ii`- Re: Enscript1Physfitfreak
24 Oct 24  i i i`- Re: Enscript1rbowman
24 Oct 24  i i `- Re: Would Missoula arrest you if you shut a deer from your window ?1rbowman
25 Oct 24  i `- Re: Enscript1Stéphane CARPENTIER
25 Oct 24  `* Re: Enscript4Physfitfreak
25 Oct 24   `* Re: Enscript3rbowman
25 Oct 24    `* Re: Enscript2Diego Garcia
28 Oct 24     `- Re: Enscript1Physfitfreak

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal