Skip to content

Object and stack inspection library for PostScript. Colour included.

License

Notifications You must be signed in to change notification settings

Alhadis/Inspect.ps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Inspect.ps

A recursive inspection library for PostScript, stylised in the vein of Node.js's colourful util.inspect() output:

Preview of highlighted output

Installation

  1. Download inspect.ps to wherever you store your PostScript libraries:

    $ curl https://git.io/JOsbC > /path/to/ghostscript/lib/inspect.ps
  2. Configure GhostScript to whitelist the path, if necessary.

    $ export GS_LIB="/path/to/ghostscript/libs:$GS_LIB"
  3. Verify successful installation by running:

    $ echo '(/path/to/ghostscript/libs) run << /Foo 1 >> ===' \
    | gs -sDEVICE=txtwrite -sOutputFile=- -q -sBATCH -dNOPAUSE -

Usage

Use === to inspect a single operand:

userdict ===

Use ? to inspect the entire stack à la pstack:

(A) (B) (C) (D) ?

Neither procedure modifies the stack, so dup-ing before inspection is unnecessary.

About

Object and stack inspection library for PostScript. Colour included.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published