🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #4835

Re: Translating PostScript to ASCII: A Proposal

#4835
From: Jamie Zawinski
Date: Mon, 25 Feb 1991 06:15
15 lines
1091 bytes
Ok, I've been meaning to write this for a while...

Sort of the canonical 'sed' program.

Put this in your .cshrc file:

alias unps \(sed \
 \''s/^[ \t]*[^()]*$//g;s/%.*$//g;s/^[^(]*(//g;s/)[^(]*(/ /g;s/)[^)]*$//g;'\' \
 \| tr '\\012' '\\040' \| tr -s '\\040' '\\040' \; echo \'\'\)

and then "unps < somefile" will extract all of the PostScript strings from
"somefile."  There will be no newlines, and all occurences of multiple spaces
will be collapsed to a single space, so you'll need to wrap the lines by your
favorite method.
			-- Jamie
Technical Details
Message-ID: <JWZ.91Feb25011516@sunvalleymall.lucid.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!shelby!neon!lucid.com!campeau!jwz
References: <23304@well.sf.ca.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!shelby!neon!lucid.com!campeau!jwz
From: jwz@lucid.com (Jamie Zawinski)
Newsgroups: comp.lang.postscript
Subject: Re: Translating PostScript to ASCII: A Proposal
Message-ID: <JWZ.91Feb25011516@sunvalleymall.lucid.com>
Date: 25 Feb 91 06:15:16 GMT
References: <23304@well.sf.ca.us>
Sender: usenet@lucid.com
Distribution: comp
Organization: Lucid, Inc., Menlo Park, CA
Lines: 15
In-Reply-To: shiva@well.sf.ca.us's message of 23 Feb 91 09:05:57 GMT