linkture 3.2.4__py3-none-any.whl → 3.3.0__py3-none-any.whl

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.
linkture/linkture.py CHANGED
@@ -27,7 +27,7 @@
27
27
  """
28
28
 
29
29
  __app__ = 'linkture'
30
- __version__ = 'v3.2.4'
30
+ __version__ = 'v3.3.0'
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
 
@@ -218,7 +218,8 @@ class Scriptures():
218
218
 
219
219
  self._reported = []
220
220
  text = regex.sub(self._first_pass, r, text)
221
- return regex.sub(self._second_pass, r, text)
221
+ text = regex.sub(self._second_pass, r, text)
222
+ return text
222
223
 
223
224
 
224
225
  def list_scriptures(self, text):
@@ -227,7 +228,8 @@ class Scriptures():
227
228
  for scripture in regex.findall(self._tagged, text):
228
229
  script = scripture.strip('}{')
229
230
  if self._rewrite:
230
- script = self.decode_scriptures(self._encoded[script])[0]
231
+ temp = self.decode_scriptures(self._encoded[script])
232
+ script = temp[0] if temp else script
231
233
  if self._upper:
232
234
  script = script.upper()
233
235
  lst.append(script)
@@ -241,7 +243,8 @@ class Scriptures():
241
243
  def r(match):
242
244
  script = match.group(1).strip('}{')
243
245
  if self._rewrite:
244
- script = self.decode_scriptures(self._encoded[script])[0]
246
+ temp = self.decode_scriptures(self._encoded[script])
247
+ script = temp[0] if temp else script
245
248
  if self._upper:
246
249
  script = script.upper()
247
250
  if tag:
@@ -286,7 +289,11 @@ class Scriptures():
286
289
  return None
287
290
  if not (0 < c <= self._ranges.loc[(self._ranges.Book == b) & (self._ranges.Chapter.isnull()), ['Last']].values[0]): # chapter out of range
288
291
  return None
289
- if not (0 < v <= self._ranges.loc[(self._ranges.Book == b) & (self._ranges.Chapter == c), ['Last']].values[0]): # verse out of range
292
+ if b == 19 and c in self._headings:
293
+ first = 0
294
+ else:
295
+ first = 1
296
+ if not (first <= v <= self._ranges.loc[(self._ranges.Book == b) & (self._ranges.Chapter == c), ['Last']].values[0]): # verse out of range
290
297
  return None
291
298
  return True
292
299
 
linkture/res/custom.json CHANGED
@@ -57,6 +57,7 @@
57
57
  [12, "2do Reyes, II Reyes"],
58
58
  [13, "1ro Crónicas, I Crónicas"],
59
59
  [14, "2do Crónicas, II Crónicas"],
60
+ [19, "Salmo"],
60
61
  [20, "Pro"],
61
62
  [22, "Cantar de los Cantares, Cantar, Cnt"],
62
63
  [23, "Isa"],
linkture/res/resources.db CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: linkture
3
- Version: 3.2.4
3
+ Version: 3.3.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>
@@ -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
@@ -0,0 +1,10 @@
1
+ linkture-3.3.0.dist-info/METADATA,sha256=nePUbYNt7TwToC8ER7g_8NAtJVM7OGipcrJxFbPCxPw,11679
2
+ linkture-3.3.0.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ linkture-3.3.0.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ linkture-3.3.0.dist-info/licenses/LICENSE,sha256=kPqKoVmo3Tx1HgQvqfjBZuYkjT1mZXnQ5R0KBbEeFfs,1064
5
+ linkture/__init__.py,sha256=-CsRDvXLUig8T6RvwkktRP8e8DWrpjlyqBcw26kOv1E,47
6
+ linkture/__main__.py,sha256=IjxrpZGZKIr7mHPGs_mMVaB6ipou_ArYgvs4wRFkxXM,6607
7
+ linkture/linkture.py,sha256=erB0sRVIKGQeRjnv_RYMOl_Ahb9TSMKTgwrixgsdIDY,25583
8
+ linkture/res/custom.json,sha256=ngpVe8OrnhBUTpJKcJc_W9rwxtEWq7qbt3_NPbGL6h0,2139
9
+ linkture/res/resources.db,sha256=MjQab_QQdfR2YfZpU6TWHOO3irLytnx00iy7YYASR6k,573440
10
+ linkture-3.3.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.4.4)
2
+ Generator: pdm-backend (2.4.5)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,10 +0,0 @@
1
- linkture-3.2.4.dist-info/METADATA,sha256=TWy_xICSRj4N_n3lHw9E9raYZbu2TixegexyvivcI6U,11657
2
- linkture-3.2.4.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- linkture-3.2.4.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- linkture-3.2.4.dist-info/licenses/LICENSE,sha256=kPqKoVmo3Tx1HgQvqfjBZuYkjT1mZXnQ5R0KBbEeFfs,1064
5
- linkture/__init__.py,sha256=-CsRDvXLUig8T6RvwkktRP8e8DWrpjlyqBcw26kOv1E,47
6
- linkture/__main__.py,sha256=IjxrpZGZKIr7mHPGs_mMVaB6ipou_ArYgvs4wRFkxXM,6607
7
- linkture/linkture.py,sha256=9X5aTjY5k1HmMwfqLAs8F6817jRuDNvajFmQ6B313aU,25330
8
- linkture/res/custom.json,sha256=ulF5FMx27uomKsA2xoW5NPB0fa4bq2FyLChgbW-AYSM,2120
9
- linkture/res/resources.db,sha256=z6f__fs94DWnoaIxyATHaoDsgs4C2d2FGhHe-mCB-8Y,577536
10
- linkture-3.2.4.dist-info/RECORD,,