🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #201166

Re: OT enscript (was: Printing In Slrn)

#201166
From: I R A Darth Aggie
Date: Thu, 28 Jun 2007 15:19
41 lines
2950 bytes
On Thu, 28 Jun 2007 13:34:41 +0100,
Adam Funk <a24061@ducksburg.com>, in
<1gmcl4-b1k.ln1@news.ducksburg.com> wrote:
>+  On 2007-06-28, Adam Funk wrote:
>+ 
>+ > I'd never heard of the enscript command before (I've been using a2ps)
>+ > but it looks interesting --- thanks.
>+ 
>+  Hmm: is there any equivalent in enscript of `a2ps -Pdisplay` (to
>+  display the ps output in a window so you can preview it before
>+  printing)?

Well, enscript's manpage details this nugget:

       -p file, --output=file
               Leave  the  output  to file file.  If the file is `-',
	       enscript sends the output to the standard output
	       stdout.

which should allow you to pipe the results into a viewer of choice,
provided it can read from STDIN.

After about 30 seconds of playing, '-p -' does indeed spew to STDOUT,
and with the right tools can be manipulated. Unfortunately, I can't
get the standard postscript display renders to take input from STDIN.

Having taken a look at the goings-on when one runs "a2ps -P
display...", it seems to work around that limitation in gv by writing
a temp file in /tmp/, then opening it with gv.

So, with enscript one might do this in a script:

enscript -p /tmp/enscript-(some random value) (some file name)
gv /tmp/enscript-(some random value)
rm /tmp/enscript-(some random value)

-- 
Consulting Minister for Consultants, DNRC
I can please only one person per day. Today is not your day. Tomorrow
isn't looking good, either.
I am BOFH. Resistance is futile. Your network will be assimilated.
Technical Details
Message-ID: <slrnf87kc8.2us.n0b0dy@192.168.10.10>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!usenet.INS.cwru.edu!news-ext.gatech.edu!news.fsu.edu!not-for-mail
References: <20070627120656.41a27525@terry-desktop> <CM-dnbq5abCbWR_bnZ2dnUVZ_u6rnZ2d@comcast.com> <slrnf85ie4.7ca.n0b0dy@192.168.10.10> <2tkcl4-rtj.ln1@news.ducksburg.com> <1gmcl4-b1k.ln1@news.ducksburg.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrnf87kc8.2us.n0b0dy@192.168.10.10>
Subject: Re: OT enscript (was: Printing In Slrn)
Date: Thu, 28 Jun 2007 15:19:36 +0000
From: I R A Darth Aggie <n0b0dy@192.168.10.10>
References: <20070627120656.41a27525@terry-desktop> <CM-dnbq5abCbWR_bnZ2dnUVZ_u6rnZ2d@comcast.com> <slrnf85ie4.7ca.n0b0dy@192.168.10.10> <2tkcl4-rtj.ln1@news.ducksburg.com> <1gmcl4-b1k.ln1@news.ducksburg.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!usenet.INS.cwru.edu!news-ext.gatech.edu!news.fsu.edu!not-for-mail
Newsgroups: news.software.readers
Organization: Texas A&M University - Tallahassee
Lines: 41
Reply-To: no-courtesy-copies-please
NNTP-Posting-Host: aggie.stat.fsu.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.fsu.edu 1183043976 26627 128.186.4.84 (28 Jun 2007 15:19:36 GMT)
X-Complaints-To: abuse@fsu.edu
NNTP-Posting-Date: 28 Jun 2007 15:19:36 GMT
X-WebTV-Stationery: Standard; BGColor=black; TextColor=black
User-Agent: slrn/0.9.8.1pl2 (Debian)
X-Original-Bytes: 2687