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

refdoc at crosswire.org refdoc at crosswire.org
Sat Jul 10 00:39:03 MST 2010


Author: refdoc
Date: 2010-07-10 00:39:02 -0700 (Sat, 10 Jul 2010)
New Revision: 283

Modified:
   trunk/modules/perlconverters/usfm2osis.pl
Log:
added support for \ie, \bk...\bk* and \restore


Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl	2010-06-28 23:00:44 UTC (rev 282)
+++ trunk/modules/perlconverters/usfm2osis.pl	2010-07-10 07:39:02 UTC (rev 283)
@@ -287,14 +287,19 @@
 	if ($line =~ /^\\rem\b/) {
 	    $line = "";
 	}
+	
+	# \restore Version control comments from translator, not a formal USFM marker but used by paratext (discard)
+	if ($line =~ /^\\restore\b/) {
+	    $line = "";
+	}
 
 	# \toc1 Table of Contents (discard)
 	if ($line =~ /^\\toc\d\b/) {
 	    $line = "";
 	}
 
-	### Introduction--Markers Supported: \imt#, \is#, \iot, \io#, \ip
-	#### Markers Not Yet Supported: \ipi, \im, \imi, \ipq, \imq, \ipr, \iq#, \ib, \ili, \ior...\ior*, \iex, \imte, \ie
+	### 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
 
 	# \it title (DCO: Commented out because \it is for italics not introduction titles in USFM 2.1)
 #	if ($line =~ /^\\it\b\s*(.*)/) {
@@ -365,7 +370,13 @@
 	if ($line =~ /^\\ip\b\s*(.*)/) {
 	    $line = "<p>$1<\/p>";
 	}
+	
+        # \ie introduction end (discard)
+	if ($line =~ /^\\ie\b/) {
+	    $line = "";
+	}
 
+
 	### Titles, Headings, and Labels (elsewhere?)--Markers Supported: \d, \ms#, \s#, \mt#, \r, \sp
 	#### Markers Not Yet Supported: \mte#, \mr, \sr, \rq...\rq*
 
@@ -816,12 +827,15 @@
 	$line =~ s/<reference osisRef="([^\.\"]+)\.(\d+)\.([^\"]+)">([^<]+)<\/reference>, <reference osisRef="(\d+)"/<reference osisRef="$1\.$2\.$3">$4<\/reference>, <reference osisRef="$1\.$2\.$5"/g; # Gen. 1:1, 3
 	$line =~ s/<reference osisRef="([^\"\.]+)\.(\d+)"/<reference osisRef="$1\.1\.$2"/g; # Jude 1
 
-	### Special Text and Character Styles--Markers Supported: \it...\it*, \nd...\nd*, \pn...\pn*, \tl...\tl*, \qt...\qt*, \add...\add*, \pb
-	#### Markers Not Yet Supported: Special Text: \bk...\bk*, \dc...\dc*, \k...\k*, \lit, \ord...\ord*, \sig...\sig*, \sls...\sls*, \wj...\wj*; Character Styling: \em...\em*, \bd...\bd*, \bdit...\bdit*, \no...\no*, \sc...\sc*; Spacing and Breaks: !$, //; Special Features: \fig...\fig*, \ndx...\ndx*, \pro...\pro*, \w...\w*, \wg...\wg*, \wh...\wh*
+	### Special Text and Character Styles--Markers Supported: \it...\it*, \nd...\nd*, \pn...\pn*, \tl...\tl*, \qt...\qt*, \add...\add*, \pb, \bk...\bk*
+	#### Markers Not Yet Supported: Special Text:  \dc...\dc*, \k...\k*, \lit, \ord...\ord*, \sig...\sig*, \sls...\sls*, \wj...\wj*; Character Styling: \em...\em*, \bd...\bd*, \bdit...\bdit*, \no...\no*, \sc...\sc*; Spacing and Breaks: !$, //; Special Features: \fig...\fig*, \ndx...\ndx*, \pro...\pro*, \w...\w*, \wg...\wg*, \wh...\wh*
 
 	# \it...\it*, italic text
 	$line =~ s/\\it\b\s*(.*?)\\it\*/<hi type=\"italic\">$1<\/hi>/g;
 
+	# \bk...\bk*, book name in text
+	$line =~ s/\\bk\b\s*(.*?)\\bk\*/<hi type=\"italic\">$1<\/hi>/g;
+
 	# \nd...\nd*, Divine Name
 	$line =~ s/\\nd\b\s*(.*?)\\nd\*/<divineName>$1<\/divineName>/g;
 




More information about the sword-cvs mailing list