Merge branch 'master' of https://github.com/tla/stemmatology
tla [Tue, 2 Dec 2014 14:43:54 +0000 (15:43 +0100)]
base/lib/Text/Tradition/Collation.pm
base/script/make_tradition.pl
base/t/text_tradition_collation.t

index 41cace4..84ed439 100644 (file)
@@ -457,6 +457,8 @@ warnings_exist {
        "Got expected relationship drop warning on parse";
 
 my $c = $t->collation;
+# Force the transitive propagation of all existing relationships.
+$c->relations->propagate_all_relationships();
 
 my %rdg_ids;
 map { $rdg_ids{$_} = 1 } $c->readings;
index a393660..4ebfa39 100755 (executable)
@@ -55,13 +55,14 @@ $informat = 'Tabular' if $informat =~ /^tab$/i;
 $informat = 'CollateText' if $informat =~ /^stone$/i;
 $informat = 'Tabular' if $informat =~ /^xls/i;
 
-unless( $outformat =~ /^(graphml|svg|dot|stemma(svg)?|(c|t)sv|db)$/ ) {
-    help( "Output format must be one of db, graphml, svg, csv, tsv, stemma, or dot" );
+unless( $outformat =~ /^(graphml|svg|dot|adj(acency)?|stemma(svg)?|(c|t)sv|db)$/i ) {
+    help( "Output format must be one of db, graphml, svg, csv, tsv, stemma, adjacency, or dot" );
 }
+$outformat = 'adjacency_list' if $outformat =~ /^adj/i;
 
 if( $from || $to ) {
-       help( "Subgraphs only supported in GraphML, dot, or SVG format" ) 
-               unless $outformat =~ /^(graphml|dot|svg)$/;
+       help( "Subgraphs only supported in GraphML, dot, adjacency, or SVG format" ) 
+               unless $outformat =~ /^(graphml|dot|svg|adjacency_list)$/;
 }
 
 # Do we have a base if we need it?
index ff73da2..edced1b 100644 (file)
@@ -77,6 +77,8 @@ warnings_exist {
        "Got expected relationship drop warning on parse";
 
 my $c = $t->collation;
+# Force the transitive propagation of all existing relationships.
+$c->relations->propagate_all_relationships();
 
 my %rdg_ids;
 map { $rdg_ids{$_} = 1 } $c->readings;