You can now specify configuration file as command-line option, and
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 2 Apr 2004 23:31:25 +0000 (23:31 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 2 Apr 2004 23:31:25 +0000 (23:31 +0000)
if you don't do that, it will use default one called all2xml.conf

git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@298 13eb9ef6-21d5-0310-b721-a9d68796d827

all2xml.pl

index 0ffee07..860560b 100755 (executable)
@@ -17,6 +17,7 @@ $|=1;
 
 my $config_file = $0;
 $config_file =~ s/\.pl$/.conf/;
+$config_file = $ARGV[0] if (-f $ARGV[0]);
 die "FATAL: can't find configuration file '$config_file'" if (! -e $config_file);
 
 my $config;
@@ -918,6 +919,10 @@ __END__
 
 all2xml.pl - read various file formats and dump XML for SWISH-E
 
+=head1 SYNOPSYS
+
+ $ all2xml.pl [test.conf]
+
 =head1 DESCRIPTION
 
 This command will read ISIS data file using OpenIsis perl module, MARC
@@ -926,6 +931,9 @@ create one XML file for usage with I<SWISH-E> indexer. Dispite it's name,
 this script B<isn't general xml generator> from isis files (isis allready
 has something like that). Output of this script is tailor-made for SWISH-E.
 
+If no configuration file is specified, it will use default one called
+C<all2xml.conf>.
+
 =head1 BUGS
 
 Documentation is really lacking. However, in true Open Source spirit, source