[sword-svn] r223 - trunk/modules/perlconverters

chrislit at crosswire.org chrislit at crosswire.org
Wed Oct 28 16:57:05 MST 2009


Author: chrislit
Date: 2009-10-28 16:57:05 -0700 (Wed, 28 Oct 2009)
New Revision: 223

Modified:
   trunk/modules/perlconverters/usfm2osis.pl
Log:
cleaned up array references
added svn keywords
attempt at storing svn keywords in a variable


Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl	2009-10-28 23:25:23 UTC (rev 222)
+++ trunk/modules/perlconverters/usfm2osis.pl	2009-10-28 23:57:05 UTC (rev 223)
@@ -43,7 +43,8 @@
 
 # Stores the script version and date
 $version = "1.7";
-$date = "2009-10-26";
+$date = "\$Date:\$";
+$rev = "\$Rev:\$";
 # Sets the version of OSIS used in the OSIS header
 $osisVersion = "2.1.1";
 # Stores the USFM Version
@@ -89,7 +90,7 @@
 
 # Syntax instructions
 if (scalar(@ARGV) < 2) {
-    print "\nusfm2osis.pl -- USFM $usfmVersion to OSIS $osisVersion converter version $version ($date)\n\nSyntax: usfm2osis.pl <osisWork> [-o OSIS-file] [-e USFM encoding] <USFM filenames|wildcard>\n";
+    print "\nusfm2osis.pl -- USFM $usfmVersion to OSIS $osisVersion converter version $version-$rev ($date)\n\nSyntax: usfm2osis.pl <osisWork> [-o OSIS-file] [-e USFM encoding] <USFM filenames|wildcard>\n";
     print "- Arguments in braces < > are required. Arguments in brackets [ ] are optional.\n";
     print "- The osisWork is a short name with no spaces which will identify your module.\n";
     print "- If no -o option is specified for the output filename, the default output file is: \n\tosisWork.osis.xml.\n";
@@ -100,21 +101,21 @@
     exit (-1);
 }
 
-$osisWork = $ARGV[0];
+$osisWork = @ARGV[0];
 
 $nextarg = 1;
 
-if ($ARGV[$nextarg] eq "-o") {
-    $outputFilename = "$ARGV[$nextarg+1]";
+if (@ARGV[$nextarg] eq "-o") {
+    $outputFilename = "@ARGV[$nextarg+1]";
     $nextarg += 2;
 }
 else {
     $outputFilename = "$osisWork.osis.xml";
 }
-open (OUTF, , ">:utf8", "$outputFilename") or die "Could not open file $ARGV[2] for writing.";
+open (OUTF, , ">:utf8", "$outputFilename") or die "Could not open file @ARGV[2] for writing.";
 
-if ($ARGV[$nextarg] eq "-e") {
-    $inputEncoding = "$ARGV[$nextarg+1]";
+if (@ARGV[$nextarg] eq "-e") {
+    $inputEncoding = "@ARGV[$nextarg+1]";
     $nextarg += 2;
 }
 else {
@@ -134,7 +135,7 @@
 }
 
 for (; $nextarg < scalar(@ARGV); $nextarg++) {
-    push(@files, $ARGV[$nextarg]);
+    push(@files, @ARGV[$nextarg]);
 }
 
 push (@outdata, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osis xmlns=\"http://www.bibletechnologies.net/2003/OSIS/namespace\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.bibletechnologies.net/2003/OSIS/namespace http://www.bibletechnologies.net/osisCore.$osisVersion.xsd\">\n<osisText osisRefWork=\"Bible\" xml:lang=\"en\" osisIDWork=\"$osisWork\">\n<header>\n<work osisWork=\"$osisWork\"\/>\n<\/header>\n");


Property changes on: trunk/modules/perlconverters/usfm2osis.pl
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Rev




More information about the sword-cvs mailing list