summaryrefslogtreecommitdiffstats
path: root/modules/perlconverters/usfm2osis.pl
diff options
context:
space:
mode:
authorChris Little <chrislit@crosswire.org>2009-10-28 23:57:05 +0000
committerChris Little <chrislit@crosswire.org>2009-10-28 23:57:05 +0000
commit867b677bd16b0ae9e5106e9ea42cf8383b4eb7c4 (patch)
tree239aa77eb409cc6772f028b418511112032b387d /modules/perlconverters/usfm2osis.pl
parent30e335dac6c092ba9cf87141f9639d9cbf23f02a (diff)
downloadsword-tools-867b677bd16b0ae9e5106e9ea42cf8383b4eb7c4.tar.gz
cleaned up array references
added svn keywords attempt at storing svn keywords in a variable git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@223 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/perlconverters/usfm2osis.pl')
-rw-r--r--modules/perlconverters/usfm2osis.pl19
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl
index db9e444..3cc58ce 100644
--- a/modules/perlconverters/usfm2osis.pl
+++ b/modules/perlconverters/usfm2osis.pl
@@ -43,7 +43,8 @@ use utf8;
# 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 @@ $encodings =~ s/\, $//;
# 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 @@ if (scalar(@ARGV) < 2) {
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 @@ else {
}
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");