never mind the test db; allow non-Self files to be saved to db
Tara L Andrews [Fri, 20 Jan 2012 11:18:04 +0000 (12:18 +0100)]
script/save_to_db.pl
stemmaweb/db/traditions.db [deleted file]

index 936e6a9..0532ca2 100755 (executable)
@@ -11,11 +11,12 @@ use Text::Tradition::Directory;
 binmode( STDOUT, ':utf8' );
 binmode( STDERR, ':utf8' );
 
-my( $tfile, $sfile, $delete, $list, $dsn ) = 
-       ( undef, undef, undef, 0, 'dbi:SQLite:dbname=db/traditions.db' );
+my( $tfile, $format, $sfile, $delete, $list, $dsn ) = 
+       ( undef, 'Self', undef, undef, 0, 'dbi:SQLite:dbname=db/traditions.db' );
 
 GetOptions( 
        't|tradition=s' => \$tfile,
+       'f|format=s' => \$format,
        's|stemma=s' => \$sfile,
        'l|list' => \$list,
        'd|delete=s' => \$delete,
@@ -43,7 +44,7 @@ my( $tradition, $stemma );
 if( $tfile ) {
        print STDERR "Reading tradition from $tfile\n";
        $tradition = Text::Tradition->new( 
-               'input' => 'Self',
+               'input' => $format,
                'file' => $tfile,
                'linear' => 1,
                );
diff --git a/stemmaweb/db/traditions.db b/stemmaweb/db/traditions.db
deleted file mode 100644 (file)
index 1f06d53..0000000
Binary files a/stemmaweb/db/traditions.db and /dev/null differ