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

chrislit at crosswire.org chrislit at crosswire.org
Fri Oct 30 17:53:27 MST 2009


Author: chrislit
Date: 2009-10-30 17:53:27 -0700 (Fri, 30 Oct 2009)
New Revision: 227

Modified:
   trunk/modules/perlconverters/gbf2osis.pl
   trunk/modules/perlconverters/imp2osis.pl
   trunk/modules/perlconverters/unb2osis.pl
   trunk/modules/perlconverters/usfm2osis.pl
   trunk/modules/perlconverters/zef2osis.pl
Log:
added uniform revision & date printing to usage statement


Modified: trunk/modules/perlconverters/gbf2osis.pl
===================================================================
--- trunk/modules/perlconverters/gbf2osis.pl	2009-10-29 00:12:03 UTC (rev 226)
+++ trunk/modules/perlconverters/gbf2osis.pl	2009-10-31 00:53:27 UTC (rev 227)
@@ -37,14 +37,19 @@
 
 #########################################################################
 
-$version = "1.5";
-$date = "2007-04-25";
+$version = "1.5.1";
 $osisVersion = "2.1.1";
 
+$date = '$Date$';
+$rev = '$Rev$';
+
+$date =~ s/^.+?(\d{4}-\d{2}-\d{2}).+/$1/;
+$rev =~ s/^.+?(\d+).+/$1/g;
+
 %OSISbook = ("Genesis" => "Gen", "Ge" => "Gen", "Gn" => "Gen", "Exodus" => "Exod", "Ex" => "Exod", "Leviticus" => "Lev", "Lev" => "Lev", "Lv" => "Lev", "Numbers" => "Num", "Nu" => "Num", "Deuteronomy" => "Deut", "De" => "Deut", "Dt" => "Deut", "Joshua" => "Josh", "Jos" => "Josh", "Judges" => "Judg", "Judg" => "Judg", "Jdg" => "Judg", "Ruth" => "Ruth", "Ru" => "Ruth", "1 Samuel" => "1Sam", "1 Sa" => "1Sam", "1Sa" => "1Sam", "2 Samuel" => "2Sam", "2 Sa" => "2Sam", "2Sa" => "2Sam", "1 Kings" => "1Kgs", "1 Ki" => "1Kgs", "1Ki" => "1Kgs", "2 Kings" => "2Kgs", "2 Ki" => "2Kgs", "2Ki" => "2Kgs", "1 Chronicles" => "1Chr", "1 Ch" => "1Chr", "1Ch" => "1Chr", "2 Chronicles" => "2Chr", "2 Ch" => "2Chr", "2Ch" => "2Chr", "Ezra" => "Ezra", "Ezr" => "Ezra", "Nehemiah" => "Neh", "Ne" => "Neh", "Esther" => "Esth", "Es" => "Esth", "Job" => "Job", "Psalms" => "Ps", "Psalm" => "Ps", "Ps" => "Ps", "Proverbs" => "Prov", "Pr" => "Prov", "Ecclesiastes" => "Eccl", "Ec" => "Eccl", "Song" => "Song", "SS" => "Song", "Isaiah" => "Isa", "Isa" => "Isa", "Jeremiah" => "Jer", "Je" => "Jer", "Lamentations" => "Lam", "La" => "Lam", "Ezekiel" => "Ezek", "Eze" => "Ezek", "Daniel" => "Dan", "Da" => "Dan", "Hosea" => "Hos", "Ho" => "Hos", "Joel" => "Joel", "Joe" => "Joel", "Amos" => "Amos", "Am" => "Amos", "Obadiah" => "Obad", "Ob" => "Obad", "Jonah" => "Jonah", "Jon" => "Jonah", "Micah" => "Mic", "Mi" => "Mic", "Nahum" => "Nah", "Na" => "Nah", "Habakkuk" => "Hab", "Hab" => "Hab", "Zephaniah" => "Zeph", "Zep" => "Zeph", "Haggai" => "Hag", "Hag" => "Hag", "Zechariah" => "Zech", "Zec" => "Zech", "Malachi" => "Mal", "Mal" => "Mal", "Tobit" => "Tob", "Tob" => "Tob", "Judith" => "Jdt", "Judi" => "Jdt", "Jdt" => "Jdt", "GrkEs" => "AddEsth", "GR" => "AddEsth", "Baruch" => "Bar", "Bar" => "Bar", "Letter" => "EpJer", "Let" => "EpJer", "DNT" => "AddDan", "AddDan" => "AddDan", "Matthew" => "Matt", "Mat" => "Matt", "Mt" => "Matt", "Mark" => "Mark", "Mar" => "Mark", "Mk" => "Mark", "Luke" => "Luke", "Lu" => "Luke", "Lk" => "Luke", "John" => "John", "Joh" => "John", "Acts" => "Acts", "Ac" => "Acts", "Romans" => "Rom", "Ro" => "Rom", "Rm" => "Rom", "1 Corinthians" => "1Cor", "1 Co" => "1Cor", "1Co" => "1Cor", "2 Corinthians" => "2Cor", "2 Co" => "2Cor", "2Co" => "2Cor", "Galatians" => "Gal", "Ga" => "Gal", "Ephesians" => "Eph", "Ep" => "Eph", "Philippians" => "Phil", "Phili" => "Phil", "Php" => "Phil", "Colossians" => "Col", "Col" => "Col", "1 Thessalonians" => "1Thess", "1 Th" => "1Thess", "1Th" => "1Thess", "2 Thessalonians" => "2Thess", "2 Th" => "2Thess", "2Th" => "2Thess", "1 Timothy" => "1Tim", "1 Ti" => "1Tim", "1Ti" => "1Tim", "2 Timothy" => "2Tim", "2 Ti" => "2Tim", "2Ti" => "2Tim", "Titus" => "Tit", "Tit" => "Tit", "Philemon" => "Phlm", "Phile" => "Phlm", "Phm" => "Phlm", "Hebrews" => "Heb", "Heb" => "Heb", "He" => "Heb", "James" => "Jas", "Ja" => "Jas", "1 Peter" => "1Pet", "1 Pe" => "1Pet", "1Pe" => "1Pet", "2 Peter" => "2Pet", "2 Pe" => "2Pet", "2Pe" => "2Pet", "1 John" => "1John", "1 Jo" => "1John", "1Jo" => "1John", "2 John" => "2John", "2 Jo" => "2John", "2Jo" => "2John", "3 John" => "3John", "3 Jo" => "3John", "3Jo" => "3John", "Jude" => "Jude", "Revelation" => "Rev", "Re" => "Rev");
 
 if (scalar(@ARGV) < 1) {
-    print "gbf2osis.pl -- GBF to OSIS $osisVersion converter version $version ($date)\nSyntax: gbf2osis.pl [web|hnv]\n";
+    print "gbf2osis.pl -- GBF to OSIS $osisVersion converter version $version\nRevision $rev ($date)\nSyntax: gbf2osis.pl [web|hnv]\n";
     exit (-1);
 }
 

Modified: trunk/modules/perlconverters/imp2osis.pl
===================================================================
--- trunk/modules/perlconverters/imp2osis.pl	2009-10-29 00:12:03 UTC (rev 226)
+++ trunk/modules/perlconverters/imp2osis.pl	2009-10-31 00:53:27 UTC (rev 227)
@@ -39,10 +39,15 @@
 
 #########################################################################
 
-$version = "2.0";
-$date = "2009-10-24";
+$version = "2.0.1";
 $osisVersion = "2.1.1";
 
+$date = '$Date$';
+$rev = '$Rev$';
+
+$date =~ s/^.+?(\d{4}-\d{2}-\d{2}).+/$1/;
+$rev =~ s/^.+?(\d+).+/$1/g;
+
 %OSISbook = (
 	"1 BARUCH" => "Bar",
 	"1 C" => "1Cor",
@@ -606,7 +611,7 @@
 
 
 if (scalar(@ARGV) < 2) {
-    print "imp2osis.pl -- IMP (Sword Import) format to OSIS $osisVersion converter version $version ($date)\nSyntax: imp2osis.pl <osisWork> <input filename> [-o OSIS-file] [-m]\n\nThe -m option will produce milestoned <verse\/> elements, which are more likely to produce valid OSIS from Bibles with OSIS markup internally.\n\nNo attempt is made to convert markup present in the verse entries themselves, so this tool is appropriate for converting Bibles that already contain OSIS markup or plaintext markup.\n\nThis tool is ONLY intended for VersKey-type Sword texts, namely Bibles and commentaries.\n";
+    print "imp2osis.pl -- IMP (Sword Import) format to OSIS $osisVersion converter version $version\nRevision $rev ($date)\nSyntax: imp2osis.pl <osisWork> <input filename> [-o OSIS-file] [-m]\n\nThe -m option will produce milestoned <verse\/> elements, which are more likely to produce valid OSIS from Bibles with OSIS markup internally.\n\nNo attempt is made to convert markup present in the verse entries themselves, so this tool is appropriate for converting Bibles that already contain OSIS markup or plaintext markup.\n\nThis tool is ONLY intended for VersKey-type Sword texts, namely Bibles and commentaries.\n";
     exit (-1);
 }
 

Modified: trunk/modules/perlconverters/unb2osis.pl
===================================================================
--- trunk/modules/perlconverters/unb2osis.pl	2009-10-29 00:12:03 UTC (rev 226)
+++ trunk/modules/perlconverters/unb2osis.pl	2009-10-31 00:53:27 UTC (rev 227)
@@ -39,10 +39,15 @@
 
 #########################################################################
 
-$version = "1.0";
-$date = "2007-04-20";
+$version = "1.0.1";
 $osisVersion = "2.1.1";
 
+$date = '$Date$';
+$rev = '$Rev$';
+
+$date =~ s/^.+?(\d{4}-\d{2}-\d{2}).+/$1/;
+$rev =~ s/^.+?(\d+).+/$1/g;
+
 @OSISbook = (
 #OT
  "Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg", "Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh", "Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek", "Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab", "Zeph", "Hag", "Zech", "Mal",
@@ -55,7 +60,7 @@
 );
 
 if (scalar(@ARGV) < 2) {
-    print "unb2osis.pl -- Unbound Bible format to OSIS $osisVersion converter version $version ($date)\nSyntax: unb2osis.pl <osisWork> <input filename> [-o OSIS-file]\n";
+    print "unb2osis.pl -- Unbound Bible format to OSIS $osisVersion converter version $version\nRevision $rev ($date)\nSyntax: unb2osis.pl <osisWork> <input filename> [-o OSIS-file]\n";
     exit (-1);
 }
 

Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl	2009-10-29 00:12:03 UTC (rev 226)
+++ trunk/modules/perlconverters/usfm2osis.pl	2009-10-31 00:53:27 UTC (rev 227)
@@ -42,9 +42,14 @@
 use utf8;
 
 # Stores the script version and date
-$version = "1.7";
+$version = "1.7.1";
+
 $date = '$Date$';
 $rev = '$Rev$';
+
+$date =~ s/^.+?(\d{4}-\d{2}-\d{2}).+/$1/;
+$rev =~ s/^.+?(\d+).+/$1/g;
+
 # Sets the version of OSIS used in the OSIS header
 $osisVersion = "2.1.1";
 # Stores the USFM Version
@@ -80,11 +85,6 @@
  "BLT" => "Bel", "ADE" => "AddEsth"
  );
 
-$date =~ /(\d{4}-\d{2}-\d{2})/;
-$rev .= "($1)";
-$rev =~ s/\$//g;
-$rev =~ s/Rev: //;
-
 # Generates a list of available encodings.
 use Encode;
 @encodingList = Encode->encodings(":all");
@@ -95,7 +95,7 @@
 
 # Syntax instructions
 if (scalar(@ARGV) < 2) {
-    print "\nusfm2osis.pl -- USFM $usfmVersion to OSIS $osisVersion converter version $version\nRevision $rev\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\nRevision $rev ($date)\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";

Modified: trunk/modules/perlconverters/zef2osis.pl
===================================================================
--- trunk/modules/perlconverters/zef2osis.pl	2009-10-29 00:12:03 UTC (rev 226)
+++ trunk/modules/perlconverters/zef2osis.pl	2009-10-31 00:53:27 UTC (rev 227)
@@ -39,10 +39,15 @@
 
 #########################################################################
 
-$version = "1.1";
-$date = "2008-06-12";
+$version = "1.1.1";
 $osisVersion = "2.1.1";
 
+$date = '$Date$';
+$rev = '$Rev$';
+
+$date =~ s/^.+?(\d{4}-\d{2}-\d{2}).+/$1/;
+$rev =~ s/^.+?(\d+).+/$1/g;
+
 @OSISbook = (
 #OT
  "Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg", "Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh", "Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek", "Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab", "Zeph", "Hag", "Zech", "Mal",
@@ -55,7 +60,7 @@
 );
 
 if (scalar(@ARGV) < 2) {
-    print "zef2osis.pl -- Zefania XML to OSIS $osisVersion converter version $version ($date)\nSyntax: zef2osis.pl <osisWork> <input filename> [-o OSIS-file]\n";
+    print "zef2osis.pl -- Zefania XML to OSIS $osisVersion converter version $version\nRevision $rev ($date)\nSyntax: zef2osis.pl <osisWork> <input filename> [-o OSIS-file]\n";
     exit (-1);
 }
 




More information about the sword-cvs mailing list