linkture 2.6.1__py3-none-any.whl → 2.6.3__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 +6 -4
- linkture/res/custom.json +9 -0
- linkture/res/resources.db +0 -0
- {linkture-2.6.1.dist-info → linkture-2.6.3.dist-info}/METADATA +5 -4
- linkture-2.6.3.dist-info/RECORD +9 -0
- {linkture-2.6.1.dist-info → linkture-2.6.3.dist-info}/WHEEL +1 -1
- linkture/res/rss-36.png +0 -0
- linkture-2.6.1.dist-info/RECORD +0 -10
- {linkture-2.6.1.dist-info → linkture-2.6.3.dist-info}/licenses/LICENSE +0 -0
linkture/linkture.py
CHANGED
@@ -27,15 +27,16 @@
|
|
27
27
|
"""
|
28
28
|
|
29
29
|
__app__ = 'linkture'
|
30
|
-
__version__ = 'v2.6.
|
30
|
+
__version__ = 'v2.6.3'
|
31
31
|
|
32
32
|
|
33
33
|
import json, regex, sqlite3
|
34
34
|
import pandas as pd
|
35
|
+
from pathlib import Path
|
35
36
|
from unidecode import unidecode
|
36
37
|
|
37
38
|
|
38
|
-
_available_languages = ('Cebuano', 'Chinese', 'Danish', 'Dutch', 'English', 'French', 'German', 'Greek', 'Hungarian', 'Italian', 'Japanese', 'Korean', 'Norwegian', 'Polish', 'Portuguese', 'Russian', 'Spanish', 'Tagalog', 'Ukrainian')
|
39
|
+
_available_languages = ('Cebuano', 'Chinese', 'Danish', 'Dutch', 'English', 'French', 'German', 'Greek', 'Hungarian', 'Italian', 'Japanese', 'Korean', 'Norwegian', 'Polish', 'Portuguese', 'Russian', 'Spanish', 'Swedish', 'Tagalog', 'Ukrainian')
|
39
40
|
_non_latin = ('Chinese', 'Greek', 'Japanese', 'Korean', 'Russian', 'Ukrainian')
|
40
41
|
|
41
42
|
|
@@ -66,9 +67,10 @@ class Scriptures():
|
|
66
67
|
else:
|
67
68
|
form = 3
|
68
69
|
self._src_book_names = {}
|
70
|
+
path = Path(__file__).resolve().parent
|
69
71
|
|
70
72
|
self._tr_book_names = ['Bible']
|
71
|
-
con = sqlite3.connect('
|
73
|
+
con = sqlite3.connect(path / 'res/resources.db')
|
72
74
|
cur = con.cursor()
|
73
75
|
for rec in cur.execute(f"SELECT * FROM Books WHERE Language = '{translate}';").fetchall():
|
74
76
|
if self._upper:
|
@@ -83,7 +85,7 @@ class Scriptures():
|
|
83
85
|
item = unidecode(item)
|
84
86
|
normalized = regex.sub(r'\p{P}|\p{Z}', '', item.upper())
|
85
87
|
self._src_book_names[normalized] = rec[2]
|
86
|
-
with open('
|
88
|
+
with open(path / 'res/custom.json', 'r', encoding='UTF-8') as json_file:
|
87
89
|
b = json.load(json_file)
|
88
90
|
if language in b.keys():
|
89
91
|
for row in b[language]:
|
linkture/res/custom.json
CHANGED
@@ -48,6 +48,7 @@
|
|
48
48
|
[66, "Revel, Apoc"]
|
49
49
|
],
|
50
50
|
"Spanish": [
|
51
|
+
[5, "Deu"],
|
51
52
|
[9, "1ro Samuel, I Samuel"],
|
52
53
|
[10, "2do Samuel, II Samuel"],
|
53
54
|
[11, "1ro Reyes, I Reyes"],
|
@@ -55,6 +56,11 @@
|
|
55
56
|
[13, "1ro Crónicas, I Crónicas"],
|
56
57
|
[14, "2do Crónicas, II Crónicas"],
|
57
58
|
[22, "Cantar de los Cantares, Cantar"],
|
59
|
+
[23, "Isa"],
|
60
|
+
[26, "Ez"],
|
61
|
+
[48, "Gá, Ga"],
|
62
|
+
[49, "Efe"],
|
63
|
+
[50, "Fil"],
|
58
64
|
[52, "1ra Tesalonicenses, I Tesalonicenses"],
|
59
65
|
[53, "2da Tesalonicenses, II Tesalonicenses"],
|
60
66
|
[54, "1ra Timoteo, I Timoteo"],
|
@@ -65,5 +71,8 @@
|
|
65
71
|
[63, "2da Juan, II Juan"],
|
66
72
|
[64, "3ra Juan, III Juan"],
|
67
73
|
[66, "Revelación, Rev, Re"]
|
74
|
+
],
|
75
|
+
"Portuguese": [
|
76
|
+
[18, "Jo"]
|
68
77
|
]
|
69
78
|
}
|
linkture/res/resources.db
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: linkture
|
3
|
-
Version: 2.6.
|
3
|
+
Version: 2.6.3
|
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>
|
@@ -24,13 +24,16 @@ Requires-Dist: argparse>=1.4.0
|
|
24
24
|
Requires-Dist: regex>=2023.8.8
|
25
25
|
Requires-Dist: unidecode>=1.3.8
|
26
26
|
Requires-Dist: pandas==2.2.2
|
27
|
+
Requires-Dist: pathlib>=1.0.1
|
27
28
|
Description-Content-Type: text/markdown
|
28
29
|
|
30
|
+
[](https://gitlab.com/erykj/linkture) [](https://pypi.org/project/linkture/) [](https://github.com/erykjj/linkture/releases.atom)
|
31
|
+
|
29
32
|
## Purpose
|
30
33
|
|
31
34
|
This module contains functions to parse and process Bible scripture references.
|
32
35
|
|
33
|
-
The parser can work in **Cebuano, Chinese, Danish, Dutch, English, French, German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Russian, Spanish, Tagalog and Ukrainian**. It will **recognize** such references and **validate** them to ensure the chapter(s) and/or verse(s) are within range.
|
36
|
+
The parser can work in **Cebuano, Chinese, Danish, Dutch, English, French, German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, Tagalog and Ukrainian**. It will **recognize** such references and **validate** them to ensure the chapter(s) and/or verse(s) are within range.
|
34
37
|
|
35
38
|
It *does not* work with whole books (like "James") unless they are preceded by a number (like "1 John"); otherwise it would have to look up ever single word. Also, it will *not* find the multi-word book name "Song of Solomon" (and its variations), though this (and any other scripture) can be force-detected by tagging the desired reference "manually" within the source text (eg., "{{Song of Solomon 1:1}}") - *one book* per brace pair. These two limitations aside, it works with most book name variants in all the available languages (including common abbreviations): "2 Sam.", "2nd Samuel", "II Samuel", "2Sa", etc. Any special/unusual variants can be added to the *res/custom.json* list.
|
36
39
|
|
@@ -217,5 +220,3 @@ ____
|
|
217
220
|
## Feedback
|
218
221
|
|
219
222
|
Feel free to [get in touch and post any issues and suggestions](https://github.com/erykjj/linkture/issues).
|
220
|
-
|
221
|
-
[](https://github.com/erykjj/linkture/releases.atom)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
linkture-2.6.3.dist-info/METADATA,sha256=INENJJdqb-nbYN0-3pBccYlqTnaQj9chaQmhWoPREok,11383
|
2
|
+
linkture-2.6.3.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
3
|
+
linkture-2.6.3.dist-info/licenses/LICENSE,sha256=kPqKoVmo3Tx1HgQvqfjBZuYkjT1mZXnQ5R0KBbEeFfs,1064
|
4
|
+
linkture/__init__.py,sha256=-CsRDvXLUig8T6RvwkktRP8e8DWrpjlyqBcw26kOv1E,47
|
5
|
+
linkture/__main__.py,sha256=K1TDrBlT-_N_-iWpjOK_XW2rdm_IRiI7aWyKbFcdFxg,6478
|
6
|
+
linkture/linkture.py,sha256=238AhNQyPsU5ozN8KhGE8N6xeMLhR5QzIyGrEDENGt0,23772
|
7
|
+
linkture/res/custom.json,sha256=qlpTEux2w7kb-w9ZimDqTLhnB0Eyy1Mj3zfbQ1sxKvg,2046
|
8
|
+
linkture/res/resources.db,sha256=_vHwq2w1BHB7pGgO5txQVPAbJ5ak6msVbVoPLKG9QtE,581632
|
9
|
+
linkture-2.6.3.dist-info/RECORD,,
|
linkture/res/rss-36.png
DELETED
Binary file
|
linkture-2.6.1.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
linkture-2.6.1.dist-info/METADATA,sha256=AY9IhBRUtXz12W733RThzPzF4v8mKCVg_9hbEB3gPFQ,10985
|
2
|
-
linkture-2.6.1.dist-info/WHEEL,sha256=7sv5iXvIiTVJSnAxCz2tGBm9DHsb2vPSzeYeT7pvGUY,90
|
3
|
-
linkture-2.6.1.dist-info/licenses/LICENSE,sha256=kPqKoVmo3Tx1HgQvqfjBZuYkjT1mZXnQ5R0KBbEeFfs,1064
|
4
|
-
linkture/__init__.py,sha256=-CsRDvXLUig8T6RvwkktRP8e8DWrpjlyqBcw26kOv1E,47
|
5
|
-
linkture/__main__.py,sha256=K1TDrBlT-_N_-iWpjOK_XW2rdm_IRiI7aWyKbFcdFxg,6478
|
6
|
-
linkture/linkture.py,sha256=RMuAMkzho5y77nQtnmYMr-c8YDClagQ4i7sh2q5u7bc,23701
|
7
|
-
linkture/res/custom.json,sha256=PnCI0N5uBn1ZzEG05V3r8uwrW2uBogCQ_uCQKTHJe4E,1904
|
8
|
-
linkture/res/resources.db,sha256=ceXVt21jdJwJCCWsfMPy6aRcHo9yHzyTQk_i22aJZD8,581632
|
9
|
-
linkture/res/rss-36.png,sha256=DeZ-xvFxyjeHSNHen3inNFWPm4qHdlNI3MQ1fclu9CQ,1297
|
10
|
-
linkture-2.6.1.dist-info/RECORD,,
|
File without changes
|