txt2ebook 0.1.138__tar.gz → 0.1.140__tar.gz
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-0.1.138 → txt2ebook-0.1.140}/.pre-commit-config.yaml +0 -1
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/CHANGELOG.md +17 -2
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/PKG-INFO +2 -2
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/noxfile.py +6 -3
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/pyproject.toml +2 -2
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/__init__.py +4 -3
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/cli.py +4 -4
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/__init__.py +0 -3
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/typ.py +5 -2
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/helpers/__init__.py +1 -4
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/models/book.py +5 -5
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/parser.py +6 -5
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/epub.py +5 -5
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/gmi.py +1 -2
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/md.py +1 -2
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/pdf.py +2 -3
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/typ.py +2 -3
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/tokenizer.py +20 -6
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_subcommand_epub.py +0 -1
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/uv.lock +50 -47
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/.coveragerc +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/.gitignore +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/.python-version +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/CONTRIBUTING.md +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/LICENSE.md +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/README.md +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/Makefile +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/make.bat +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/CHANGELOG.md +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/CONTRIBUTING.md +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/LICENSE.md +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/README.md +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/_static/logo.png +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/conf.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/index.rst +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/txt2ebook.formats.rst +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/txt2ebook.helpers.rst +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/txt2ebook.models.rst +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/txt2ebook.parsers.rst +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/docs/source/txt2ebook.rst +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/__main__.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/exceptions.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/base.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/epub.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/gmi.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/md.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/pdf.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/templates/__init__.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/templates/epub/__init__.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/templates/epub/clean.css +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/templates/epub/condense.css +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/templates/epub/noindent.css +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/tex.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/formats/txt.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/languages/__init__.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/languages/en.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/languages/zh_cn.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/languages/zh_tw.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.mo +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/txt2ebook.pot +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.mo +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.mo +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/models/__init__.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/models/chapter.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/models/volume.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/__init__.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/env.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/massage.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/parse.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/subcommands/tex.py +1 -1
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/zh_utils.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/__init__.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/conftest.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/empty_file.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/missing_chapters.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/sample.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/sample_all_headers.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/sample_long_headers.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/sample_remove_wrapping.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/sample_unsorted_headers.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/sample_with_issues.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/fixtures/sample_with_metadata.txt +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_epub_writer.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_filename_format_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_format_option.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_header_number_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_input_file_arg.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_language_option.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_output_file_arg.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_overwrite_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_parser.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_purge_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_quiet_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_raise_warnings.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_sort_volume_and_chapter_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_split_volume_and_chapter_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_subcommand_env.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_subcommand_massage.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_test_parsing_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_tokenizer.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_translator_option.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_txt2ebook.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_verbose_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_volume_page_flag.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_zh_utils_zh_halfwidth_to_fullwidth.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_zh_utils_zh_numeric.py +0 -0
- {txt2ebook-0.1.138 → txt2ebook-0.1.140}/tests/test_zh_utils_zh_words_to_numbers.py +0 -0
@@ -7,6 +7,22 @@ and this project adheres to [0-based versioning](https://0ver.org/).
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## v0.1.140 (2025-05-18)
|
11
|
+
|
12
|
+
- Bump deps
|
13
|
+
- Bump local editable installation
|
14
|
+
- Remove duplicate `pre-commit` config item
|
15
|
+
- Remove unused `cjkwrap` import
|
16
|
+
- Remove unused field import
|
17
|
+
|
18
|
+
## v0.1.139 (2025-05-11)
|
19
|
+
|
20
|
+
- Bump deps
|
21
|
+
- Bump typst to 0.13.2
|
22
|
+
- Ensure indentation for first paragraph for typ doc
|
23
|
+
- Refactor content tokenization to handle metadata blocks correctly.
|
24
|
+
- Remove field() from Parser attributes
|
25
|
+
|
10
26
|
## v0.1.138 (2025-05-04)
|
11
27
|
|
12
28
|
- Bump deps
|
@@ -181,13 +197,12 @@ and this project adheres to [0-based versioning](https://0ver.org/).
|
|
181
197
|
|
182
198
|
- Bump deps and `pre-commit` hooks
|
183
199
|
- Migrate `typ` and `pdf` format to subcommand
|
184
|
-
- Migrate deprecated regex
|
200
|
+
- Migrate deprecated regex-\* options test cases
|
185
201
|
- Refactor `massage` subcommand
|
186
202
|
- Refactor language detection and validation
|
187
203
|
- Remove Tokenizer from handling `fullwidth` flag
|
188
204
|
- Set `deps` job in `nox` to Python 3.9
|
189
205
|
|
190
|
-
|
191
206
|
## v0.1.113 (2024-11-10)
|
192
207
|
|
193
208
|
- Extract top keywords from txt file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: txt2ebook
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.140
|
4
4
|
Summary: CLI tool to convert txt file to ebook format
|
5
5
|
Project-URL: Homepage, https://github.com/kianmeng/txt2ebook
|
6
6
|
Project-URL: Repository, https://github.com/kianmeng/txt2ebook
|
@@ -38,7 +38,7 @@ Requires-Dist: pypandoc~=1.11
|
|
38
38
|
Requires-Dist: regex<2022,>=2021.11.10
|
39
39
|
Requires-Dist: reportlab<5,>=4.0.0
|
40
40
|
Requires-Dist: typing-extensions<5,>=4.5.0
|
41
|
-
Requires-Dist: typst
|
41
|
+
Requires-Dist: typst>=0.13.0
|
42
42
|
Description-Content-Type: text/markdown
|
43
43
|
|
44
44
|
# txt2ebook
|
@@ -16,7 +16,6 @@
|
|
16
16
|
"""Nox configuration."""
|
17
17
|
|
18
18
|
import datetime
|
19
|
-
import re
|
20
19
|
|
21
20
|
import nox
|
22
21
|
|
@@ -188,9 +187,13 @@ def release(session: nox.Session) -> None:
|
|
188
187
|
"""Bump release."""
|
189
188
|
_uv_install(session)
|
190
189
|
|
191
|
-
before_version = session.run(
|
190
|
+
before_version = session.run(
|
191
|
+
"uv", "version", "--short", silent=True
|
192
|
+
).strip()
|
192
193
|
session.run("uv", "version", "--bump", "patch")
|
193
|
-
after_version = session.run(
|
194
|
+
after_version = session.run(
|
195
|
+
"uv", "version", "--short", silent=True
|
196
|
+
).strip()
|
194
197
|
|
195
198
|
_search_and_replace(
|
196
199
|
"src/txt2ebook/__init__.py", before_version, after_version
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "txt2ebook"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.140"
|
4
4
|
description = "CLI tool to convert txt file to ebook format"
|
5
5
|
authors = [{ name = "Kian-Meng Ang", email = "kianmeng@cpan.org" }]
|
6
6
|
requires-python = "~=3.9"
|
@@ -40,7 +40,7 @@ dependencies = [
|
|
40
40
|
"pypandoc~=1.11",
|
41
41
|
"typing-extensions>=4.5.0,<5",
|
42
42
|
"reportlab>=4.0.0,<5",
|
43
|
-
"typst>=0.
|
43
|
+
"typst>=0.13.0",
|
44
44
|
"importlib-resources>=6.1.1,<7",
|
45
45
|
"pylatex>=1.4.2,<2",
|
46
46
|
"lxml>=5.2.2,<6",
|
@@ -18,7 +18,6 @@
|
|
18
18
|
import argparse
|
19
19
|
import logging
|
20
20
|
import platform
|
21
|
-
from typing import Optional
|
22
21
|
import sys
|
23
22
|
|
24
23
|
import langdetect
|
@@ -51,7 +50,9 @@ def setup_logger(config: argparse.Namespace) -> None:
|
|
51
50
|
)
|
52
51
|
|
53
52
|
|
54
|
-
def log_or_raise_on_warning(
|
53
|
+
def log_or_raise_on_warning(
|
54
|
+
message: str, raise_on_warning: bool = False
|
55
|
+
) -> None:
|
55
56
|
"""Logs a warning message or raises an exception.
|
56
57
|
|
57
58
|
Args:
|
@@ -87,7 +88,7 @@ def detect_and_expect_language(content: str, config_language: str) -> str:
|
|
87
88
|
Returns:
|
88
89
|
The configured language, or the detected language if none is
|
89
90
|
configured.
|
90
|
-
"""
|
91
|
+
"""
|
91
92
|
detect_language = langdetect.detect(content)
|
92
93
|
config_language = config_language or detect_language
|
93
94
|
logger.info("Config language: %s", config_language)
|
@@ -15,9 +15,9 @@
|
|
15
15
|
|
16
16
|
"""txt2ebook/tte is a cli tool to convert txt file to ebook format.
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
website: https://github.com/kianmeng/txt2ebook
|
19
|
+
changelog: https://github.com/kianmeng/txt2ebook/blob/master/CHANGELOG.md
|
20
|
+
issues: https://github.com/kianmeng/txt2ebook/issues
|
21
21
|
"""
|
22
22
|
|
23
23
|
import argparse
|
@@ -150,7 +150,7 @@ def main(args: Optional[Sequence[str]] = None):
|
|
150
150
|
else:
|
151
151
|
logger.error(
|
152
152
|
"subcommand '%s' is missing its execution function.",
|
153
|
-
parsed_args.command
|
153
|
+
parsed_args.command,
|
154
154
|
)
|
155
155
|
parser.print_help(sys.stderr)
|
156
156
|
|
@@ -15,10 +15,7 @@
|
|
15
15
|
|
16
16
|
"""Packpage of different e-book formats."""
|
17
17
|
|
18
|
-
import argparse
|
19
|
-
from typing import Union
|
20
18
|
|
21
|
-
import txt2ebook.models.book
|
22
19
|
from txt2ebook.formats.epub import TEMPLATES as EPUB_TEMPLATES
|
23
20
|
from txt2ebook.formats.epub import EpubWriter
|
24
21
|
from txt2ebook.formats.gmi import GmiWriter
|
@@ -17,9 +17,6 @@
|
|
17
17
|
|
18
18
|
import logging
|
19
19
|
import re
|
20
|
-
import sys
|
21
|
-
from importlib import import_module
|
22
|
-
from typing import Any
|
23
20
|
|
24
21
|
logger = logging.getLogger(__name__)
|
25
22
|
|
@@ -42,4 +39,4 @@ def lower_underscore(string: str) -> str:
|
|
42
39
|
>>> lower_underscore("Hello\tWorld")
|
43
40
|
'hello_world'
|
44
41
|
"""
|
45
|
-
return re.sub(r
|
42
|
+
return re.sub(r"\s+", "_", string.lower().strip())
|
@@ -40,9 +40,7 @@ class Book:
|
|
40
40
|
language: str = field(default="")
|
41
41
|
cover: str = field(default="", repr=False)
|
42
42
|
raw_content: str = field(default="", repr=False)
|
43
|
-
toc: List[Union[Volume, Chapter]] = field(
|
44
|
-
default_factory=list, repr=False
|
45
|
-
)
|
43
|
+
toc: List[Union[Volume, Chapter]] = field(default_factory=list, repr=False)
|
46
44
|
|
47
45
|
def stats(self) -> Counter:
|
48
46
|
"""Returns the statistics count for the parsed tokens.
|
@@ -61,12 +59,14 @@ class Book:
|
|
61
59
|
authors = ", ".join(self.authors)
|
62
60
|
format_options = {
|
63
61
|
1: f"{self.title}_{authors}",
|
64
|
-
2: f"{authors}_{self.title}"
|
62
|
+
2: f"{authors}_{self.title}",
|
65
63
|
}
|
66
64
|
try:
|
67
65
|
return format_options[filename_format]
|
68
66
|
except KeyError:
|
69
|
-
raise AttributeError(
|
67
|
+
raise AttributeError(
|
68
|
+
f"Invalid filename format: '{filename_format}'!"
|
69
|
+
)
|
70
70
|
|
71
71
|
def debug(self, verbosity: int = 1) -> None:
|
72
72
|
"""Dump debug log of sections in self.toc."""
|
@@ -17,11 +17,10 @@
|
|
17
17
|
|
18
18
|
import argparse
|
19
19
|
import logging
|
20
|
-
from dataclasses import dataclass
|
20
|
+
from dataclasses import dataclass
|
21
21
|
from importlib import import_module
|
22
22
|
from typing import List, Tuple, Union
|
23
23
|
|
24
|
-
import cjkwrap
|
25
24
|
import regex as re
|
26
25
|
|
27
26
|
from txt2ebook.models import Book, Chapter, Volume
|
@@ -35,8 +34,8 @@ logger = logging.getLogger(__name__)
|
|
35
34
|
class Parser:
|
36
35
|
"""Parser class to massage and parse a text content."""
|
37
36
|
|
38
|
-
raw_content: str
|
39
|
-
config: argparse.Namespace
|
37
|
+
raw_content: str
|
38
|
+
config: argparse.Namespace
|
40
39
|
|
41
40
|
def __init__(self, raw_content: str, config: argparse.Namespace) -> None:
|
42
41
|
"""Set the constructor for the Parser."""
|
@@ -88,7 +87,9 @@ class Parser:
|
|
88
87
|
Returns:
|
89
88
|
str: The formatted section header.
|
90
89
|
"""
|
91
|
-
if not getattr(
|
90
|
+
if not getattr(
|
91
|
+
self.config, "header_number", False
|
92
|
+
) or self.config.language not in (
|
92
93
|
"zh-cn",
|
93
94
|
"zh-tw",
|
94
95
|
):
|
@@ -19,10 +19,9 @@ import argparse
|
|
19
19
|
import logging
|
20
20
|
import sys
|
21
21
|
|
22
|
-
from txt2ebook.subcommands.parse import run as parse_txt
|
23
|
-
from txt2ebook.formats.epub import EpubWriter
|
24
22
|
from txt2ebook.formats import EPUB_TEMPLATES
|
25
|
-
|
23
|
+
from txt2ebook.formats.epub import EpubWriter
|
24
|
+
from txt2ebook.subcommands.parse import run as parse_txt
|
26
25
|
|
27
26
|
logger = logging.getLogger(__name__)
|
28
27
|
|
@@ -30,8 +29,9 @@ logger = logging.getLogger(__name__)
|
|
30
29
|
def build_subparser(subparsers) -> None:
|
31
30
|
"""Build the subparser."""
|
32
31
|
epub_parser = subparsers.add_parser(
|
33
|
-
"epub",
|
34
|
-
|
32
|
+
"epub",
|
33
|
+
help="generate ebook in EPUB format",
|
34
|
+
formatter_class=argparse.RawTextHelpFormatter,
|
35
35
|
)
|
36
36
|
|
37
37
|
epub_parser.set_defaults(func=run)
|
@@ -19,9 +19,8 @@ import argparse
|
|
19
19
|
import logging
|
20
20
|
import sys
|
21
21
|
|
22
|
-
from txt2ebook.subcommands.parse import run as parse_txt
|
23
22
|
from txt2ebook.formats.gmi import GmiWriter
|
24
|
-
|
23
|
+
from txt2ebook.subcommands.parse import run as parse_txt
|
25
24
|
|
26
25
|
logger = logging.getLogger(__name__)
|
27
26
|
|
@@ -19,9 +19,8 @@ import argparse
|
|
19
19
|
import logging
|
20
20
|
import sys
|
21
21
|
|
22
|
-
from txt2ebook.subcommands.parse import run as parse_txt
|
23
22
|
from txt2ebook.formats.md import MdWriter as MarkdownWriter
|
24
|
-
|
23
|
+
from txt2ebook.subcommands.parse import run as parse_txt
|
25
24
|
|
26
25
|
logger = logging.getLogger(__name__)
|
27
26
|
|
@@ -19,10 +19,9 @@ import argparse
|
|
19
19
|
import logging
|
20
20
|
import sys
|
21
21
|
|
22
|
-
from txt2ebook.subcommands.parse import run as parse_txt
|
23
|
-
from txt2ebook.formats.pdf import PdfWriter
|
24
22
|
from txt2ebook.formats import PAGE_SIZES
|
25
|
-
|
23
|
+
from txt2ebook.formats.pdf import PdfWriter
|
24
|
+
from txt2ebook.subcommands.parse import run as parse_txt
|
26
25
|
|
27
26
|
logger = logging.getLogger(__name__)
|
28
27
|
|
@@ -19,10 +19,9 @@ import argparse
|
|
19
19
|
import logging
|
20
20
|
import sys
|
21
21
|
|
22
|
-
from txt2ebook.subcommands.parse import run as parse_txt
|
23
|
-
from txt2ebook.formats.typ import TypWriter
|
24
22
|
from txt2ebook.formats import PAGE_SIZES
|
25
|
-
|
23
|
+
from txt2ebook.formats.typ import TypWriter
|
24
|
+
from txt2ebook.subcommands.parse import run as parse_txt
|
26
25
|
|
27
26
|
logger = logging.getLogger(__name__)
|
28
27
|
|
@@ -169,14 +169,28 @@ class Tokenizer:
|
|
169
169
|
|
170
170
|
return metadata
|
171
171
|
|
172
|
-
|
173
172
|
def _tokenize_content(self) -> None:
|
174
|
-
#
|
175
|
-
|
176
|
-
|
177
|
-
|
173
|
+
# Determine the actual content part, after any metadata block
|
174
|
+
metadata_block_re = (
|
175
|
+
rf"^(?:{self.metadata_marker})\n(.*)\n(?:{self.metadata_marker})$"
|
176
|
+
)
|
177
|
+
match = re.search(
|
178
|
+
metadata_block_re, self.raw_content, re.MULTILINE | re.DOTALL
|
179
|
+
)
|
178
180
|
|
179
|
-
if
|
181
|
+
if match:
|
182
|
+
# Content starts after the matched metadata block
|
183
|
+
content_str = self.raw_content[match.end(0) :]
|
184
|
+
else:
|
185
|
+
# No metadata block found according to the pattern,
|
186
|
+
# so assume all raw_content is the actual content.
|
187
|
+
# _extract_metadata would have already logged/warned if metadata was expected.
|
188
|
+
content_str = self.raw_content
|
189
|
+
|
190
|
+
content_str = content_str.strip(self.config.paragraph_separator)
|
191
|
+
lines = content_str.split(self.config.paragraph_separator)
|
192
|
+
|
193
|
+
if len(lines) <= 1 and content_str: # Avoid warning for empty content
|
180
194
|
msg = (
|
181
195
|
"Cannot split content by "
|
182
196
|
f"{repr(self.config.paragraph_separator)}. "
|
@@ -36,14 +36,14 @@ wheels = [
|
|
36
36
|
|
37
37
|
[[package]]
|
38
38
|
name = "astroid"
|
39
|
-
version = "3.3.
|
39
|
+
version = "3.3.10"
|
40
40
|
source = { registry = "https://pypi.org/simple" }
|
41
41
|
dependencies = [
|
42
42
|
{ name = "typing-extensions", marker = "python_full_version < '3.11'" },
|
43
43
|
]
|
44
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
44
|
+
sdist = { url = "https://files.pythonhosted.org/packages/00/c2/9b2de9ed027f9fe5734a6c0c0a601289d796b3caaf1e372e23fa88a73047/astroid-3.3.10.tar.gz", hash = "sha256:c332157953060c6deb9caa57303ae0d20b0fbdb2e59b4a4f2a6ba49d0a7961ce", size = 398941, upload-time = "2025-05-10T13:33:10.405Z" }
|
45
45
|
wheels = [
|
46
|
-
{ url = "https://files.pythonhosted.org/packages/
|
46
|
+
{ url = "https://files.pythonhosted.org/packages/15/58/5260205b9968c20b6457ed82f48f9e3d6edf2f1f95103161798b73aeccf0/astroid-3.3.10-py3-none-any.whl", hash = "sha256:104fb9cb9b27ea95e847a94c003be03a9e039334a8ebca5ee27dafaf5c5711eb", size = 275388, upload-time = "2025-05-10T13:33:08.391Z" },
|
47
47
|
]
|
48
48
|
|
49
49
|
[[package]]
|
@@ -353,11 +353,14 @@ sdist = { url = "https://files.pythonhosted.org/packages/00/38/7d6ab2e569a916524
|
|
353
353
|
|
354
354
|
[[package]]
|
355
355
|
name = "exceptiongroup"
|
356
|
-
version = "1.
|
356
|
+
version = "1.3.0"
|
357
357
|
source = { registry = "https://pypi.org/simple" }
|
358
|
-
|
358
|
+
dependencies = [
|
359
|
+
{ name = "typing-extensions", marker = "python_full_version < '3.11'" },
|
360
|
+
]
|
361
|
+
sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" }
|
359
362
|
wheels = [
|
360
|
-
{ url = "https://files.pythonhosted.org/packages/
|
363
|
+
{ url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10", size = 16674, upload-time = "2025-05-10T17:42:49.33Z" },
|
361
364
|
]
|
362
365
|
|
363
366
|
[[package]]
|
@@ -952,20 +955,20 @@ wheels = [
|
|
952
955
|
|
953
956
|
[[package]]
|
954
957
|
name = "platformdirs"
|
955
|
-
version = "4.3.
|
958
|
+
version = "4.3.8"
|
956
959
|
source = { registry = "https://pypi.org/simple" }
|
957
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
960
|
+
sdist = { url = "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc", size = 21362, upload-time = "2025-05-07T22:47:42.121Z" }
|
958
961
|
wheels = [
|
959
|
-
{ url = "https://files.pythonhosted.org/packages/
|
962
|
+
{ url = "https://files.pythonhosted.org/packages/fe/39/979e8e21520d4e47a0bbe349e2713c0aac6f3d853d0e5b34d76206c439aa/platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4", size = 18567, upload-time = "2025-05-07T22:47:40.376Z" },
|
960
963
|
]
|
961
964
|
|
962
965
|
[[package]]
|
963
966
|
name = "pluggy"
|
964
|
-
version = "1.
|
967
|
+
version = "1.6.0"
|
965
968
|
source = { registry = "https://pypi.org/simple" }
|
966
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
969
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
|
967
970
|
wheels = [
|
968
|
-
{ url = "https://files.pythonhosted.org/packages/
|
971
|
+
{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
|
969
972
|
]
|
970
973
|
|
971
974
|
[[package]]
|
@@ -1023,7 +1026,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/6d/a8/10cf6b955b5fa1943
|
|
1023
1026
|
|
1024
1027
|
[[package]]
|
1025
1028
|
name = "pylint"
|
1026
|
-
version = "3.3.
|
1029
|
+
version = "3.3.7"
|
1027
1030
|
source = { registry = "https://pypi.org/simple" }
|
1028
1031
|
dependencies = [
|
1029
1032
|
{ name = "astroid" },
|
@@ -1036,9 +1039,9 @@ dependencies = [
|
|
1036
1039
|
{ name = "tomlkit" },
|
1037
1040
|
{ name = "typing-extensions", marker = "python_full_version < '3.10'" },
|
1038
1041
|
]
|
1039
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
1042
|
+
sdist = { url = "https://files.pythonhosted.org/packages/1c/e4/83e487d3ddd64ab27749b66137b26dc0c5b5c161be680e6beffdc99070b3/pylint-3.3.7.tar.gz", hash = "sha256:2b11de8bde49f9c5059452e0c310c079c746a0a8eeaa789e5aa966ecc23e4559", size = 1520709, upload-time = "2025-05-04T17:07:51.089Z" }
|
1040
1043
|
wheels = [
|
1041
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1044
|
+
{ url = "https://files.pythonhosted.org/packages/e8/83/bff755d09e31b5d25cc7fdc4bf3915d1a404e181f1abf0359af376845c24/pylint-3.3.7-py3-none-any.whl", hash = "sha256:43860aafefce92fca4cf6b61fe199cdc5ae54ea28f9bf4cd49de267b5195803d", size = 522565, upload-time = "2025-05-04T17:07:48.714Z" },
|
1042
1045
|
]
|
1043
1046
|
|
1044
1047
|
[[package]]
|
@@ -1208,15 +1211,15 @@ wheels = [
|
|
1208
1211
|
|
1209
1212
|
[[package]]
|
1210
1213
|
name = "reportlab"
|
1211
|
-
version = "4.4.
|
1214
|
+
version = "4.4.1"
|
1212
1215
|
source = { registry = "https://pypi.org/simple" }
|
1213
1216
|
dependencies = [
|
1214
1217
|
{ name = "chardet" },
|
1215
1218
|
{ name = "pillow" },
|
1216
1219
|
]
|
1217
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
1220
|
+
sdist = { url = "https://files.pythonhosted.org/packages/7b/d8/c3366bf10a5a5fcc3467eefa9504f6aa24fcda5817b5b147eabd37a385e1/reportlab-4.4.1.tar.gz", hash = "sha256:5f9b9fc0b7a48e8912c25ccf69d26b82980ab0da718e4f583fa720e8f8f5073f", size = 3509107, upload-time = "2025-05-15T08:07:02.539Z" }
|
1218
1221
|
wheels = [
|
1219
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1222
|
+
{ url = "https://files.pythonhosted.org/packages/a1/2e/7994a139150abf11c8dd258feb091ad654823a83cfd9720bfdded27185c3/reportlab-4.4.1-py3-none-any.whl", hash = "sha256:9217a1c8c1917217f819718b24972a96ad0c485a1c494749562d097b58d974b7", size = 1953615, upload-time = "2025-05-15T08:06:59.248Z" },
|
1220
1223
|
]
|
1221
1224
|
|
1222
1225
|
[[package]]
|
@@ -1256,11 +1259,11 @@ sdist = { url = "https://files.pythonhosted.org/packages/c8/48/609b5463da485943d
|
|
1256
1259
|
|
1257
1260
|
[[package]]
|
1258
1261
|
name = "setuptools"
|
1259
|
-
version = "80.
|
1262
|
+
version = "80.7.1"
|
1260
1263
|
source = { registry = "https://pypi.org/simple" }
|
1261
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
1264
|
+
sdist = { url = "https://files.pythonhosted.org/packages/9e/8b/dc1773e8e5d07fd27c1632c45c1de856ac3dbf09c0147f782ca6d990cf15/setuptools-80.7.1.tar.gz", hash = "sha256:f6ffc5f0142b1bd8d0ca94ee91b30c0ca862ffd50826da1ea85258a06fd94552", size = 1319188, upload-time = "2025-05-15T02:41:00.955Z" }
|
1262
1265
|
wheels = [
|
1263
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1266
|
+
{ url = "https://files.pythonhosted.org/packages/a1/18/0e835c3a557dc5faffc8f91092f62fc337c1dab1066715842e7a4b318ec4/setuptools-80.7.1-py3-none-any.whl", hash = "sha256:ca5cc1069b85dc23070a6628e6bcecb3292acac802399c7f8edc0100619f9009", size = 1200776, upload-time = "2025-05-15T02:40:58.887Z" },
|
1264
1267
|
]
|
1265
1268
|
|
1266
1269
|
[[package]]
|
@@ -1274,11 +1277,11 @@ wheels = [
|
|
1274
1277
|
|
1275
1278
|
[[package]]
|
1276
1279
|
name = "snowballstemmer"
|
1277
|
-
version = "
|
1280
|
+
version = "3.0.1"
|
1278
1281
|
source = { registry = "https://pypi.org/simple" }
|
1279
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
1282
|
+
sdist = { url = "https://files.pythonhosted.org/packages/75/a7/9810d872919697c9d01295633f5d574fb416d47e535f258272ca1f01f447/snowballstemmer-3.0.1.tar.gz", hash = "sha256:6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895", size = 105575, upload-time = "2025-05-09T16:34:51.843Z" }
|
1280
1283
|
wheels = [
|
1281
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1284
|
+
{ url = "https://files.pythonhosted.org/packages/c8/78/3565d011c61f5a43488987ee32b6f3f656e7f107ac2782dd57bdd7d91d9a/snowballstemmer-3.0.1-py3-none-any.whl", hash = "sha256:6cd7b3897da8d6c9ffb968a6781fa6532dce9c3618a4b127d920dab764a19064", size = 103274, upload-time = "2025-05-09T16:34:50.371Z" },
|
1282
1285
|
]
|
1283
1286
|
|
1284
1287
|
[[package]]
|
@@ -1468,7 +1471,7 @@ wheels = [
|
|
1468
1471
|
|
1469
1472
|
[[package]]
|
1470
1473
|
name = "txt2ebook"
|
1471
|
-
version = "0.1.
|
1474
|
+
version = "0.1.139"
|
1472
1475
|
source = { editable = "." }
|
1473
1476
|
dependencies = [
|
1474
1477
|
{ name = "bs4" },
|
@@ -1523,7 +1526,7 @@ requires-dist = [
|
|
1523
1526
|
{ name = "regex", specifier = ">=2021.11.10,<2022" },
|
1524
1527
|
{ name = "reportlab", specifier = ">=4.0.0,<5" },
|
1525
1528
|
{ name = "typing-extensions", specifier = ">=4.5.0,<5" },
|
1526
|
-
{ name = "typst", specifier = ">=0.
|
1529
|
+
{ name = "typst", specifier = ">=0.13.0" },
|
1527
1530
|
]
|
1528
1531
|
|
1529
1532
|
[package.metadata.requires-dev]
|
@@ -1560,26 +1563,26 @@ wheels = [
|
|
1560
1563
|
|
1561
1564
|
[[package]]
|
1562
1565
|
name = "typst"
|
1563
|
-
version = "0.
|
1566
|
+
version = "0.13.2"
|
1564
1567
|
source = { registry = "https://pypi.org/simple" }
|
1565
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
1568
|
+
sdist = { url = "https://files.pythonhosted.org/packages/90/84/e6c135449a9df3e1d5b81156db2decd84a089439212f2d0a1f754a558d3f/typst-0.13.2.tar.gz", hash = "sha256:ee84c54886bf1c1890dd064819d9d2e332e1ae1fff89a3615fae429b239305a4", size = 38968, upload-time = "2025-03-20T09:58:28.364Z" }
|
1566
1569
|
wheels = [
|
1567
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1568
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1569
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1570
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1571
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1572
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1573
|
-
{ url = "https://files.pythonhosted.org/packages/c6/
|
1574
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1575
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1576
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1577
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1578
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1579
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1580
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1581
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1582
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1570
|
+
{ url = "https://files.pythonhosted.org/packages/fe/69/bb21498c2386ff2973620013452aba3316d36edd09028f19e7a8b92efe39/typst-0.13.2-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:1bd26a9f51fb2cf72a071034642c2cd0aec0236ed5f379e4a0c3aa07fd40ef90", size = 18655258, upload-time = "2025-03-20T09:57:39.983Z" },
|
1571
|
+
{ url = "https://files.pythonhosted.org/packages/94/7a/393693dbe8e51b3aea0ba0247a21019900c6b537a579e84ec60cc17e5620/typst-0.13.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:81f201740cfe2e04dde3f69d7f08358b78be942c0e7c889abc6c6fe89c3a4f2c", size = 18177502, upload-time = "2025-03-20T09:57:43.136Z" },
|
1572
|
+
{ url = "https://files.pythonhosted.org/packages/01/2e/af7f9a7dbc98b79bee1011a745966fafd12a4fefb56c523e10d1082344c9/typst-0.13.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7845dcb07e1d1f569810db64d5efb5b657598a25f73b03dccad1034d0684c6f0", size = 21694339, upload-time = "2025-03-20T09:57:46.266Z" },
|
1573
|
+
{ url = "https://files.pythonhosted.org/packages/39/57/77bb34c270cfb1ec97a428fb2a7e3250bcc5110921187d7a14b946e4a113/typst-0.13.2-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3f360cd431e41477653c150da18a62474b20b5538d5082c120283b60bf2c896f", size = 21850319, upload-time = "2025-03-20T09:57:49.41Z" },
|
1574
|
+
{ url = "https://files.pythonhosted.org/packages/31/60/5a5beeb27d3b2cf9d0f8c90428805bf7cb941d2e90cad877fa0c7a1550c3/typst-0.13.2-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4980a85f9d2b6e0fea267cf337c2a88e905dad10996feb1617bbffa68bc26555", size = 22129592, upload-time = "2025-03-20T09:57:52.583Z" },
|
1575
|
+
{ url = "https://files.pythonhosted.org/packages/b0/41/1e0fb06ef071cd7cdade9bb5b708427fa7d4c100a08404b9a3a966f22a9d/typst-0.13.2-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dfa3f33592a3d156cf039510046f495cc41130ee5613998d641d5141e82d81e6", size = 23435078, upload-time = "2025-03-20T09:57:55.999Z" },
|
1576
|
+
{ url = "https://files.pythonhosted.org/packages/2e/c6/bad2e9e4198315d929f29e6f26ba93f3318d870f797109327d3e0328b97a/typst-0.13.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:789138b066982abffdc8d360493499188d64d7ef59aea998dda606df9d452128", size = 21703895, upload-time = "2025-03-20T09:57:58.841Z" },
|
1577
|
+
{ url = "https://files.pythonhosted.org/packages/d3/91/e495f896cdf701470633bbf99056d48385b2e8e41290406e3e711aca15c2/typst-0.13.2-cp313-cp313t-win_amd64.whl", hash = "sha256:be1ae603d07c2f406778a3c3b80484b69ed68a33c67bd56ac930af5ec7243497", size = 17444943, upload-time = "2025-03-20T09:58:01.702Z" },
|
1578
|
+
{ url = "https://files.pythonhosted.org/packages/fe/0f/38514b1ac2f2194d1e10dd08bcfcf0f97918d0b742999399451811419c26/typst-0.13.2-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:6d3c5e9372fbfc4b8176fafb5cac35d29693e437b8e15f91cc00523ddd071569", size = 18668206, upload-time = "2025-03-20T09:58:04.461Z" },
|
1579
|
+
{ url = "https://files.pythonhosted.org/packages/a0/e2/fc210e0a1436c261f2fa442550054218c3318eeba40abd383c47b06b0c94/typst-0.13.2-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:cd4d880e94b91028184cd167dda4e950264a8ea628841a48842d3e8453558a95", size = 18184589, upload-time = "2025-03-20T09:58:08.162Z" },
|
1580
|
+
{ url = "https://files.pythonhosted.org/packages/10/c9/0028a05bcaae0fbf6ef4e987784db5e23b0981a5d5fb5a89b1c95b7107b1/typst-0.13.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6abf9352540af30bcbb1687e4d00f0d0e7115db27db1b71b901df15abaf2086a", size = 21700856, upload-time = "2025-03-20T09:58:11.161Z" },
|
1581
|
+
{ url = "https://files.pythonhosted.org/packages/2a/64/c03db1f6824a2c7792d7ce5ede7e8e28db05dc63000cb748f84ac8539f94/typst-0.13.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d558ee6fb449714955297b026cc2f567f44c991b6b7d32d8ba5262150f267603", size = 21852362, upload-time = "2025-03-20T09:58:14.593Z" },
|
1582
|
+
{ url = "https://files.pythonhosted.org/packages/43/d1/fe1170f1692fc9f4fcfd61b4447be75e7b1b8653b55cb80737919bcc0df7/typst-0.13.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0b9e542d136741df846f15ed23e110475d4c82e1f0f29ab948cd3344bcc8181e", size = 22136479, upload-time = "2025-03-20T09:58:17.434Z" },
|
1583
|
+
{ url = "https://files.pythonhosted.org/packages/15/9f/9c056dbbff5a57e58a666cf576dd7053086f5826e5552796ad45d23202c5/typst-0.13.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3939b7cc16abc0f753015c886f8173f3a0a289ebc828d886c0f2284415d20490", size = 23443993, upload-time = "2025-03-20T09:58:20.575Z" },
|
1584
|
+
{ url = "https://files.pythonhosted.org/packages/23/aa/4a774bb4b31ff5865e4aeafe26180c58d76ba6eebd688690b4bc63197bb1/typst-0.13.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c2a78e01b897e3075b6bc01b0bf7738ae110550394d7be1ec51de178ccd5e8c", size = 21712749, upload-time = "2025-03-20T09:58:23.536Z" },
|
1585
|
+
{ url = "https://files.pythonhosted.org/packages/a6/81/3a2bb633622c81c03b1ab7de0b7dc82ed44f9f0e2d65699f3d0c357a043e/typst-0.13.2-cp38-abi3-win_amd64.whl", hash = "sha256:897829e5ddfad5ace94f3f378ce7c6d580b78402af92e66eed5b28cb98186b57", size = 17446971, upload-time = "2025-03-20T09:58:26.39Z" },
|
1583
1586
|
]
|
1584
1587
|
|
1585
1588
|
[[package]]
|
@@ -1593,16 +1596,16 @@ wheels = [
|
|
1593
1596
|
|
1594
1597
|
[[package]]
|
1595
1598
|
name = "virtualenv"
|
1596
|
-
version = "20.
|
1599
|
+
version = "20.31.2"
|
1597
1600
|
source = { registry = "https://pypi.org/simple" }
|
1598
1601
|
dependencies = [
|
1599
1602
|
{ name = "distlib" },
|
1600
1603
|
{ name = "filelock" },
|
1601
1604
|
{ name = "platformdirs" },
|
1602
1605
|
]
|
1603
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
1606
|
+
sdist = { url = "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz", hash = "sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af", size = 6076316, upload-time = "2025-05-08T17:58:23.811Z" }
|
1604
1607
|
wheels = [
|
1605
|
-
{ url = "https://files.pythonhosted.org/packages/
|
1608
|
+
{ url = "https://files.pythonhosted.org/packages/f3/40/b1c265d4b2b62b58576588510fc4d1fe60a86319c8de99fd8e9fec617d2c/virtualenv-20.31.2-py3-none-any.whl", hash = "sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11", size = 6057982, upload-time = "2025-05-08T17:58:21.15Z" },
|
1606
1609
|
]
|
1607
1610
|
|
1608
1611
|
[[package]]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.mo
RENAMED
File without changes
|
{txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po
RENAMED
File without changes
|
{txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.mo
RENAMED
File without changes
|
{txt2ebook-0.1.138 → txt2ebook-0.1.140}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -19,8 +19,8 @@ import argparse
|
|
19
19
|
import logging
|
20
20
|
import sys
|
21
21
|
|
22
|
-
from txt2ebook.subcommands.parse import run as parse_txt
|
23
22
|
from txt2ebook.formats.tex import TexWriter
|
23
|
+
from txt2ebook.subcommands.parse import run as parse_txt
|
24
24
|
|
25
25
|
logger = logging.getLogger(__name__)
|
26
26
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|