diff options
author | Peter von Kaehne <refdoc@gmx.net> | 2015-07-11 07:17:29 +0000 |
---|---|---|
committer | Peter von Kaehne <refdoc@gmx.net> | 2015-07-11 07:17:29 +0000 |
commit | cb55ce501a49ee73030675f880195abc0128c7c4 (patch) | |
tree | ffb34d630c709b00faa79747b301a74813225089 /modules/conf | |
parent | 8b2e0136e5a4a9bdb32027d46aec0699c76924bb (diff) | |
download | sword-tools-cb55ce501a49ee73030675f880195abc0128c7c4.tar.gz |
improved and corrected confmaker utility (No recognises NoParagraphs, corrections to driver choice
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@493 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/conf')
-rwxr-xr-x | modules/conf/confmaker.pl | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/modules/conf/confmaker.pl b/modules/conf/confmaker.pl index 55d0478..e73315a 100755 --- a/modules/conf/confmaker.pl +++ b/modules/conf/confmaker.pl @@ -88,7 +88,7 @@ my @word_features = ('lemma', 'gloss', 'morph',); 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_filters = ( 'title' => "OSISHeadings", my %doc_feature = ( 'lemma' => 'StrongsNumbers', 'figure' => 'Images', + 'p' => 'NoParagraphs', + ); my %doc_has_feature; @@ -108,7 +110,7 @@ foreach (@doc_features) { if (@elements>0) { $doc_has_feature{$_}=true } ; } -@elements = $doc->getElementsByTagName('w'); +my @elements = $doc->getElementsByTagName('w'); foreach my $f(@word_features) { @@ -121,16 +123,20 @@ foreach my $f(@word_features) { } - +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=zText\n"} +else {print "ModDrv=zUnknown\n"} -if ($doc_type =~ m/Bible/) { print "ModDrv=rawText\n"} -else {print "ModDrv=rawUnknown\n"} +print "CompressType=ZIP\n"; +print "BlockType=BOOK\n"; print "Lang=".$doc_lang."\n"; @@ -154,7 +160,9 @@ foreach (@word_features) { print "Feature=".$doc_feature{$_}."\n" } } - +if ($doc_has_feature{'p'}) { + print "Feature=".$doc_feature{'p'}."\n" + } |