diff options
author | Chris Little <chrislit@crosswire.org> | 2012-01-02 01:13:43 +0000 |
---|---|---|
committer | Chris Little <chrislit@crosswire.org> | 2012-01-02 01:13:43 +0000 |
commit | 501c3313181232ccb04511ada76af628970495e0 (patch) | |
tree | 0eb52808ecccd9fc6bc4036bc6187b575b8c2a2e /modules/perlconverters/usfm2osis.pl | |
parent | c6488c8c55c9bd9f28b834806d1e20d532672ede (diff) | |
download | sword-tools-501c3313181232ccb04511ada76af628970495e0.tar.gz |
added support for \wj (Words of Jesus) and enumerated \ms# (Major Section) tags
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@340 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/perlconverters/usfm2osis.pl')
-rw-r--r-- | modules/perlconverters/usfm2osis.pl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl index 279f2f0..e08667b 100644 --- a/modules/perlconverters/usfm2osis.pl +++ b/modules/perlconverters/usfm2osis.pl @@ -4,7 +4,7 @@ ## Licensed under the standard BSD license: -# Copyright (c) 2002-2011 CrossWire Bible Society <http://www.crosswire.org/> +# Copyright (c) 2002-2012 CrossWire Bible Society <http://www.crosswire.org/> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -425,12 +425,12 @@ foreach $file (@files) { #### Markers Not Yet Supported: \mte#, \mr, \sr # \ms majorSection - if ($line =~ /^\\ms\b\s*(.+)/) { + if ($line =~ /^\\ms\d?\b\s*(.+)/) { push (@outdata, closeTag("<\/p>")); push (@outdata, closeTag("<\/div type=\"majorSection\">")); push (@outdata, "<div type=\"majorSection\">\n"); openTag("<\/div type=\"majorSection\">"); - $line =~ s/\\ms\b\s*(.+)/<title>$1<\/title>/; + $line =~ s/\\ms\d?\b\s*(.+)/<title>$1<\/title>/; } # \d canonical title if ($line =~ /^\\d\b\s*(.+)?(\\d\*)?/) { @@ -890,8 +890,8 @@ 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, \bk...\bk*, \sc..\sc*, \bd...\bd* - #### Markers Not Yet Supported: Special Text: \k...\k*, \lit, \ord...\ord*, \sig...\sig*, \wj...\wj*; Character Styling: \em...\em*, \bdit...\bdit*, \no...\no*; 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*, \sc..\sc*, \bd...\bd*, \wj...\wj* + #### Markers Not Yet Supported: Special Text: \k...\k*, \lit, \ord...\ord*, \sig...\sig*,; Character Styling: \em...\em*, \bdit...\bdit*, \no...\no*; Spacing and Breaks: !$, //; Special Features: \fig...\fig*, \ndx...\ndx*, \pro...\pro*, \w...\w*, \wg...\wg*, \wh...\wh* # \dc...\dc*, inserted deuterocanonical text $line =~ s/\\dc\b\s*(.*?)\\dc\*/<transChange type=\"added\" editions=\"dc\">$1<\/transChange>/g; @@ -923,6 +923,9 @@ foreach $file (@files) { # \add...\add*, text added for translation purposes $line =~ s/\\add\b\s*(.*?)\\add\*/<transChange type=\"added\">$1<\/transChange>/g; + # \wj...\wj*, Words of Jesus + $line =~ s/\\wj\b\s*(.*?)\\wj\*/<q who="Jesus" marker="">$1<\/q>/g; + # \pb, page break $line =~ s/\\pb\b/<milestone type=\"pb\"\/>/g; |