linkture 3.0.0__py3-none-any.whl → 3.2.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/__main__.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Description: Parse and process Bible scripture references
7
7
 
8
- MIT License: Copyright (c) 2024 Eryk J.
8
+ MIT License: Copyright (c) 2025 Eryk J.
9
9
 
10
10
  Permission is hereby granted, free of charge, to any person obtaining a copy
11
11
  of this software and associated documentation files (the "Software"), to deal
@@ -76,10 +76,12 @@ def main(args):
76
76
  txt = s.code_chapter(args['cc'])
77
77
  elif args['cv']:
78
78
  txt = s.code_verse(args['cv'])
79
- elif args['sc']:
80
- txt = s.serial_chapter_number(args['sc'])
81
79
  elif args['sv']:
82
80
  txt = s.serial_verse_number(args['sv'])
81
+ elif args['sc']:
82
+ txt = s.serial_chapter_number(args['sc'])
83
+ elif args['bn']:
84
+ txt = s.book_name(args['bn'])
83
85
  elif txt:
84
86
  txt = switchboard(txt)
85
87
  else:
@@ -126,8 +128,9 @@ aux_group = parser.add_argument_group('auxiliary functions')
126
128
  aux = aux_group.add_mutually_exclusive_group(required=False)
127
129
  aux.add_argument('-sc', metavar=('BCV'), help='return the serial number (1-1189) of the chapter with code "BCV" ("bbcccvvv")')
128
130
  aux.add_argument('-sv', metavar=('BCV'), help='return the serial number (1-31194) of the verse with code "BCV" ("bbcccvvv")')
129
- aux.add_argument('-cc', metavar=('chapter'), help='return the BCV range for serial chapter number "chapter" (integer value)')
130
131
  aux.add_argument('-cv', metavar=('verse'), help='return the BCV code for serial verse number "verse" (integer value)')
132
+ aux.add_argument('-cc', metavar=('chapter'), help='return the BCV range for serial chapter number "chapter" (integer value)')
133
+ aux.add_argument('-bn', metavar=('book'), help='return the name of book number "book" (integer value)')
131
134
 
132
135
  args = parser.parse_args()
133
136
  main(vars(args))
linkture/linkture.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Description: Parse and process Bible scripture references
7
7
 
8
- MIT License: Copyright (c) 2024 Eryk J.
8
+ MIT License: Copyright (c) 2025 Eryk J.
9
9
 
10
10
  Permission is hereby granted, free of charge, to any person obtaining a copy
11
11
  of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,7 @@
27
27
  """
28
28
 
29
29
  __app__ = 'linkture'
30
- __version__ = 'v3.0.0'
30
+ __version__ = 'v3.2.0'
31
31
 
32
32
 
33
33
  import json, regex, sqlite3
@@ -588,6 +588,13 @@ class Scriptures():
588
588
  return regex.sub(self._tagged, r1, text).replace('»»|', '{{').replace('|««', '}}')
589
589
 
590
590
 
591
+ def book_name(self, num):
592
+ try:
593
+ return self._tr_book_names[int(num)]
594
+ except:
595
+ self._error_report(num, 'OUT OF RANGE')
596
+ return None
597
+
591
598
  def serial_chapter_number(self, bcv):
592
599
  try:
593
600
  return int(self._chapters.loc[(self._chapters['Book'] == int(bcv[0:2])) & (self._chapters['Chapter'] == int(bcv[2:5]))].values[0][0])
linkture/res/resources.db CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: linkture
3
- Version: 3.0.0
3
+ Version: 3.2.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>
@@ -58,7 +58,7 @@ usage: linkture.py [-h] [-v] [-q] [-f in-file | -r reference] [-o out-file]
58
58
  [--translate {Cebuano,Chinese,Danish,Dutch,English,Ewe,French,German,Greek,Hungarian,Italian,Japanese,Korean,Norwegian,Polish,Portuguese,Russian,Spanish,Tagalog,Ukrainian}]
59
59
  [-s separator] [-u] [--full | --official | --standard]
60
60
  [-c | -d | -l [prefix [suffix ...]] | -t | -x]
61
- [-sc BCV | -sv BCV | -cc chapter | -cv verse]
61
+ [-sc BCV | -sv BCV | -cv verse | -cc chapter | -bn book]
62
62
 
63
63
  PARSE and PROCESS BIBLE SCRIPTURE REFERENCES: extract, tag, link, rewrite, translate, BCV-encode and decode.
64
64
  See README for more information
@@ -101,8 +101,9 @@ type of conversion:
101
101
  auxiliary functions:
102
102
  -sc BCV return the serial number (1-1189) of the chapter with code "BCV" ("bbcccvvv")
103
103
  -sv BCV return the serial number (1-31194) of the verse with code "BCV" ("bbcccvvv")
104
- -cc chapter return the BCV range for serial chapter number "chapter" (integer value)
105
- -cv verse return the BCV code for serial verse number "verse" (integer value)
104
+ -cv verse return the BCV code for serial verse number "verse" (integer)
105
+ -cc chapter return the BCV range for serial chapter number "chapter" (integer)
106
+ -bn book return the name of book number "book" (integer)
106
107
  ```
107
108
 
108
109
  Some examples:
@@ -153,6 +154,11 @@ $ python3 -m linkture -sv '01001001'
153
154
  $ python3 -m linkture -sc '66022001'
154
155
  1189
155
156
 
157
+ $ python3 -m linkture -bn 3 --official
158
+ Le
159
+
160
+ $ python3 -m linkture -bn 3 --translate German
161
+ 3. Mose
156
162
 
157
163
  $ python3 -m linkture -r '2Ti 3:16, 17' --full -s '_'
158
164
  2_Timothy_3:16,_17
@@ -195,6 +201,9 @@ i = s.serial_chapter_number(ch_bcv)
195
201
  i = s.serial_verse_number(vs_bcv)
196
202
  # returns the serial number (1-31194) of the verse identified by the provided BCV-format string
197
203
 
204
+ book = s.book_name(i)
205
+ # returns the book name indicated by the provided integer (1-66)
206
+
198
207
  ch_bcv = s.code_chapter(i)
199
208
  # returns a BCV-format range string for the whole chapter indicated by the provided integer (1-1189)
200
209
 
@@ -0,0 +1,10 @@
1
+ linkture-3.2.0.dist-info/METADATA,sha256=RAgC9am-LfP6kMkDY-t2D6-TDab-IZOHJNDgWq470U8,11561
2
+ linkture-3.2.0.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ linkture-3.2.0.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ linkture-3.2.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=1Z-xt7xPVe6KN1Q_FvkXpK0SmwbgO7ft9sIKUQzQdzQ,25217
8
+ linkture/res/custom.json,sha256=qlpTEux2w7kb-w9ZimDqTLhnB0Eyy1Mj3zfbQ1sxKvg,2046
9
+ linkture/res/resources.db,sha256=5zEbKY7eJgzsdJBq0VyX0n2e8ssL8gHHvTyTN_rGGzE,577536
10
+ linkture-3.2.0.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- linkture-3.0.0.dist-info/METADATA,sha256=GeDDtoiK1KJHOhgZC2aN9q6i0THUxCi-n7lpRi9n8aY,11304
2
- linkture-3.0.0.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- linkture-3.0.0.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- linkture-3.0.0.dist-info/licenses/LICENSE,sha256=kPqKoVmo3Tx1HgQvqfjBZuYkjT1mZXnQ5R0KBbEeFfs,1064
5
- linkture/__init__.py,sha256=-CsRDvXLUig8T6RvwkktRP8e8DWrpjlyqBcw26kOv1E,47
6
- linkture/__main__.py,sha256=_HuNLVB-JSzNqxSxhkSrfJ5ZkQ6nK9jqaoy4xhMoC3c,6444
7
- linkture/linkture.py,sha256=Gvt9ldcDClOCPtgFji4jKC4OtSq190LVr8z3fZ-Qt4Q,25032
8
- linkture/res/custom.json,sha256=qlpTEux2w7kb-w9ZimDqTLhnB0Eyy1Mj3zfbQ1sxKvg,2046
9
- linkture/res/resources.db,sha256=0l6lUJB5p4cQ6YpnIn9rDTnmbiZGSKb6k3OKNZmVF7M,569344
10
- linkture-3.0.0.dist-info/RECORD,,