diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-02-25 14:58:42 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-02-25 14:58:42 -0500 |
| commit | 9cd73b7bf2af888dcba3a4a53caf00d0b4f71b58 (patch) | |
| tree | 411a7cba456ce64de2f7d17b7461529bc8c8f9ef /usfm2gmi.py | |
| parent | 5f5748475d1dc1789a457819b94d0c4c4e443cb7 (diff) | |
| download | usfm2gmi-9cd73b7bf2af888dcba3a4a53caf00d0b4f71b58.tar.gz | |
mt: rough implementation
Diffstat (limited to 'usfm2gmi.py')
| -rwxr-xr-x | usfm2gmi.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usfm2gmi.py b/usfm2gmi.py index 7cc2f24..2d27827 100755 --- a/usfm2gmi.py +++ b/usfm2gmi.py @@ -10,8 +10,13 @@ def convert(line): out = '' if len(split) == 0: return out - elif split[0] == '\\s': + elif split[0] in ['\\mt1','\\mt','\\ms']: + return '\n# ' + ' '.join(split[1:]) + # TODO: parse as word for title tags in title line + elif split[0] in ['\\mt2','\\s']: return '\n## ' + ' '.join(split[1:]) + elif split[0] in ['\\mt3']: + return '\n### ' + ' '.join(split[1:]) elif split[0] == '\\b': return '\n' elif split[0] == '\\rem': |
