summaryrefslogtreecommitdiffstats
path: root/modules/perlconverters
diff options
context:
space:
mode:
authorPeter von Kaehne <refdoc@gmx.net>2010-07-10 07:39:02 +0000
committerPeter von Kaehne <refdoc@gmx.net>2010-07-10 07:39:02 +0000
commit5580692d2a49ab30e56a8d7d62a1edfc4a998fc1 (patch)
tree9cbfc776be1890e8529eb6d83cc3f66a0620226d /modules/perlconverters
parentfc992d38b46445e76b0151b1aa939e2359e355d6 (diff)
downloadsword-tools-5580692d2a49ab30e56a8d7d62a1edfc4a998fc1.tar.gz
added support for \ie, \bk...\bk* and \restore
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@283 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/perlconverters')
-rw-r--r--modules/perlconverters/usfm2osis.pl22
1 files changed, 18 insertions, 4 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl
index 54b1ecb..83d7477 100644
--- a/modules/perlconverters/usfm2osis.pl
+++ b/modules/perlconverters/usfm2osis.pl
@@ -287,14 +287,19 @@ foreach $file (@files) {
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,6 +370,12 @@ foreach $file (@files) {
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 @@ foreach $file (@files) {
$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;