Add Email::Template for post-registratin email sending
[scpubgit/stemmatology.git] / script / svg_from_graphml.pl
1 #!/usr/bin/perl
2
3 use lib 'lib';
4 use strict;
5 use warnings;
6 use Text::Tradition;
7
8 # First: read the base. Make a graph, but also note which
9 # nodes represent line beginnings.
10 my $type = 'CollateX'; # either Self or CollateX
11
12 open( GRAPH, $ARGV[0] ) or die "Could not read file $ARGV[0]";
13 my @lines = <GRAPH>;
14 close GRAPH;
15 my $graphml_str = join( '', @lines );
16
17 my $tradition = Text::Tradition->new(
18     $type => $graphml_str,
19     'linear' => 1,
20     );
21
22 print $tradition->collation->as_svg();
23 print STDERR "DONE\n";