[RavenclawDev 259] [22] Tools/RCTaskViz/RCTaskViz.pl: 1) made grammar printing an option ( -g on the command line)
tk@edam.speech.cs.cmu.edu
tk at edam.speech.cs.cmu.edu
Wed Apr 18 00:07:46 EDT 2007
An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20070418/aebeccd7/attachment.html
-------------- next part --------------
Modified: Tools/RCTaskViz/RCTaskViz.pl
===================================================================
--- Tools/RCTaskViz/RCTaskViz.pl 2007-04-13 21:22:37 UTC (rev 21)
+++ Tools/RCTaskViz/RCTaskViz.pl 2007-04-18 04:07:44 UTC (rev 22)
@@ -4,13 +4,16 @@
use strict;
use GraphViz;
+use Getopt::Std;
-my $g = GraphViz->new(directed => 1, layout => 'dot');
-
-die "usage: $0 {dialog task filename}$/" if !@ARGV;
+my %options=();
+getopts('g',\%options);
+die "usage: $0 -g {dialog task filename}$/" if !@ARGV;
my $taskfile = shift;
open(TASKFILE, $taskfile) || die "could not open taskfile '$taskfile'$/";
+my $g = GraphViz->new(directed => 1, layout => 'dot', rankdir => 'LR');
+
my $MAX_LABEL = 55;
my @defaultattr = (shape => 'box', style => 'filled');
@@ -95,7 +98,7 @@
$gref .= $1;
#print "adding '$1'$/";
}
- if($gref) {
+ if($options{'g'} && $gref) {
if(length($gref) > $MAX_LABEL) {
$gref = substr($gref, 0, $MAX_LABEL-3).'...';
}
More information about the Ravenclaw-developers
mailing list