about summary refs log tree commit diff
path: root/usfm2gmi.py
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-03-24 00:29:17 -0400
committerZach DeCook <zachdecook@librem.one>2021-03-24 00:29:17 -0400
commit64a89bf77bd118a6e5a676e3a32e8061c2256ac1 (patch)
tree56d295f86b886fab9517ab5b53d83c3fb66301ea /usfm2gmi.py
parentb6fcb5b2c9eb08393cee2102c6ff7106754a2a43 (diff)
downloadusfm2gmi-64a89bf77bd118a6e5a676e3a32e8061c2256ac1.tar.gz
Strongs definitions: ignore them
Diffstat (limited to 'usfm2gmi.py')
-rwxr-xr-xusfm2gmi.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/usfm2gmi.py b/usfm2gmi.py
index fe188e7..fb25131 100755
--- a/usfm2gmi.py
+++ b/usfm2gmi.py
@@ -24,7 +24,7 @@ def smallcaps(word):
 def convert(line):
   """Convert a string to a list of tuples, each a token"""
   # TODO: preserve the lack of whitespace before a backslash.
-  split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').split()
+  split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('|strong',' |strong').split()
   out = ''
   nd = False
   if len(split) == 0:
@@ -83,6 +83,10 @@ def convert(line):
     # TODO: support Endnotes (\fe and \fe*)
     elif word in ['\\ft']:
       continue # TODO: fancy formatting of more types
+    elif word == '\\w':
+      continue
+    elif '|strong' in word:
+      continue
     else:
      if nd:
       out += smallcaps(word) + ' '