diff options
Diffstat (limited to 'modules/geneve')
-rwxr-xr-x | modules/geneve/wb.pl | 25 |
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> |