项目作者: Alhadis

项目描述 :
Object and stack inspection library for PostScript. Colour included.
高级语言: PostScript
项目地址: git://github.com/Alhadis/Inspect.ps.git
创建时间: 2021-04-14T13:43:50Z
项目社区:https://github.com/Alhadis/Inspect.ps

开源协议:ISC License

下载


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:

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

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

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

Usage

Use === to inspect a single operand:

  1. userdict ===

Use ? to inspect the entire stack à la pstack:

  1. (A) (B) (C) (D) ?

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