Convert usfm bibles into gemtext (python library/utility)
Spacing: add more punctuation characters to trim by
Zach DeCook 2021-04-22
parent 4740d41 · commit 726dd0d
-rwxr-xr-xusfm2gmi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/usfm2gmi.py b/usfm2gmi.py
index 7d29e43..d0a2167 100755
--- a/usfm2gmi.py
+++ b/usfm2gmi.py
@@ -100,12 +100,12 @@ def convert(line):
spl = word.split('|')
out += spl[0] + ' ' #superscript(spl[1][8:-1]) + ' '
# Remove those extra spaces that sneak in.
- elif word in [',', '.', ';', '”', ',”', '.”', '?”', ')', ':', '!', '?']:
+ elif word in [',', '.', ';', '”', ',”', '.”', '?”', ')', ':', '!', '?', '.’', '.’”', '?’”', '?’', ';”']:
if out[-1] == ' ':
out = out[:-1] + word + ' '
else:
out += word + ' '
- elif word in ['“', '(']:
+ elif word in ['“', '(', '‘']:
out += word
else:
if nd: