LDP/LDP/wt2db/wt2db

38 lines
620 B
Plaintext
Raw Normal View History

2002-02-02 04:47:19 +00:00
#!/usr/bin/perl
#
#Converts txt files into docbook.
#
2002-05-01 17:59:52 +00:00
$VERION = '0.2';
use Wt2Db;
$WT2DB = new Wt2Db;
2002-02-02 04:47:19 +00:00
my $txtfile = '';
my $dbfile = '';
my $verbose = 0;
my $error = 0;
2002-02-02 04:47:19 +00:00
# read in cmd-line arguments
#
while (1) {
if($ARGV[0] eq "-o" or $ARGV[0] eq "--output-to") {
shift(@ARGV);
$dbfile = $ARGV[0];
shift(@ARGV);
} elsif($ARGV[0] eq "-h" or $ARGV[0] eq "--help") {
$WT2DB->Usage();
2002-02-02 04:47:19 +00:00
} elsif($ARGV[0] eq "-v" or $ARGV[0] eq "--verbose") {
$verbose++;
shift(@ARGV);
} else {
$txtfile = $ARGV[0];
shift(@ARGV);
}
if ($ARGV[0] eq '') {
last;
}
}
$WT2DB->ProcessFile($txtfile, $dbfile, $verbose);