diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/perlconverters/usfm2osis.pl | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl index e8ecc7d..86f328c 100644 --- a/modules/perlconverters/usfm2osis.pl +++ b/modules/perlconverters/usfm2osis.pl @@ -75,7 +75,7 @@ $usfmVersion = "2.2"; # The USFM reference document can be found at http://www.u "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 @@ foreach $file (@files) { $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 @@ foreach $file (@files) { } # \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,12 +432,25 @@ foreach $file (@files) { } } } + # \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 |