txt2ebook 0.1.148__py3-none-any.whl → 0.1.150__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/subcommands/parse.py +5 -4
- {txt2ebook-0.1.148.dist-info → txt2ebook-0.1.150.dist-info}/METADATA +1 -1
- {txt2ebook-0.1.148.dist-info → txt2ebook-0.1.150.dist-info}/RECORD +6 -6
- {txt2ebook-0.1.148.dist-info → txt2ebook-0.1.150.dist-info}/WHEEL +0 -0
- {txt2ebook-0.1.148.dist-info → txt2ebook-0.1.150.dist-info}/entry_points.txt +0 -0
- {txt2ebook-0.1.148.dist-info → txt2ebook-0.1.150.dist-info}/licenses/LICENSE.md +0 -0
txt2ebook/subcommands/parse.py
CHANGED
@@ -70,14 +70,15 @@ def run(args: argparse.Namespace) -> Book:
|
|
70
70
|
"""
|
71
71
|
logger.info("Parsing txt file: %s", args.input_file.name)
|
72
72
|
|
73
|
-
|
73
|
+
raw_content = args.input_file.read()
|
74
|
+
if not raw_content:
|
75
|
+
raise EmptyFileError(f"Empty file content in {args.input_file.name}")
|
76
|
+
|
77
|
+
unicode = UnicodeDammit(raw_content)
|
74
78
|
logger.info("Detect encoding : %s", unicode.original_encoding)
|
75
79
|
|
76
80
|
content = unicode.unicode_markup
|
77
81
|
|
78
|
-
if not content:
|
79
|
-
raise EmptyFileError(f"Empty file content in {args.input_file.name}")
|
80
|
-
|
81
82
|
logger.info("Detect encoding : %s", unicode.original_encoding)
|
82
83
|
|
83
84
|
args.language = detect_and_expect_language(content, args.language)
|
@@ -41,12 +41,12 @@ txt2ebook/subcommands/epub.py,sha256=_obM1_fvVBPHOBXBOCYK8nyJadBX3_gOn9kaXA5HipA
|
|
41
41
|
txt2ebook/subcommands/gmi.py,sha256=ANnPg-RFsylTo44fUzFOSHN1fC3Ce82gBzrv-sBv5fU,3318
|
42
42
|
txt2ebook/subcommands/massage.py,sha256=xaDLI6NMz_InaeNf3M-Uk8qmjU6h5jnAg39tQiwt-P4,12690
|
43
43
|
txt2ebook/subcommands/md.py,sha256=PmIqrqrnzLywvN4qTkle0V9N3FTIJGRWpC0Xbk76B5o,3329
|
44
|
-
txt2ebook/subcommands/parse.py,sha256=
|
44
|
+
txt2ebook/subcommands/parse.py,sha256=gZTN0_Bp-5Y-wyVCYJ6KcE9MFtnO-Oh3_g8NZ1onoJU,2936
|
45
45
|
txt2ebook/subcommands/pdf.py,sha256=1JQtpugzAIaho6G3CK1rGYk74hotAexXZxPH9PHpRps,2980
|
46
46
|
txt2ebook/subcommands/tex.py,sha256=ToYdFXnFLwsXxTsZzCRsURo7TCeOIFJtp5sFJDt0R-E,3131
|
47
47
|
txt2ebook/subcommands/typ.py,sha256=qXpHMmtu_1nAMs264oKUSolWAUBjZpTziTSBcTe2JgA,3681
|
48
|
-
txt2ebook-0.1.
|
49
|
-
txt2ebook-0.1.
|
50
|
-
txt2ebook-0.1.
|
51
|
-
txt2ebook-0.1.
|
52
|
-
txt2ebook-0.1.
|
48
|
+
txt2ebook-0.1.150.dist-info/entry_points.txt,sha256=AFikuCV6fqf8_GHwsvWuo9jTGNrCkWY1TJWk5GfMWSk,71
|
49
|
+
txt2ebook-0.1.150.dist-info/licenses/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
|
50
|
+
txt2ebook-0.1.150.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
51
|
+
txt2ebook-0.1.150.dist-info/METADATA,sha256=i-o9VQh5MRKo43DqSqobnGqgilsjQfYIEu1IjenZ32o,4700
|
52
|
+
txt2ebook-0.1.150.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|