Package: graphviz
Version: 2.20.2-8+b1
Severity: wishlist

Oddly enough, 'dot' almost has this feature, but the helpful output
itself is currently tricky to parse and list.

Model example; 'mplayer':

    mplayer -vo help | tail
        mpegpes MPEG-PES to DVB card
        yuv4mpeg        yuv4mpeg output for mjpegtools
        png             PNG file
        jpeg            JPEG file
        gif89a          animated GIF output
        tga             Targa output
        pnm             PPM/PGM/PGMYUV file
        md5sum          md5sum of each frame

    112 audio & 235 video codecs

'man dot' asks users to guess & poll, or go online:

    % man dot | grep -A 17 "OUTPUT FORMATS"
    OUTPUT FORMATS
       Dot uses an extensible plugin mechanism for its  output  renderers,
       so to see what output formats your installation of dot supports you
       can use ``dot -Txxx'' (where xxx is an unlikely format)  and  check
       the  warning message.  Also, The plugin mechanism supports multiple
       implementations of the output formats.  To see  what  variants  are
       available, use, for example: ``dot -Tpng:'' and to force a particu-
       lar variant, use, for example: ``dot -Tpng:gd''

       Traditionally, dot supports the following: -Tps (PostScript), -Tsvg
       -Tsvgz  (Structured  Vector Graphics), -Tfig (XFIG graphics), -Tmif
       (FrameMaker graphics), -Thpgl (HP pen plotters), and -Tpcl  (Laser-
       jet  printers),  -Tpng  -Tgif  (bitmap graphics), -Tdia (GTK+ based
       diagrams), -Timap (imagemap files for httpd servers for  each  node
       or  edge that has a non(hynull "href" attribute.), -Tcmapx (client-
       side imagemap for use in html and xhtml).  Additional  less  common
       or   more   special-purpose   output   formats   can  be  found  at
       http://www.graphviz.org/cvs/doc/info/output.html.)


(Bonus: if an 'mplayer'-like '-T help' option were added, most of those
two paragraphs won't be needed.)

When testing what the 'man' says, the user is surprised to find that 
"the warning message" is close what a '-T help' option should be:

    # there's no 'help' graphics format, so try that...
    % dot -T help
    Format: "help" not recognized. Use one of: canon cmap cmapx 
    cmapx_np dia dot eps fig gd gd2 gif hpgl imap imap_np ismap 
    jpe jpeg jpg mif mp pcl pdf pic plain plain-ext png ps ps2 
    svg svgz tk vml vmlz vrml vtx wbmp xdot xlib

The above listing is incomplete; subtypes exist:

    # show help for 'png'
    dot -Tpng:
    Format: "png:" not recognized. Use one of: png:cairo:cairo 
    png:cairo:gd png:gd:gd

More than one format followed by only a colon (e.g. 'dia:') make 'dot'
wait for input, (another bug?), so getting a complete list is a kludgy
business.  Until something better comes along, here's one way to do it:

    # parse '-T' error from stderr, mine that for suboptions,
    # ending needless processes as they occur.
    % for f in $(dot -T help 2>&1 | sed 's/.*://') ; 
        do  echo "Format: $f" ;
            dot -T$f: & n=$! ; 
            sleep .1s ; kill -9 $n  ; 
        done 2>&1 | grep Format | sed 's/.*: //g;s/ /\n/g'

On my system it shows 80 items.  Anyway, the 'mplayer -vo help' style
would be better.

HTH...





-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages graphviz depends on:
ii  libc6                2.10.2-6            Embedded GNU C Library: Shared lib
ii  libexpat1            2.0.1-7             XML parsing C library - runtime li
ii  libgd2-xpm           2.0.36~rc1~dfsg-3.1 GD Graphics Library version 2
ii  libgraphviz4         2.20.2-8+b1         rich set of graph drawing tools
ii  libx11-6             2:1.3.3-2           X11 client-side library
ii  libxaw7              2:1.0.7-1           X11 Athena Widget library
ii  libxmu6              2:1.0.5-1           X11 miscellaneous utility library
ii  libxt6               1:1.0.7-1           X11 toolkit intrinsics library

Versions of packages graphviz recommends:
ii  ttf-liberation         1.05.2.20091019-4 Fonts with the same metrics as Tim

Versions of packages graphviz suggests:
pn  graphviz-doc  <none>                     (no description available)
ii  gsfonts       1:8.11+urwcyr1.0.7~pre44-4 Fonts for the Ghostscript interpre

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to