[sword-svn] r493 - trunk/modules/conf

refdoc at crosswire.org refdoc at crosswire.org
Sat Jul 11 00:17:30 MST 2015


Author: refdoc
Date: 2015-07-11 00:17:29 -0700 (Sat, 11 Jul 2015)
New Revision: 493

Modified:
   trunk/modules/conf/confmaker.pl
Log:
improved and corrected confmaker utility (No recognises NoParagraphs, corrections to driver choice


Modified: trunk/modules/conf/confmaker.pl
===================================================================
--- trunk/modules/conf/confmaker.pl	2015-05-21 11:54:55 UTC (rev 492)
+++ trunk/modules/conf/confmaker.pl	2015-07-11 07:17:29 UTC (rev 493)
@@ -88,7 +88,7 @@
 my %doc_filters = ( 'title' => "OSISHeadings",
              'note'  => "OSISFootnotes",
              'reference' => "OSISScripRef",
-             'gloss' => "OSISRuby",
+             'gloss' => "OSISGlosses",
              'lemma' => "OSISStrongs",
              'morph' => "OSISMorph",
              'q'  => "OSISRedLetterWords",
@@ -97,6 +97,8 @@
             
 my %doc_feature = ( 'lemma' => 'StrongsNumbers',
                     'figure' => 'Images',
+                     'p'  => 'NoParagraphs',
+
                   );
             
 my %doc_has_feature;
@@ -108,7 +110,7 @@
    if (@elements>0) { $doc_has_feature{$_}=true } ;
    }
 
- at elements = $doc->getElementsByTagName('w');
+my @elements = $doc->getElementsByTagName('w');
 
 foreach my $f(@word_features) {
 
@@ -121,17 +123,21 @@
  
 }   
 
-
+my @paragraphs = $doc->getElementsByTagName('p');
+if (@paragraphs==0) {$doc_has_feature{'p'}=true};
    
 # Assemble and print out
 
 print "[".$doc_name."]\n";
-print "DataPath=./modules/texts/rawtext/".$doc_name."\n";
-print "Description=This is the ".$doc_name." Bible in ".I18N::LangTags::List::name($doc_lang)." language\n";
+print "DataPath=./modules/texts/ztext/".$doc_name."\n";
+print "Description=".$doc_name." Bible in ".I18N::LangTags::List::name($doc_lang)."\n";
 
-if ($doc_type =~ m/Bible/) { print  "ModDrv=rawText\n"}
-else {print  "ModDrv=rawUnknown\n"}
+if ($doc_type =~ m/Bible/) { print  "ModDrv=zText\n"}
+else {print  "ModDrv=zUnknown\n"}
 
+print "CompressType=ZIP\n";
+print "BlockType=BOOK\n";
+
 print  "Lang=".$doc_lang."\n";
 
 foreach (@doc_features) {
@@ -154,11 +160,13 @@
       print  "Feature=".$doc_feature{$_}."\n"
       }
    }   
+if ($doc_has_feature{'p'}) {
+   print "Feature=".$doc_feature{'p'}."\n"
+   }
 
 
 
 
-
 print  "DistributionLicense=copyrighted. Do not distribute\n";
 print  "About=This is the ".$doc_name." Bible in ".I18N::LangTags::List::name($doc_lang)." language\n";
 print  "Encoding=UTF-8\n";




More information about the sword-cvs mailing list