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

domcox at crosswire.org domcox at crosswire.org
Mon May 5 12:27:38 EDT 2025


Author: domcox
Date: 2025-05-05 12:27:38 -0400 (Mon, 05 May 2025)
New Revision: 566

Modified:
   trunk/modules/conf/confclean.sh
   trunk/modules/conf/confmaker.py
Log:
confmaker.py: fix undetected Paragraphs in minestoned Chapters

Modified: trunk/modules/conf/confclean.sh
===================================================================
--- trunk/modules/conf/confclean.sh	2024-05-17 14:17:21 UTC (rev 565)
+++ trunk/modules/conf/confclean.sh	2025-05-05 16:27:38 UTC (rev 566)
@@ -2,7 +2,7 @@
 
 sed -i.bak '
 /^\[/d
-/^DataPath=/d 
+/^DataPath=/d
 /^Scope=/d
 /^ModDrv=/d
 /^BlockType=/d
@@ -10,13 +10,27 @@
 /^SourceType=/d
 /^Encoding=/d
 /^Versification=/d
-/^GlobalOptionFilter=/d
+/^GlobalOptionFilter=OSISFootnotes/d
+/^GlobalOptionFilter=OSISHeadings/d
+/^GlobalOptionFilter=OSISScripref/d
+/^GlobalOptionFilter=OSISRedLetterWords/d
+/^GlobalOptionFilter=OSISVariants/d
+/^GlobalOptionFilter=OSISMorphSegmentation/d
+/^GlobalOptionFilter=OSISLemma/d
+/^GlobalOptionFilter=OSISStrongs/d
+/^GlobalOptionFilter=OSISGlosses/d
+/^GlobalOptionFilter=OSISMorph/d
+/^GlobalOptionFilter=OSISEnum/d
+/^GlobalOptionFilter=OSISXlit/d
 /^Feature=/d
 /^MinimumVersion=/d
 /^SwordVersionDate=/d
+/^OSISVersion=/d
 /^Version=/d
 /^InstallSize=/d
 /^Lang=/d
 /^LCSH/d
+/^#/d
+/^$/d
 
-' "$@"
\ No newline at end of file
+' "$@"

Modified: trunk/modules/conf/confmaker.py
===================================================================
--- trunk/modules/conf/confmaker.py	2024-05-17 14:17:21 UTC (rev 565)
+++ trunk/modules/conf/confmaker.py	2025-05-05 16:27:38 UTC (rev 566)
@@ -300,6 +300,11 @@
                Chapter = True
           if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}chapter' and event == "end":
                Chapter = False
+               # Milestoned structure
+               if 'sID' in node.keys():
+                    Chapter = True
+               if 'eID' in node.keys():
+                    Chapter = False
 
           # GlobalOptionFilters
           if not Header:
@@ -313,12 +318,18 @@
                          OSISHeadings = True
                # Scripref
                if not OSISScripref:
-                    if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}reference':
-                         OSISScripref = True
+#                    if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}reference':
+#                         OSISScripref = True
+                    if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}note':
+                         if 'type' in node.keys():
+                              if 'crossReference' in node.get('type'):
+                                   OSISScripref = True
                # RedLetterWords
                if not OSISRedLetterWords:
                     if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}q':
-                         OSISRedLetterWords = True
+                         if node.get('who') != None:
+                              if 'Jesus' in node.get('who'):
+                                   OSISRedLetterWords = True
                # Variants
                if not OSISVariants:
                     if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}seg':
@@ -334,8 +345,9 @@
                # Lemma
                if not OSISLemma:
                     if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}w':
-                         if node.get('lemma') != None:
-                              OSISLemma = True
+                         if 'lemma' in node.keys():
+                              if 'strong' not in node.get('lemma'):
+                                   OSISLemma = True
                # Strongs
                if not OSISStrongs:
                     if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}w':
@@ -367,7 +379,7 @@
                if not Images:
                     if node.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}figure':
                          Images = True
-               # Search only inside Chapters
+               # Search for paragraphs inside Chapters
                if Chapter:
                     # NoParagraphs
                     if NoParagraphs:
@@ -461,7 +473,7 @@
           Elements.append('GlobalOptionFilter=UTF8Cantillation')
      # Greek Accents
      if is_diacritic(args['osis'], Lang, 'Greek Accents'):
-          Elements.append('GlobalOptionFilter=UTF8GreekAccents ')
+          Elements.append('GlobalOptionFilter=UTF8GreekAccents')
      # Set Features
      if OSISStrongs:
           Elements.append('Feature=StrongsNumbers')



More information about the sword-cvs mailing list