linkture 4.0.0__tar.gz → 4.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: linkture
3
- Version: 4.0.0
3
+ Version: 4.1.0
4
4
  Summary: PARSE and PROCESS BIBLE SCRIPTURE REFERENCES: extract, tag, link, rewrite, translate, BCV-encode and decode
5
5
  Keywords: bible,scriptures,scripture-references,scripture-translation,scripture-parser,scripture-linker
6
6
  Author-Email: "Eryk J." <infiniti@inventati.org>
@@ -35,7 +35,7 @@ keywords = [
35
35
  "scripture-parser",
36
36
  "scripture-linker",
37
37
  ]
38
- version = "4.0.0"
38
+ version = "4.1.0"
39
39
 
40
40
  [project.license]
41
41
  text = "MIT"
@@ -26,7 +26,7 @@
26
26
  SOFTWARE.
27
27
  """
28
28
 
29
- import argparse
29
+ import argparse, sys, traceback
30
30
  from .linkture import _available_languages, __app__, __version__, Scriptures
31
31
  from ast import literal_eval
32
32
 
@@ -34,24 +34,31 @@ from ast import literal_eval
34
34
  def main(args):
35
35
 
36
36
  def switchboard(text):
37
- if args['l'] is not None:
38
- prefix = '<a href="'
39
- suffix = '">'
40
- if len(args['l']) > 1 and args['l'][1] != '':
41
- suffix = args['l'][1]
42
- if len(args['l']) > 0 and args['l'][0] != '':
43
- prefix = args['l'][0]
44
- return s.link_scriptures(text, prefix, suffix)
45
- elif args['c']:
46
- return s.code_scriptures(text)
47
- elif args['d']:
48
- return s.decode_scriptures(literal_eval(text))
49
- elif args['x']:
50
- return s.list_scriptures(text)
51
- elif args['t']:
52
- return s.tag_scriptures(text)
53
- else:
54
- return s.rewrite_scriptures(text)
37
+ try:
38
+ if args['l'] is not None:
39
+ prefix = '<a href="'
40
+ suffix = '">'
41
+ if len(args['l']) > 1 and args['l'][1] != '':
42
+ suffix = args['l'][1]
43
+ if len(args['l']) > 0 and args['l'][0] != '':
44
+ prefix = args['l'][0]
45
+ return s.link_scriptures(text, prefix, suffix)
46
+ elif args['c']:
47
+ return s.code_scriptures(text)
48
+ elif args['d']:
49
+ return s.decode_scriptures(literal_eval(text))
50
+ elif args['x']:
51
+ return s.list_scriptures(text)
52
+ elif args['t']:
53
+ return s.tag_scriptures(text)
54
+ else:
55
+ return s.rewrite_scriptures(text)
56
+ except Exception as e:
57
+ print("\n--- CRASH DETECTED ---", file=sys.stderr)
58
+ print("Input causing failure:", repr(text), file=sys.stderr)
59
+ print("Error:", str(e), file=sys.stderr)
60
+ traceback.print_exc()
61
+ raise
55
62
 
56
63
  form = None
57
64
  if args['standard']:
@@ -27,7 +27,7 @@
27
27
  """
28
28
 
29
29
  __app__ = 'linkture'
30
- __version__ = 'v4.0.0'
30
+ __version__ = 'v4.1.0'
31
31
 
32
32
 
33
33
  import json, regex, sqlite3
@@ -17,7 +17,7 @@
17
17
  [19, "Psalm, Psal, Pss, Psa"],
18
18
  [20, "Pro"],
19
19
  [21, "Ecc, Eccles, Qoh"],
20
- [22, "Cant, Son, Sng"],
20
+ [22, "Cant, Son, Sng, SoS"],
21
21
  [26, "Ezek"],
22
22
  [30, "Amo"],
23
23
  [31, "Oba"],
File without changes
File without changes