linkture 3.2.5__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.5'
30
+ __version__ = 'v3.3.0'
31
31
 
32
32
 
33
33
  import json, regex, sqlite3
@@ -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"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: linkture
3
- Version: 3.2.5
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>
@@ -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.5.dist-info/METADATA,sha256=tBJjiIpRRO2BM_Y6dt55fB5pOfbdbbdJpQBdQBGZqAQ,11679
2
- linkture-3.2.5.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- linkture-3.2.5.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- linkture-3.2.5.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=2BdpqJvsYJKdMRnxbRSLNcCeQh3zFBUgBKKl-JPJiCs,25344
8
- linkture/res/custom.json,sha256=ulF5FMx27uomKsA2xoW5NPB0fa4bq2FyLChgbW-AYSM,2120
9
- linkture/res/resources.db,sha256=MjQab_QQdfR2YfZpU6TWHOO3irLytnx00iy7YYASR6k,573440
10
- linkture-3.2.5.dist-info/RECORD,,