What exactly is meant by:

REQUIRES

* Graphviz tools on the system PATH

I am writing a step-by-step procedure starting with a PEAR installation post a WampServer setup, since it does not automatically setup PEAR, plus verify PEAR is working, PEAR config and include path verify, and finally a package installation. Think it will help others use your module.

So should the system path include the directory path to Graphviz? I did not see an actual folder titled Graphviz tools.

Comments

infojunkie’s picture

First of all thanks for your documentation effort. What I tried to say in the requirements, and failed miserably, is this:

The original Graphviz package, upon which Graphviz Filter is built, comes in the form of command-line tools named "dot", "neato", "twopi", etc. Graphviz Filter and the PEAR package Image_Graphviz depend on finding these command-line tools to be able to produce their output. That's why they should be on the system path.

On Linux, installing those tools is as easy as letting the package manager do it for us. For example, on Ubuntu,

sudo apt-get install graphviz

will install the command-line tools and make them available for anyone who calls them.

On Windows, it is necessary to download an installer from the Graphviz site. Unfortunately, this installer does not add the folder where these tools are installed (e.g. C:\Program Files\Graphviz 2.21\bin) to the %PATH% variable. In order for PHP on Windows to find Graphviz, the %PATH% variable must be modified to include the bin folder. This is usually done by right-clicking My Computer > Properties >Advanced > Environment Variables, then finding and editing the Path system variable in that dialog. The full path of the bin folder should be appended to the value of the Path variable, preceded by a semicolon (;). To make sure this works, type 'cmd' in the Start > Run... box, then in the console, type

dot -h

which should display a help message on using 'dot'. Of course, if the path isn't set correctly, you'll get an 'unrecognized command' message instead.

Hope this clarifies things!

Varenne’s picture

Explained perfectly!

As a technical writer-analyst I'm a huge fan of being able to represent data, environments, software, etc., graphically on both Windows and Linux. (A picture speaks a thousand words, especially to non-techies.) So discovering your Drupal module led to discovering Graphviz, yet another tool in my arsenal, so many thanks!

Per the link you provided I downloaded the actual Graphviz application.
(I'd like to recommend that this instruction and the link you provided to Graphviz be included in your REQUIRES section, before the "* Graphviz tools on the system PATH" item. And should it be Graphviz tools or Graphviz application? I'll do a section rewrite and submit it to you for review, so hold off on any page edits.)

Added the folder location to my existing Windows %PATH% variable.

Tested from the command line interface (CLI) using the command and flag, dot -h.
Works, example output is at the very bottom of this post, and I assume the "dot: option -h unrecognized" message was intended as there is no actual -h, just a simply way to force the print to screen output.

I can add all of this to my procedure for setting up a Windows-based, WampServer, PEAR, development box instance with the Drupal Graphviz Filter module.

Next will be the procedure for a production instance on a hosting service running Unix/Linux as that is what my host uses. (I hope I am actually allowed to install Graphviz, they prevented me from installing some other applications in the past. I'll try apt-get and see what happens.)

Cheers and thanks for the clarity. (Apologies about posting while in verbose mode, lol!)

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>dot -h
dot: option -h unrecognized

Usage: dot [-Vv?] [-(GNE)name=val] [-(KTlso)<val>] <dot files>
(additional options for neato)    [-x] [-n<v>]
(additional options for fdp)      [-L(gO)] [-L(nUCT)<val>]
(additional options for memtest)  [-m]
(additional options for config)  [-cv]

 -V          - Print version and exit
 -v          - Enable verbose mode
 -Gname=val  - Set graph attribute 'name' to 'val'
 -Nname=val  - Set node attribute 'name' to 'val'
 -Ename=val  - Set edge attribute 'name' to 'val'
 -Tv         - Set output format to 'v'
 -Kv         - Set layout engine to 'v' (overrides default based on command name)
 -lv         - Use external library 'v'
 -ofile      - Write output to 'file'
 -O          - Automatically generate an output filename based on the input filename with a .'format
' appended. (Causes all -ofile options to be ignored.)
 -q[l]       - Set level of message suppression (=1)
 -s[v]       - Scale input by 'v' (=72)
 -y          - Invert y coordinate in output

 -n[v]       - No layout mode 'v' (=1)
 -x          - Reduce graph

 -Lg         - Don't use grid
 -LO         - Use old attractive force
 -Ln<i>      - Set number of iterations to i
 -LU<i>      - Set unscaled factor to i
 -LC<v>      - Set overlap expansion factor to v
 -LT[*]<v>   - Set temperature (temperature factor) to v

 -m          - Memory test (Observe no growth with top. Kill when done.)

 -c          - Configure plugins (Writes $prefix/lib/graphviz/config
               with available plugin information.  Needs write privilege.)
 -v          - Enable verbose mode
Varenne’s picture

Here is the completed Drupal book located on my production site.

Title: Requirements and Procedures to Utilize the Drupal module Graphviz Filter by kratib

http://crc-stc.com/Requirements_and_Procedures_to_Utilize_the_Drupal_mod...

It covers:
* Downloading and Setting up the Graphviz Tools Package.
* How to Install PHP PEAR on WampServer.
* PEAR Installation per PHP PEAR Manual and PEAR Image_GraphViz package Installation.
* Testing the Drupal Graphviz Filter module with CCK.

This should help those wishing to setup and test this module for use on their development sites, especially those using WampServer like myself.

Cheers

infojunkie’s picture

Status: Active » Fixed

Hey thanks! I added a link to your doc on the module page. Did you consider publishing that book in the Drupal.org handbooks?

Varenne’s picture

Yes but I wanted to give it some additional tweaks here and there before I do. I did some of that today.

Let me know if you see anything incorrect or in need of further clarification.

I'm about to begin a new employment contract (tomorrow) and may not get back to this right away.

Cheers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.