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

refdoc at crosswire.org refdoc at crosswire.org
Fri Jul 13 23:46:03 MST 2012


Author: refdoc
Date: 2012-07-13 23:46:03 -0700 (Fri, 13 Jul 2012)
New Revision: 359

Modified:
   trunk/modules/perlconverters/usfm2osis.pl
Log:
added spport for \ib, \ior..\ior* and \io (without level no)


Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl	2012-07-12 10:38:03 UTC (rev 358)
+++ trunk/modules/perlconverters/usfm2osis.pl	2012-07-14 06:46:03 UTC (rev 359)
@@ -75,7 +75,7 @@
  "PHM" => "Phlm", "HEB" => "Heb", "JAS" => "Jas", "1PE" => "1Pet",
  "2PE" => "2Pet", "1JN" => "1John", "2JN" => "2John", "3JN" => "3John",
  "JUD" => "Jude", "REV" => "Rev", "TOB" => "Tob", "JDT" => "Jdt",
- "ESG" => "Esth", "WIS" => "Wis", "SIR" => "Sir", "BAR" => "Bar",
+ "ESG" => "EsthGr", "WIS" => "Wis", "SIR" => "Sir", "BAR" => "Bar",
  "LJE" => "EpJer", "S3Y" => "PrAzar", "SUS" => "Sus", "BEL" => "Bel",
  "1MA" => "1Macc", "2MA" => "2Macc", "3MA" => "3Macc", "4MA" => "4Macc",
  "1ES" => "1Esd", "2ES" => "2Esd", "MAN" => "PrMan",
@@ -322,8 +322,8 @@
 	    $line = "";
 	}
 
-	### Introduction--Markers Supported: \imt#, \is#, \iot, \io#, \ip \ie
-	#### Markers Not Yet Supported: \ipi, \im, \imi, \ipq, \imq, \ipr, \iq#, \ib, \ili, \ior...\ior*, \iex, \imte
+	### Introduction--Markers Supported: \imt#, \is#, \iot, \io#, \ip, \ie, \ib, \ior..\ior*
+	#### Markers Not Yet Supported: \ipi, \im, \imi, \ipq, \imq, \ipr, \iq#, \ili, \iex, \imte
 
 	# \imt major title
 	if ($line =~ /^\\imt\b\s*(.+)/) {
@@ -348,6 +348,10 @@
 	}
 
 	# \io\d+ introduction outline item
+	if ($line =~ /^\\io(\b\s*.*)/) {
+	    $line = "\\io1$1";
+	    }
+	
 	if ($line =~ /^\\io(\d+)\b\s*(.*)/) {
 	    if ($ollevel == $1) {
 		$line = "<item>$2<\/item>";
@@ -428,13 +432,26 @@
 		}
 	    }
 	}
+	# \ib introduction blank line
 	
+	if ($line =~ /^\\ib$/) {
+	    $line = "<lb/>";
+	}
+
+	# \ior..\ior* introduction reference
+	# These ranges are usually massive. I quite likely would prefer to wipe the tag and leave the references as plan text
+	# $line =~ s/\\ior( .*?)\\ior\*/$1/g;
+	
+	$line =~ s/\\ior( .*?)\\ior\*/<reference>$1<\/reference>/g;
+	
+	
         # \ie introduction end (discard)
 	if ($line =~ /^\\ie\b/) {
 	    $line = "";
 	}
+	
+	
 
-
 	### Titles, Headings, and Labels (elsewhere?)--Markers Supported: \d, \ms#, \s#, \mt#, \r, \sp, \rq..\rq*
 	#### Markers Not Yet Supported: \mte#, \mr, \sr 
 




More information about the sword-cvs mailing list