txt2ebook 0.1.143__py3-none-any.whl → 0.1.144__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.
- txt2ebook/models/book.py +1 -3
- txt2ebook/subcommands/massage.py +3 -1
- {txt2ebook-0.1.143.dist-info → txt2ebook-0.1.144.dist-info}/METADATA +1 -1
- {txt2ebook-0.1.143.dist-info → txt2ebook-0.1.144.dist-info}/RECORD +7 -7
- {txt2ebook-0.1.143.dist-info → txt2ebook-0.1.144.dist-info}/WHEEL +0 -0
- {txt2ebook-0.1.143.dist-info → txt2ebook-0.1.144.dist-info}/entry_points.txt +0 -0
- {txt2ebook-0.1.143.dist-info → txt2ebook-0.1.144.dist-info}/licenses/LICENSE.md +0 -0
txt2ebook/models/book.py
CHANGED
@@ -20,8 +20,6 @@ from collections import Counter
|
|
20
20
|
from dataclasses import dataclass, field
|
21
21
|
from typing import List, Union
|
22
22
|
|
23
|
-
from typing_extensions import Literal
|
24
|
-
|
25
23
|
from txt2ebook.models.chapter import Chapter
|
26
24
|
from txt2ebook.models.volume import Volume
|
27
25
|
|
@@ -52,7 +50,7 @@ class Book:
|
|
52
50
|
logger.debug("Book stats: %s", repr(stats))
|
53
51
|
return stats
|
54
52
|
|
55
|
-
def filename_format(self, filename_format:
|
53
|
+
def filename_format(self, filename_format: int) -> str:
|
56
54
|
"""Generate the filename format based on the available selection."""
|
57
55
|
authors = ", ".join(self.authors)
|
58
56
|
format_options = {
|
txt2ebook/subcommands/massage.py
CHANGED
@@ -202,8 +202,10 @@ def run(args: argparse.Namespace) -> None:
|
|
202
202
|
"""
|
203
203
|
massaged_txt = massage_txt(args)
|
204
204
|
args.language = detect_and_expect_language(massaged_txt, args.language)
|
205
|
+
config_lang = args.language.replace("-", "_")
|
206
|
+
langconf = import_module(f"txt2ebook.languages.{config_lang}")
|
205
207
|
args.with_toc = False
|
206
|
-
parser = Parser(massaged_txt, args)
|
208
|
+
parser = Parser(massaged_txt, args, langconf)
|
207
209
|
book = parser.parse()
|
208
210
|
|
209
211
|
if args.debug:
|
@@ -32,21 +32,21 @@ txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po,sha256=zVvD8AEL6gcxg4QPfc_NnDy2
|
|
32
32
|
txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.mo,sha256=1GIuOcO_bISiFcfhFez-A7mSi11Mo-x3PBobBENgMEc,675
|
33
33
|
txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po,sha256=Y-oJYvufQKqiUmAJR6RAB9DZdsu2hChUUtkEApu7byI,698
|
34
34
|
txt2ebook/models/__init__.py,sha256=Z3zClWLj08Q8HgaWV1RRgIKatEhIUfYBAVWm-j4m05w,930
|
35
|
-
txt2ebook/models/book.py,sha256=
|
35
|
+
txt2ebook/models/book.py,sha256=kJToU9uHElNons_6TTjkPtlQ70TTWQx1wo_sQFoANZY,2700
|
36
36
|
txt2ebook/models/chapter.py,sha256=6YvUDHzR6amGMZgkQl_xHWrYZUmlfpF7mnDLilG2BpA,1686
|
37
37
|
txt2ebook/models/volume.py,sha256=koz1KfWjvGWLFbmGEQlZ23frsP93cDsuBMySYBHiXm8,1597
|
38
38
|
txt2ebook/subcommands/__init__.py,sha256=1O_yTOheT9QwYarGl-zqFsVtcYveL4R9EztEeSFe0h8,1138
|
39
39
|
txt2ebook/subcommands/env.py,sha256=gEzra4b6guy7pRZUTCWX1_eiR7JmrtR1Z-J-vxljvMY,1549
|
40
40
|
txt2ebook/subcommands/epub.py,sha256=_obM1_fvVBPHOBXBOCYK8nyJadBX3_gOn9kaXA5HipA,3570
|
41
41
|
txt2ebook/subcommands/gmi.py,sha256=TUHoQ05q3TofYDRBAcXaDtqFWbqV0VcJHzFfGYKbqYs,3304
|
42
|
-
txt2ebook/subcommands/massage.py,sha256=
|
42
|
+
txt2ebook/subcommands/massage.py,sha256=BYshlwCgAr9CWK0OgtRafgIm5O5_5egwF25Z2SUVhSU,11884
|
43
43
|
txt2ebook/subcommands/md.py,sha256=hwb65z95NTSLAz87FJI7ZLB3du1pBx3A4FlF2UD2xio,3315
|
44
44
|
txt2ebook/subcommands/parse.py,sha256=tdWqssFsg70GSgz4S2YoaERydt3zQ5Sq1rLtkvB-WQU,2902
|
45
45
|
txt2ebook/subcommands/pdf.py,sha256=-DjeMmRKPZoTg8WZfNc028ZaZZ3xLCSAdnZDZFtCsbI,2966
|
46
46
|
txt2ebook/subcommands/tex.py,sha256=4Wk_-l3UzuJYck0oWkRaKXVrf05jkGTJiyc7YORwMK0,3117
|
47
47
|
txt2ebook/subcommands/typ.py,sha256=qCbaGFP5n6yJ-P6biXw2JHhjiYk3emOpthoSf9XWhOY,3667
|
48
|
-
txt2ebook-0.1.
|
49
|
-
txt2ebook-0.1.
|
50
|
-
txt2ebook-0.1.
|
51
|
-
txt2ebook-0.1.
|
52
|
-
txt2ebook-0.1.
|
48
|
+
txt2ebook-0.1.144.dist-info/METADATA,sha256=XiZG7lh-UwP6Ybwqik2nEUl17xxJ_yFtnFPmUQwvuQ4,4901
|
49
|
+
txt2ebook-0.1.144.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
50
|
+
txt2ebook-0.1.144.dist-info/entry_points.txt,sha256=3jm5vpUsDRgoM6S3CQVMMiP7tJQqfq1vfV0sh_KaK9s,74
|
51
|
+
txt2ebook-0.1.144.dist-info/licenses/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
|
52
|
+
txt2ebook-0.1.144.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|