linkture 3.2.3__tar.gz → 3.2.5__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: 3.2.3
3
+ Version: 3.2.5
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>
@@ -68,9 +68,9 @@ options:
68
68
  -v show version and exit
69
69
  -q don't show errors
70
70
  -o out-file output file (terminal output if not provided)
71
- --language {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
71
+ --language {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Indonesian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
72
72
  indicate source language for book names (English if unspecified)
73
- --translate {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
73
+ --translate {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Indonesian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
74
74
  indicate output language for book names (same as source if unspecified)
75
75
  -s separator segment separator (space by default)
76
76
  -u capitalize (upper-case) book names
@@ -39,9 +39,9 @@ options:
39
39
  -v show version and exit
40
40
  -q don't show errors
41
41
  -o out-file output file (terminal output if not provided)
42
- --language {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
42
+ --language {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Indonesian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
43
43
  indicate source language for book names (English if unspecified)
44
- --translate {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
44
+ --translate {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Indonesian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Romanian,Russian,Spanish,Swedish,Tagalog,Ukrainian}
45
45
  indicate output language for book names (same as source if unspecified)
46
46
  -s separator segment separator (space by default)
47
47
  -u capitalize (upper-case) book names
@@ -36,7 +36,7 @@ keywords = [
36
36
  "scripture-parser",
37
37
  "scripture-linker",
38
38
  ]
39
- version = "3.2.3"
39
+ version = "3.2.5"
40
40
 
41
41
  [project.license]
42
42
  text = "MIT"
@@ -27,7 +27,7 @@
27
27
  """
28
28
 
29
29
  __app__ = 'linkture'
30
- __version__ = 'v3.2.3'
30
+ __version__ = 'v3.2.5'
31
31
 
32
32
 
33
33
  import json, regex, sqlite3
@@ -36,7 +36,7 @@ from pathlib import Path
36
36
  from unidecode import unidecode
37
37
 
38
38
 
39
- _available_languages = ('Cebuano', 'Chinese', 'Danish', 'Dutch', 'English', 'Ewe', 'French', 'German', 'Greek', 'Hungarian', 'Italian', 'Japanese', 'Korean', 'Norwegian', 'Polish', 'Portuguese', 'Romanian', 'Russian', 'Spanish', 'Swedish', 'Tagalog', 'Ukrainian')
39
+ _available_languages = ('Cebuano', 'Chinese', 'Danish', 'Dutch', 'English', 'Ewe', 'French', 'German', 'Greek', 'Hungarian', 'Indonesian', 'Italian', 'Japanese', 'Korean', 'Norwegian', 'Polish', 'Portuguese', 'Romanian', 'Russian', 'Spanish', 'Swedish', 'Tagalog', 'Ukrainian')
40
40
  _non_latin = ('Chinese', 'Greek', 'Japanese', 'Korean', 'Russian', 'Ukrainian')
41
41
 
42
42
 
@@ -531,18 +531,21 @@ class Scriptures():
531
531
  return scripture.strip(), book, chap, cont, sep
532
532
 
533
533
  def decode_scriptures(self, bcv_ranges=[]):
534
- scriptures = []
535
- bk = ''
536
- ch = 0
537
- sep = ';'
538
- for bcv_range in bcv_ranges:
539
- scripture, bk, ch, cont, sep = self._decode_scripture(bcv_range, bk, ch, sep)
540
- if scripture:
541
- if cont:
542
- scriptures[-1] = scriptures[-1] + scripture
543
- else:
544
- scriptures.append(scripture)
545
- return scriptures
534
+ try:
535
+ scriptures = []
536
+ bk = ''
537
+ ch = 0
538
+ sep = ';'
539
+ for bcv_range in bcv_ranges:
540
+ scripture, bk, ch, cont, sep = self._decode_scripture(bcv_range, bk, ch, sep)
541
+ if scripture:
542
+ if cont:
543
+ scriptures[-1] = scriptures[-1] + scripture
544
+ else:
545
+ scriptures.append(scripture)
546
+ return scriptures
547
+ except:
548
+ return None
546
549
 
547
550
 
548
551
  def link_scriptures(self, text, prefix='<a href=', suffix='>'):
@@ -18,6 +18,7 @@
18
18
  [20, "Pro"],
19
19
  [21, "Ecc, Eccles, Qoh"],
20
20
  [22, "Cant, Son, Sng"],
21
+ [26, "Ezek"],
21
22
  [30, "Amo"],
22
23
  [31, "Oba"],
23
24
  [35, "Habaccuc"],
@@ -48,6 +49,7 @@
48
49
  [66, "Revel, Apoc"]
49
50
  ],
50
51
  "Spanish": [
52
+ [2, "Éxo"],
51
53
  [5, "Deu"],
52
54
  [9, "1ro Samuel, I Samuel"],
53
55
  [10, "2do Samuel, II Samuel"],
@@ -55,9 +57,11 @@
55
57
  [12, "2do Reyes, II Reyes"],
56
58
  [13, "1ro Crónicas, I Crónicas"],
57
59
  [14, "2do Crónicas, II Crónicas"],
58
- [22, "Cantar de los Cantares, Cantar"],
60
+ [20, "Pro"],
61
+ [22, "Cantar de los Cantares, Cantar, Cnt"],
59
62
  [23, "Isa"],
60
63
  [26, "Ez"],
64
+ [28, "Ose"],
61
65
  [48, "Gá, Ga"],
62
66
  [49, "Efe"],
63
67
  [50, "Fil"],
index cee1c2b..2500a66 100644
Binary file
File without changes