X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=make_tradition.pl;h=41c575f276c708b1dbccf8e643623070938f6dee;hb=73652d60eefa738f053528e89cde2a6acf2b0633;hp=22b50df8c235e19b81b9146f429b74040937a781;hpb=94c00c71ffabc3dc155d237364e76af4385dcb96;p=scpubgit%2Fstemmatology.git diff --git a/make_tradition.pl b/make_tradition.pl index 22b50df..41c575f 100755 --- a/make_tradition.pl +++ b/make_tradition.pl @@ -45,20 +45,12 @@ if( $informat eq 'KUL' && !$inbase ) { help( "$informat input needs a base text" ); } -# CSV parsing requires a filename; XML parsing requires a string. my $input = $ARGV[0]; -unless( $informat eq 'KUL' || $informat eq 'CSV' ) { - my @lines; - open( INFILE, "$input" ) or die "Could not read $input"; - binmode INFILE, ':utf8'; - @lines = ; - close INFILE; - $input = join( '', @lines ); -} # First: read the base. Make a graph, but also note which # nodes represent line beginnings. -my %args = ( $informat => $input, +my %args = ( 'input' => $informat, + 'file' => $input, 'linear' => $linear ); $args{'base'} = $inbase if $inbase; my $tradition = Text::Tradition->new( %args );