my( $informat, $outformat, $language, $name, $sep, $dsn ) = ( '', '', 'Default',
'Tradition', "\t", "dbi:SQLite:dbname=stemmaweb/db/traditions.db" );
# Variables with no default
-my( $inbase, $help, $stemmafile, $dbuser, $dbpass, $from, $to, $dbid, $debug );
+my( $inbase, $help, $stemmafile, $dbuser, $dbpass, $from, $to, $dbid, $debug, $nonlinear );
GetOptions( 'i|in=s' => \$informat,
'b|base=s' => \$inbase,
'p|pass=s' => \$dbpass,
'f|from=s' => \$from,
't|to=s' => \$to,
+ 'nl|nonlinear' => \$nonlinear,
'sep=s' => \$sep,
'dsn=s' => \$dsn,
'dbid=s' => \$dbid,
}
if( $from || $to ) {
- help( "Subgraphs only supported in GraphML format" )
- unless $outformat eq 'graphml';
+ help( "Subgraphs only supported in GraphML, dot, or SVG format" )
+ unless $outformat =~ /^(graphml|dot|svg)$/;
}
# Do we have a base if we need it?
# nodes represent line beginnings.
my %args = ( 'input' => $informat,
'file' => $input );
+ $args{'linear'} = 0 if $nonlinear;
$args{'base'} = $inbase if $inbase;
$args{'language'} = $language if $language;
$args{'name'} = $name if $name;