summaryrefslogtreecommitdiffstats
path: root/modules/geneve
diff options
context:
space:
mode:
authorPeter von Kaehne <refdoc@gmx.net>2009-12-31 09:35:52 +0000
committerPeter von Kaehne <refdoc@gmx.net>2009-12-31 09:35:52 +0000
commit6766429fb8fab7b1db7bd3182072c38bc9d88df8 (patch)
treee1afe933e97ae9b57ae36e441581964a0df18bd4 /modules/geneve
parente7ef23865b272b921f48a39be997cdb2bb24c975 (diff)
downloadsword-tools-6766429fb8fab7b1db7bd3182072c38bc9d88df8.tar.gz
getting closer
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@264 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/geneve')
-rwxr-xr-xmodules/geneve/wb.pl25
1 files changed, 16 insertions, 9 deletions
diff --git a/modules/geneve/wb.pl b/modules/geneve/wb.pl
index fd71f69..66013d6 100755
--- a/modules/geneve/wb.pl
+++ b/modules/geneve/wb.pl
@@ -3,12 +3,17 @@
sub vs2osisref {
my $context = $_[0];
- $context =~ s/([12345]?[A-Z][a-z]+).*/$1/;
+ $context =~ s/([12345]?[A-Z][a-z]+)\ .*/$1/;
my $ref = $_[0];
- $ref =~ s/([12345]?[A-Z][a-z]+)\ (.*)/$1:$2/;
- `vs2osisref $ref $context de`;
- chomp;
+
+
+ $ref =~ s/,/:/;
+
+# print ("I received", $_[0]," split into ref:", $ref, " and context :",$context."\n");
+
+ my $return = `vs2osisref "$ref" $context de`;
+ chop($return)
}
@@ -37,18 +42,20 @@ foreach (@files){
s/<c\ style=\"Kursiv ZF\"\ >(.*?)<\/c>/<hi rend=\"italic\">$1<\/hi>/g;
# references
- s/(([12345]?[A-Z][a-z]+)(;?\ [0-9]+(,[0-9]+(\-[0-9]+)?)?)+)(\ |\)|;)/<r>$1<\/r>$^N/g;
+ s/(([12345]?[A-Z][a-z]+)(;?\ [0-9]+(,[0-9]+(\-[0-9]+)?)?)+)(\ |\)|;)/ &vs2osisref("$1").$^N/eg;
-# s/<r>(.*?)<\/r>/&vs2osisref($1)/eg;
+ # s/<r>(.*?)<\/r>/&vs2osisref($1)/eg;
# clean up
s/<c.*?>//g;
s/<\/c\s*>//g;
}
- print (USFM "<?xml\ version=\"1.0\"\ encoding=\"utf-8\"?>\n<TEI\ xmlns=\"http://www.crosswire.org/2008/TEIOSIS/namespace\"\nxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
- xsi:schemaLocation=\"http://www.crosswire.org/2008/TEIOSIS/namespace
- http://www.crosswire.org/OSIS/teiP5osis.1.4.xsd\">
+ print (USFM "<?xml\ version=\"1.0\"\ encoding=\"utf-8\"?>\n
+ <TEI\ xmlns=\"http://www.crosswire.org/2008/TEIOSIS/namespace\"\n
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
+ xsi:schemaLocation=\"http://www.crosswire.org/2008/TEIOSIS/namespace
+ http://www.crosswire.org/OSIS/teiP5osis.1.4.xsd\">
<teiHeader>
<fileDesc>