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