[sword-svn] r263 - trunk/modules/geneve

refdoc at crosswire.org refdoc at crosswire.org
Wed Dec 30 19:21:41 MST 2009


Author: refdoc
Date: 2009-12-30 19:21:41 -0700 (Wed, 30 Dec 2009)
New Revision: 263

Modified:
   trunk/modules/geneve/wb.pl
Log:
more work on getting osisref right. still failing


Modified: trunk/modules/geneve/wb.pl
===================================================================
--- trunk/modules/geneve/wb.pl	2009-12-31 01:28:58 UTC (rev 262)
+++ trunk/modules/geneve/wb.pl	2009-12-31 02:21:41 UTC (rev 263)
@@ -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 @@
                 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;




More information about the sword-cvs mailing list