From: Tara L Andrews Date: Sat, 28 Apr 2012 19:55:09 +0000 (+0200) Subject: clean up script dir a little X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2Fstemmatology.git;a=commitdiff_plain;h=933df8d301764db30b5362b5ee296aa6ef11ccf5 clean up script dir a little --- diff --git a/script/make_svg.pl b/script/make_svg.pl deleted file mode 100644 index 334c075..0000000 --- a/script/make_svg.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl - -use lib 'lib'; -use strict; -use warnings; -use Text::Tradition::Graph; - -# First: read the base. Make a graph, but also note which -# nodes represent line beginnings. - -open( GRAPH, $ARGV[0] ) or die "Could not read file $ARGV[0]"; -my @lines = ; -close GRAPH; -my $graphml_str = join( '', @lines ); - -my $collation_graph = Text::Tradition::Graph->new( - 'GraphML' => $graphml_str, - ); - -print $collation_graph->as_svg(); -print STDERR "DONE\n"; diff --git a/script/svg_from_csv.pl b/script/svg_from_csv.pl deleted file mode 100644 index 9b72e7a..0000000 --- a/script/svg_from_csv.pl +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/perl - -use lib 'lib'; -use strict; -use warnings; -use Text::Tradition; - -# First: read the base. Make a graph, but also note which -# nodes represent line beginnings. - -my $tradition = Text::Tradition->new( - 'CSV' => $ARGV[0], - 'base' => $ARGV[1], - 'linear' => 0, - ); - - -print $tradition->collation->as_svg(); -print STDERR "DONE\n"; -__END__ -my $rows = 0; -my $matrix = []; -foreach my $pos ( $collation_graph->{'positions'}->all ) { - my @p_nodes = $collation_graph->{'positions'}->nodes_at_position( $pos ); - $rows = scalar @p_nodes - if $rows < scalar @p_nodes; - push( @$matrix, \@p_nodes ); -} -print "A table\n"; -foreach my $i ( 0 .. $rows-1 ) { - print "\t\n"; - foreach my $col( @$matrix ) { - my $str = ''; - if( $col->[$i] ) { - $str = $collation_graph->node( $col->[$i] )->label; - } - printf( "\t\t\n", $str ); - } - print "\t\n"; -} -print "
%s
\n"; diff --git a/script/svg_from_graphml.pl b/script/svg_from_graphml.pl deleted file mode 100644 index 2555fa7..0000000 --- a/script/svg_from_graphml.pl +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/perl - -use lib 'lib'; -use strict; -use warnings; -use Text::Tradition; - -# First: read the base. Make a graph, but also note which -# nodes represent line beginnings. -my $type = 'CollateX'; # either Self or CollateX - -open( GRAPH, $ARGV[0] ) or die "Could not read file $ARGV[0]"; -my @lines = ; -close GRAPH; -my $graphml_str = join( '', @lines ); - -my $tradition = Text::Tradition->new( - $type => $graphml_str, - 'linear' => 1, - ); - -print $tradition->collation->as_svg(); -print STDERR "DONE\n";