[sword-svn] r291 - trunk/modules/perlconverters
refdoc at crosswire.org
refdoc at crosswire.org
Thu Aug 5 02:44:07 MST 2010
Author: refdoc
Date: 2010-08-05 02:44:07 -0700 (Thu, 05 Aug 2010)
New Revision: 291
Modified:
trunk/modules/perlconverters/xreffix.pl
Log:
More improvements. Seems to deal with most problems thrown at it now.
Modified: trunk/modules/perlconverters/xreffix.pl
===================================================================
--- trunk/modules/perlconverters/xreffix.pl 2010-08-04 11:39:51 UTC (rev 290)
+++ trunk/modules/perlconverters/xreffix.pl 2010-08-05 09:44:07 UTC (rev 291)
@@ -39,11 +39,6 @@
#########################################################################
sub vs2osis {
- my $context = $_[0];
- $context =~ s/([1-5]?[A-Z][a-z]+)\ .*/$1/;
-
- my $ref = $_[0];
- $ref =~ s/,/:/;
my $return = `vs2osisref "$_[0]" "$_[1]" $_[2]`;
$return =~ s/\n$//;
$return;
@@ -89,18 +84,18 @@
if (/xml:lang\=\"(.+?)\"/) {
$locale=$1;
- print "locale changed to".$locale."\n";
+ print "This document is in the locale of ".$locale."\n";
}
if (/<div\ type\=\"book\"\ osisID=\"(.+?)\">/) {
$c_book=$1;
- print "We are now in book: ".$c_book."\n";
+ print "\n"."Now working on ".$c_book."\n";
}
if (/<chapter\ sID\=\".*?\.([0-9]+)\"/) {
$c_chapter=$1;
- print $c_chapter."\n";
+ print ".";
}
- s/<reference>(.*)<\/reference>/&vs2osis($1,$context,$locale)/eg;
+ s/<reference>(.*?)<\/reference>/&vs2osis($1,$c_book.$c_chapter,$locale)/eg;
}
print (OUTF @data);
close OUTF;
More information about the sword-cvs
mailing list