diff options
author | Peter von Kaehne <refdoc@gmx.net> | 2009-12-31 02:21:41 +0000 |
---|---|---|
committer | Peter von Kaehne <refdoc@gmx.net> | 2009-12-31 02:21:41 +0000 |
commit | e7ef23865b272b921f48a39be997cdb2bb24c975 (patch) | |
tree | b2a115b2180edb062dca05b28ddf10bcde2e6b70 /modules/geneve | |
parent | e1177aa64026c2b03cf189a2dfe7b9886a5abaa4 (diff) | |
download | sword-tools-e7ef23865b272b921f48a39be997cdb2bb24c975.tar.gz |
more work on getting osisref right. still failing
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@263 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/geneve')
-rwxr-xr-x | modules/geneve/wb.pl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/geneve/wb.pl b/modules/geneve/wb.pl index b255fe6..fd71f69 100755 --- a/modules/geneve/wb.pl +++ b/modules/geneve/wb.pl @@ -1,8 +1,14 @@ #!/usr/bin/perl sub vs2osisref { + + my $context = $_[0]; + $context =~ s/([12345]?[A-Z][a-z]+).*/$1/; - `vs2osisref $_[0] de` + my $ref = $_[0]; + $ref =~ s/([12345]?[A-Z][a-z]+)\ (.*)/$1:$2/; + `vs2osisref $ref $context de`; + chomp; } @@ -31,9 +37,9 @@ 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]+)?)?)+)(\ |\)|;)/<reference>$2:$3<\/reference>$^N/g; + s/(([12345]?[A-Z][a-z]+)(;?\ [0-9]+(,[0-9]+(\-[0-9]+)?)?)+)(\ |\)|;)/<r>$1<\/r>$^N/g; - s/<reference>(.*?)<\/reference>/vs2osisref($1)/eg; +# s/<r>(.*?)<\/r>/&vs2osisref($1)/eg; # clean up s/<c.*?>//g; |