[sword-svn] r193 - trunk/versification

chrislit at crosswire.org chrislit at crosswire.org
Thu Apr 23 03:05:08 MST 2009


Author: chrislit
Date: 2009-04-23 03:05:08 -0700 (Thu, 23 Apr 2009)
New Revision: 193

Modified:
   trunk/versification/makeabbrevs.pl
Log:
added ability to specify breaking after a particular book (for the moment, Rev)


Modified: trunk/versification/makeabbrevs.pl
===================================================================
--- trunk/versification/makeabbrevs.pl	2009-04-23 09:45:40 UTC (rev 192)
+++ trunk/versification/makeabbrevs.pl	2009-04-23 10:05:08 UTC (rev 193)
@@ -1,5 +1,7 @@
 #!/usr/bin/perl
 
+$finalBook = "Rev"; # quit reading canon files after we reach this book (an OSIS id)-- this is a temporary measure for 1.6.0, since we don't support any apocrypha yet anyway
+
 # @canons will contain this list of files, these are in a basic XML format.
 # Each file lists osisIDs along with the English names associated with the
 # osisID. These aren't exhaustive, and may or may not overlap (but hopefully
@@ -16,6 +18,10 @@
 );
 
 @abbrevsQueue = (); 
+
+if ($finalBook eq "") {
+    $finalBook = "\#PARSE ALL BOOKS\#";
+}
  
 foreach $mapfile (@canons) {
     open MAP, "$mapfile";
@@ -26,6 +32,9 @@
 	$line =~ s/\&/\&/g;
 
 	if ($line =~ /<id>(.+?)<\/id>/) {
+	    if ($id eq $finalBook) {
+		last;
+	    }
 	    $id = $1;
 	    $osis{lc($id)} = $id;
 	    push @abbrevsQueue, uc($id);




More information about the sword-cvs mailing list