txt2ebook 0.1.145__tar.gz → 0.1.146__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.
Files changed (110) hide show
  1. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/.pre-commit-config.yaml +1 -1
  2. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/CHANGELOG.md +10 -0
  3. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/PKG-INFO +7 -13
  4. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/README.md +5 -11
  5. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/pyproject.toml +6 -1
  6. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/languages/en.py +3 -2
  7. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/massage.py +40 -12
  8. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/conftest.py +25 -0
  9. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/uv.lock +22 -22
  10. txt2ebook-0.1.145/tests/test_epub_writer.py +0 -28
  11. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/.coveragerc +0 -0
  12. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/.gitignore +0 -0
  13. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/.python-version +0 -0
  14. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/CONTRIBUTING.md +0 -0
  15. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/LICENSE.md +0 -0
  16. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/Makefile +0 -0
  17. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/make.bat +0 -0
  18. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/CHANGELOG.md +0 -0
  19. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/CONTRIBUTING.md +0 -0
  20. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/LICENSE.md +0 -0
  21. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/README.md +0 -0
  22. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/_static/logo.png +0 -0
  23. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/conf.py +0 -0
  24. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/index.rst +0 -0
  25. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/txt2ebook.formats.rst +0 -0
  26. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/txt2ebook.helpers.rst +0 -0
  27. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/txt2ebook.models.rst +0 -0
  28. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/txt2ebook.parsers.rst +0 -0
  29. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/docs/source/txt2ebook.rst +0 -0
  30. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/noxfile.py +0 -0
  31. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/__init__.py +0 -0
  32. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/__main__.py +0 -0
  33. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/cli.py +0 -0
  34. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/exceptions.py +0 -0
  35. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/__init__.py +0 -0
  36. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/base.py +0 -0
  37. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/epub.py +0 -0
  38. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/gmi.py +0 -0
  39. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/md.py +0 -0
  40. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/pdf.py +0 -0
  41. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/templates/__init__.py +0 -0
  42. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/templates/epub/__init__.py +0 -0
  43. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/templates/epub/clean.css +0 -0
  44. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/templates/epub/condense.css +0 -0
  45. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/templates/epub/noindent.css +0 -0
  46. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/tex.py +0 -0
  47. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/txt.py +0 -0
  48. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/formats/typ.py +0 -0
  49. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/helpers/__init__.py +0 -0
  50. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/languages/__init__.py +0 -0
  51. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/languages/zh_cn.py +0 -0
  52. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/languages/zh_tw.py +0 -0
  53. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.mo +0 -0
  54. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po +0 -0
  55. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/locales/txt2ebook.pot +0 -0
  56. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.mo +0 -0
  57. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po +0 -0
  58. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.mo +0 -0
  59. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po +0 -0
  60. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/models/__init__.py +0 -0
  61. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/models/book.py +0 -0
  62. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/models/chapter.py +0 -0
  63. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/models/volume.py +0 -0
  64. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/parser.py +0 -0
  65. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/__init__.py +0 -0
  66. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/env.py +0 -0
  67. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/epub.py +0 -0
  68. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/gmi.py +0 -0
  69. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/md.py +0 -0
  70. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/parse.py +0 -0
  71. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/pdf.py +0 -0
  72. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/tex.py +0 -0
  73. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/subcommands/typ.py +0 -0
  74. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/tokenizer.py +0 -0
  75. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/src/txt2ebook/zh_utils.py +0 -0
  76. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/__init__.py +0 -0
  77. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/empty_file.txt +0 -0
  78. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/missing_chapters.txt +0 -0
  79. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/sample.txt +0 -0
  80. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/sample_all_headers.txt +0 -0
  81. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/sample_long_headers.txt +0 -0
  82. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/sample_remove_wrapping.txt +0 -0
  83. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/sample_unsorted_headers.txt +0 -0
  84. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/sample_with_issues.txt +0 -0
  85. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/fixtures/sample_with_metadata.txt +0 -0
  86. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_filename_format_flag.py +0 -0
  87. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_format_option.py +0 -0
  88. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_header_number_flag.py +0 -0
  89. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_input_file_arg.py +0 -0
  90. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_language_option.py +0 -0
  91. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_output_file_arg.py +0 -0
  92. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_overwrite_flag.py +0 -0
  93. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_parser.py +0 -0
  94. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_purge_flag.py +0 -0
  95. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_quiet_flag.py +0 -0
  96. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_raise_warnings.py +0 -0
  97. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_sort_volume_and_chapter_flag.py +0 -0
  98. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_split_volume_and_chapter_flag.py +0 -0
  99. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_subcommand_env.py +0 -0
  100. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_subcommand_epub.py +0 -0
  101. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_subcommand_massage.py +0 -0
  102. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_test_parsing_flag.py +0 -0
  103. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_tokenizer.py +0 -0
  104. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_translator_option.py +0 -0
  105. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_txt2ebook.py +0 -0
  106. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_verbose_flag.py +0 -0
  107. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_volume_page_flag.py +0 -0
  108. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_zh_utils_zh_halfwidth_to_fullwidth.py +0 -0
  109. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_zh_utils_zh_numeric.py +0 -0
  110. {txt2ebook-0.1.145 → txt2ebook-0.1.146}/tests/test_zh_utils_zh_words_to_numbers.py +0 -0
@@ -35,7 +35,7 @@ repos:
35
35
  exclude: (poetry.lock)
36
36
 
37
37
  - repo: https://github.com/astral-sh/ruff-pre-commit
38
- rev: v0.12.0
38
+ rev: v0.12.1
39
39
  hooks:
40
40
  - id: ruff-check
41
41
  args:
@@ -7,6 +7,16 @@ and this project adheres to [0-based versioning](https://0ver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## v0.1.146 (2025-06-29)
11
+
12
+ - Bump deps and `pre-commit` hook for `ruff`
13
+ - Fix `massage` subcommand did not retain the original content
14
+ - Fix missing regex for translator for en language
15
+ - Move fixture to the right file
16
+ - Update help message in readme
17
+ - Update installation step using `uv` tool
18
+ - Update project classifier keywords
19
+
10
20
  ## v0.1.145 (2025-06-22)
11
21
 
12
22
  - Bump deps and `pre-commit` hooks
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: txt2ebook
3
- Version: 0.1.145
3
+ Version: 0.1.146
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
7
7
  Author-email: Kian-Meng Ang <kianmeng@cpan.org>
8
8
  License-Expression: AGPL-3.0-or-later
9
9
  License-File: LICENSE.md
10
- Keywords: cjk,ebook,epub,txt
10
+ Keywords: cjk,ebook,epub,gmi,latex,md,pdf,txt,typst
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Environment :: Console
13
13
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
@@ -50,19 +50,13 @@ A console tool to convert txt file to different ebook formats.
50
50
  Stable version From PyPI:
51
51
 
52
52
  ```console
53
- python3 -m pip install txt2ebook
53
+ uv tool install txt2ebook
54
54
  ```
55
55
 
56
56
  Upgrade to latest stable version:
57
57
 
58
58
  ```console
59
- python3 -m pip install txt2ebook --upgrade
60
- ```
61
-
62
- Latest development version from GitHub:
63
-
64
- ```console
65
- python3 -m pip install -e git+https://github.com/kianmeng/txt2ebook.git
59
+ uv tool upgrade txt2ebook
66
60
  ```
67
61
 
68
62
  ## Usage
@@ -108,12 +102,12 @@ positional arguments:
108
102
  typ
109
103
  generate ebook in Typst format
110
104
 
111
- optional arguments:
112
- -of OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER
105
+ options:
106
+ -of, --output-folder OUTPUT_FOLDER
113
107
  set default output folder (default: 'output')
114
108
  -p, --purge
115
109
  remove converted ebooks specified by --output-folder option (default: 'False')
116
- -l LANGUAGE, --language LANGUAGE
110
+ -l, --language LANGUAGE
117
111
  language of the ebook (default: 'None')
118
112
  -rw, --raise-on-warning
119
113
  raise exception and stop parsing upon warning
@@ -7,19 +7,13 @@ A console tool to convert txt file to different ebook formats.
7
7
  Stable version From PyPI:
8
8
 
9
9
  ```console
10
- python3 -m pip install txt2ebook
10
+ uv tool install txt2ebook
11
11
  ```
12
12
 
13
13
  Upgrade to latest stable version:
14
14
 
15
15
  ```console
16
- python3 -m pip install txt2ebook --upgrade
17
- ```
18
-
19
- Latest development version from GitHub:
20
-
21
- ```console
22
- python3 -m pip install -e git+https://github.com/kianmeng/txt2ebook.git
16
+ uv tool upgrade txt2ebook
23
17
  ```
24
18
 
25
19
  ## Usage
@@ -65,12 +59,12 @@ positional arguments:
65
59
  typ
66
60
  generate ebook in Typst format
67
61
 
68
- optional arguments:
69
- -of OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER
62
+ options:
63
+ -of, --output-folder OUTPUT_FOLDER
70
64
  set default output folder (default: 'output')
71
65
  -p, --purge
72
66
  remove converted ebooks specified by --output-folder option (default: 'False')
73
- -l LANGUAGE, --language LANGUAGE
67
+ -l, --language LANGUAGE
74
68
  language of the ebook (default: 'None')
75
69
  -rw, --raise-on-warning
76
70
  raise exception and stop parsing upon warning
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "txt2ebook"
3
- version = "0.1.145"
3
+ version = "0.1.146"
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"
@@ -10,7 +10,12 @@ keywords = [
10
10
  "cjk",
11
11
  "ebook",
12
12
  "epub",
13
+ "gmi",
14
+ "latex",
15
+ "md",
16
+ "pdf",
13
17
  "txt",
18
+ "typst",
14
19
  ]
15
20
  classifiers = [
16
21
  "Development Status :: 4 - Beta",
@@ -17,7 +17,8 @@
17
17
 
18
18
  DEFAULT_RE_TITLE = r"Title:(.*)"
19
19
  DEFAULT_RE_AUTHOR = r"Author:(.*)"
20
- DEFAULT_RE_TAG = r"Tags(.*)"
21
- DEFAULT_RE_INDEX = r"Index(.*)"
20
+ DEFAULT_RE_TAG = r"Tags:(.*)"
21
+ DEFAULT_RE_INDEX = r"Index:(.*)"
22
22
  DEFAULT_RE_VOLUME = r"(Volume.*)"
23
23
  DEFAULT_RE_CHAPTER = r"(Chapter.*)"
24
+ DEFAULT_RE_TRANSLATOR = r"Translator:(.*)"
@@ -19,6 +19,7 @@ import argparse
19
19
  import logging
20
20
  import sys
21
21
  from importlib import import_module
22
+ from pathlib import Path
22
23
 
23
24
  import cjkwrap
24
25
  import regex as re
@@ -201,21 +202,48 @@ def run(args: argparse.Namespace) -> None:
201
202
  None
202
203
  """
203
204
  massaged_txt = massage_txt(args)
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}")
207
- args.with_toc = False
208
- parser = Parser(massaged_txt, args, langconf)
209
- book = parser.parse()
205
+ if args.overwrite:
206
+ _overwrite_file(args, massaged_txt)
207
+ else:
208
+ _new_file(args, massaged_txt)
209
+
210
+ # args.language = detect_and_expect_language(massaged_txt, args.language)
211
+ # config_lang = args.language.replace("-", "_")
212
+ # langconf = import_module(f"txt2ebook.languages.{config_lang}")
213
+ # args.with_toc = False
214
+ # parser = Parser(massaged_txt, args, langconf)
215
+ # book = parser.parse()
216
+
217
+ # if args.debug:
218
+ # book.debug(args.verbose)
219
+
220
+ # if args.header_number:
221
+ # book = header_number(args, book)
222
+
223
+ # writer = TxtWriter(book, args)
224
+ # writer.write()
210
225
 
211
- if args.debug:
212
- book.debug(args.verbose)
213
226
 
214
- if args.header_number:
215
- book = header_number(args, book)
227
+ def _overwrite_file(args, massaged_txt) -> None:
228
+ txt_filename = Path(args.input_file.name)
229
+
230
+ with open(txt_filename, "w", encoding="utf8") as file:
231
+ file.write(massaged_txt)
232
+ logger.info("Overwrite txt file: %s", txt_filename.resolve())
233
+
234
+
235
+ def _new_file(args, massaged_txt) -> None:
236
+ txt_filename = Path(args.input_file.name)
237
+ export_filename = Path(
238
+ txt_filename.resolve().parent.joinpath(
239
+ args.output_folder, txt_filename.name
240
+ )
241
+ )
242
+ export_filename.parent.mkdir(parents=True, exist_ok=True)
216
243
 
217
- writer = TxtWriter(book, args)
218
- writer.write()
244
+ with open(export_filename, "w", encoding="utf8") as file:
245
+ file.write(massaged_txt)
246
+ logger.info("New txt file: %s", export_filename.resolve())
219
247
 
220
248
 
221
249
  def header_number(args: argparse.Namespace, book: Book) -> Book:
@@ -1,5 +1,6 @@
1
1
  # pylint: disable=C0114,C0116,W0621
2
2
 
3
+ import argparse
3
4
  import os
4
5
  from pathlib import Path
5
6
  from shutil import copyfile
@@ -55,3 +56,27 @@ def fixture_outfile(tmpdir):
55
56
  return Path(tmpdir, filename)
56
57
 
57
58
  return outfile
59
+
60
+
61
+ @pytest.fixture(name="config")
62
+ def fixture_config():
63
+ return argparse.Namespace(
64
+ **{
65
+ "title": False,
66
+ "author": False,
67
+ "cover": None,
68
+ "paragraph_separator": "\n\n",
69
+ "re_delete": False,
70
+ "re_replace": False,
71
+ "re_delete_line": False,
72
+ "re_volume_chapter": (),
73
+ "re_volume": (),
74
+ "re_chapter": (),
75
+ "re_title": (),
76
+ "re_author": (),
77
+ "no_wrapping": False,
78
+ "raise_on_warning": False,
79
+ "width": False,
80
+ "language": "zh-cn",
81
+ }
82
+ )
@@ -1296,27 +1296,27 @@ wheels = [
1296
1296
 
1297
1297
  [[package]]
1298
1298
  name = "ruff"
1299
- version = "0.12.0"
1300
- source = { registry = "https://pypi.org/simple" }
1301
- sdist = { url = "https://files.pythonhosted.org/packages/24/90/5255432602c0b196a0da6720f6f76b93eb50baef46d3c9b0025e2f9acbf3/ruff-0.12.0.tar.gz", hash = "sha256:4d047db3662418d4a848a3fdbfaf17488b34b62f527ed6f10cb8afd78135bc5c", size = 4376101, upload-time = "2025-06-17T15:19:26.217Z" }
1302
- wheels = [
1303
- { url = "https://files.pythonhosted.org/packages/e6/fd/b46bb20e14b11ff49dbc74c61de352e0dc07fb650189513631f6fb5fc69f/ruff-0.12.0-py3-none-linux_armv6l.whl", hash = "sha256:5652a9ecdb308a1754d96a68827755f28d5dfb416b06f60fd9e13f26191a8848", size = 10311554, upload-time = "2025-06-17T15:18:45.792Z" },
1304
- { url = "https://files.pythonhosted.org/packages/e7/d3/021dde5a988fa3e25d2468d1dadeea0ae89dc4bc67d0140c6e68818a12a1/ruff-0.12.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:05ed0c914fabc602fc1f3b42c53aa219e5736cb030cdd85640c32dbc73da74a6", size = 11118435, upload-time = "2025-06-17T15:18:49.064Z" },
1305
- { url = "https://files.pythonhosted.org/packages/07/a2/01a5acf495265c667686ec418f19fd5c32bcc326d4c79ac28824aecd6a32/ruff-0.12.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:07a7aa9b69ac3fcfda3c507916d5d1bca10821fe3797d46bad10f2c6de1edda0", size = 10466010, upload-time = "2025-06-17T15:18:51.341Z" },
1306
- { url = "https://files.pythonhosted.org/packages/4c/57/7caf31dd947d72e7aa06c60ecb19c135cad871a0a8a251723088132ce801/ruff-0.12.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e7731c3eec50af71597243bace7ec6104616ca56dda2b99c89935fe926bdcd48", size = 10661366, upload-time = "2025-06-17T15:18:53.29Z" },
1307
- { url = "https://files.pythonhosted.org/packages/e9/ba/aa393b972a782b4bc9ea121e0e358a18981980856190d7d2b6187f63e03a/ruff-0.12.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:952d0630eae628250ab1c70a7fffb641b03e6b4a2d3f3ec6c1d19b4ab6c6c807", size = 10173492, upload-time = "2025-06-17T15:18:55.262Z" },
1308
- { url = "https://files.pythonhosted.org/packages/d7/50/9349ee777614bc3062fc6b038503a59b2034d09dd259daf8192f56c06720/ruff-0.12.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c021f04ea06966b02614d442e94071781c424ab8e02ec7af2f037b4c1e01cc82", size = 11761739, upload-time = "2025-06-17T15:18:58.906Z" },
1309
- { url = "https://files.pythonhosted.org/packages/04/8f/ad459de67c70ec112e2ba7206841c8f4eb340a03ee6a5cabc159fe558b8e/ruff-0.12.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:7d235618283718ee2fe14db07f954f9b2423700919dc688eacf3f8797a11315c", size = 12537098, upload-time = "2025-06-17T15:19:01.316Z" },
1310
- { url = "https://files.pythonhosted.org/packages/ed/50/15ad9c80ebd3c4819f5bd8883e57329f538704ed57bac680d95cb6627527/ruff-0.12.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c0758038f81beec8cc52ca22de9685b8ae7f7cc18c013ec2050012862cc9165", size = 12154122, upload-time = "2025-06-17T15:19:03.727Z" },
1311
- { url = "https://files.pythonhosted.org/packages/76/e6/79b91e41bc8cc3e78ee95c87093c6cacfa275c786e53c9b11b9358026b3d/ruff-0.12.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:139b3d28027987b78fc8d6cfb61165447bdf3740e650b7c480744873688808c2", size = 11363374, upload-time = "2025-06-17T15:19:05.875Z" },
1312
- { url = "https://files.pythonhosted.org/packages/db/c3/82b292ff8a561850934549aa9dc39e2c4e783ab3c21debe55a495ddf7827/ruff-0.12.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68853e8517b17bba004152aebd9dd77d5213e503a5f2789395b25f26acac0da4", size = 11587647, upload-time = "2025-06-17T15:19:08.246Z" },
1313
- { url = "https://files.pythonhosted.org/packages/2b/42/d5760d742669f285909de1bbf50289baccb647b53e99b8a3b4f7ce1b2001/ruff-0.12.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3a9512af224b9ac4757f7010843771da6b2b0935a9e5e76bb407caa901a1a514", size = 10527284, upload-time = "2025-06-17T15:19:10.37Z" },
1314
- { url = "https://files.pythonhosted.org/packages/19/f6/fcee9935f25a8a8bba4adbae62495c39ef281256693962c2159e8b284c5f/ruff-0.12.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b08df3d96db798e5beb488d4df03011874aff919a97dcc2dd8539bb2be5d6a88", size = 10158609, upload-time = "2025-06-17T15:19:12.286Z" },
1315
- { url = "https://files.pythonhosted.org/packages/37/fb/057febf0eea07b9384787bfe197e8b3384aa05faa0d6bd844b94ceb29945/ruff-0.12.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:6a315992297a7435a66259073681bb0d8647a826b7a6de45c6934b2ca3a9ed51", size = 11141462, upload-time = "2025-06-17T15:19:15.195Z" },
1316
- { url = "https://files.pythonhosted.org/packages/10/7c/1be8571011585914b9d23c95b15d07eec2d2303e94a03df58294bc9274d4/ruff-0.12.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1e55e44e770e061f55a7dbc6e9aed47feea07731d809a3710feda2262d2d4d8a", size = 11641616, upload-time = "2025-06-17T15:19:17.6Z" },
1317
- { url = "https://files.pythonhosted.org/packages/6a/ef/b960ab4818f90ff59e571d03c3f992828d4683561095e80f9ef31f3d58b7/ruff-0.12.0-py3-none-win32.whl", hash = "sha256:7162a4c816f8d1555eb195c46ae0bd819834d2a3f18f98cc63819a7b46f474fb", size = 10525289, upload-time = "2025-06-17T15:19:19.688Z" },
1318
- { url = "https://files.pythonhosted.org/packages/34/93/8b16034d493ef958a500f17cda3496c63a537ce9d5a6479feec9558f1695/ruff-0.12.0-py3-none-win_amd64.whl", hash = "sha256:d00b7a157b8fb6d3827b49d3324da34a1e3f93492c1f97b08e222ad7e9b291e0", size = 11598311, upload-time = "2025-06-17T15:19:21.785Z" },
1319
- { url = "https://files.pythonhosted.org/packages/d0/33/4d3e79e4a84533d6cd526bfb42c020a23256ae5e4265d858bd1287831f7d/ruff-0.12.0-py3-none-win_arm64.whl", hash = "sha256:8cd24580405ad8c1cc64d61725bca091d6b6da7eb3d36f72cc605467069d7e8b", size = 10724946, upload-time = "2025-06-17T15:19:23.952Z" },
1299
+ version = "0.12.1"
1300
+ source = { registry = "https://pypi.org/simple" }
1301
+ sdist = { url = "https://files.pythonhosted.org/packages/97/38/796a101608a90494440856ccfb52b1edae90de0b817e76bfade66b12d320/ruff-0.12.1.tar.gz", hash = "sha256:806bbc17f1104fd57451a98a58df35388ee3ab422e029e8f5cf30aa4af2c138c", size = 4413426, upload-time = "2025-06-26T20:34:14.784Z" }
1302
+ wheels = [
1303
+ { url = "https://files.pythonhosted.org/packages/06/bf/3dba52c1d12ab5e78d75bd78ad52fb85a6a1f29cc447c2423037b82bed0d/ruff-0.12.1-py3-none-linux_armv6l.whl", hash = "sha256:6013a46d865111e2edb71ad692fbb8262e6c172587a57c0669332a449384a36b", size = 10305649, upload-time = "2025-06-26T20:33:39.242Z" },
1304
+ { url = "https://files.pythonhosted.org/packages/8c/65/dab1ba90269bc8c81ce1d499a6517e28fe6f87b2119ec449257d0983cceb/ruff-0.12.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b3f75a19e03a4b0757d1412edb7f27cffb0c700365e9d6b60bc1b68d35bc89e0", size = 11120201, upload-time = "2025-06-26T20:33:42.207Z" },
1305
+ { url = "https://files.pythonhosted.org/packages/3f/3e/2d819ffda01defe857fa2dd4cba4d19109713df4034cc36f06bbf582d62a/ruff-0.12.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:9a256522893cb7e92bb1e1153283927f842dea2e48619c803243dccc8437b8be", size = 10466769, upload-time = "2025-06-26T20:33:44.102Z" },
1306
+ { url = "https://files.pythonhosted.org/packages/63/37/bde4cf84dbd7821c8de56ec4ccc2816bce8125684f7b9e22fe4ad92364de/ruff-0.12.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:069052605fe74c765a5b4272eb89880e0ff7a31e6c0dbf8767203c1fbd31c7ff", size = 10660902, upload-time = "2025-06-26T20:33:45.98Z" },
1307
+ { url = "https://files.pythonhosted.org/packages/0e/3a/390782a9ed1358c95e78ccc745eed1a9d657a537e5c4c4812fce06c8d1a0/ruff-0.12.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a684f125a4fec2d5a6501a466be3841113ba6847827be4573fddf8308b83477d", size = 10167002, upload-time = "2025-06-26T20:33:47.81Z" },
1308
+ { url = "https://files.pythonhosted.org/packages/6d/05/f2d4c965009634830e97ffe733201ec59e4addc5b1c0efa035645baa9e5f/ruff-0.12.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdecdef753bf1e95797593007569d8e1697a54fca843d78f6862f7dc279e23bd", size = 11751522, upload-time = "2025-06-26T20:33:49.857Z" },
1309
+ { url = "https://files.pythonhosted.org/packages/35/4e/4bfc519b5fcd462233f82fc20ef8b1e5ecce476c283b355af92c0935d5d9/ruff-0.12.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:70d52a058c0e7b88b602f575d23596e89bd7d8196437a4148381a3f73fcd5010", size = 12520264, upload-time = "2025-06-26T20:33:52.199Z" },
1310
+ { url = "https://files.pythonhosted.org/packages/85/b2/7756a6925da236b3a31f234b4167397c3e5f91edb861028a631546bad719/ruff-0.12.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84d0a69d1e8d716dfeab22d8d5e7c786b73f2106429a933cee51d7b09f861d4e", size = 12133882, upload-time = "2025-06-26T20:33:54.231Z" },
1311
+ { url = "https://files.pythonhosted.org/packages/dd/00/40da9c66d4a4d51291e619be6757fa65c91b92456ff4f01101593f3a1170/ruff-0.12.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6cc32e863adcf9e71690248607ccdf25252eeeab5193768e6873b901fd441fed", size = 11608941, upload-time = "2025-06-26T20:33:56.202Z" },
1312
+ { url = "https://files.pythonhosted.org/packages/91/e7/f898391cc026a77fbe68dfea5940f8213622474cb848eb30215538a2dadf/ruff-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7fd49a4619f90d5afc65cf42e07b6ae98bb454fd5029d03b306bd9e2273d44cc", size = 11602887, upload-time = "2025-06-26T20:33:58.47Z" },
1313
+ { url = "https://files.pythonhosted.org/packages/f6/02/0891872fc6aab8678084f4cf8826f85c5d2d24aa9114092139a38123f94b/ruff-0.12.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:ed5af6aaaea20710e77698e2055b9ff9b3494891e1b24d26c07055459bb717e9", size = 10521742, upload-time = "2025-06-26T20:34:00.465Z" },
1314
+ { url = "https://files.pythonhosted.org/packages/2a/98/d6534322c74a7d47b0f33b036b2498ccac99d8d8c40edadb552c038cecf1/ruff-0.12.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:801d626de15e6bf988fbe7ce59b303a914ff9c616d5866f8c79eb5012720ae13", size = 10149909, upload-time = "2025-06-26T20:34:02.603Z" },
1315
+ { url = "https://files.pythonhosted.org/packages/34/5c/9b7ba8c19a31e2b6bd5e31aa1e65b533208a30512f118805371dbbbdf6a9/ruff-0.12.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:2be9d32a147f98a1972c1e4df9a6956d612ca5f5578536814372113d09a27a6c", size = 11136005, upload-time = "2025-06-26T20:34:04.723Z" },
1316
+ { url = "https://files.pythonhosted.org/packages/dc/34/9bbefa4d0ff2c000e4e533f591499f6b834346025e11da97f4ded21cb23e/ruff-0.12.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:49b7ce354eed2a322fbaea80168c902de9504e6e174fd501e9447cad0232f9e6", size = 11648579, upload-time = "2025-06-26T20:34:06.766Z" },
1317
+ { url = "https://files.pythonhosted.org/packages/6f/1c/20cdb593783f8f411839ce749ec9ae9e4298c2b2079b40295c3e6e2089e1/ruff-0.12.1-py3-none-win32.whl", hash = "sha256:d973fa626d4c8267848755bd0414211a456e99e125dcab147f24daa9e991a245", size = 10519495, upload-time = "2025-06-26T20:34:08.718Z" },
1318
+ { url = "https://files.pythonhosted.org/packages/cf/56/7158bd8d3cf16394928f47c637d39a7d532268cd45220bdb6cd622985760/ruff-0.12.1-py3-none-win_amd64.whl", hash = "sha256:9e1123b1c033f77bd2590e4c1fe7e8ea72ef990a85d2484351d408224d603013", size = 11547485, upload-time = "2025-06-26T20:34:11.008Z" },
1319
+ { url = "https://files.pythonhosted.org/packages/91/d0/6902c0d017259439d6fd2fd9393cea1cfe30169940118b007d5e0ea7e954/ruff-0.12.1-py3-none-win_arm64.whl", hash = "sha256:78ad09a022c64c13cc6077707f036bab0fac8cd7088772dcd1e5be21c5002efc", size = 10691209, upload-time = "2025-06-26T20:34:12.928Z" },
1320
1320
  ]
1321
1321
 
1322
1322
  [[package]]
@@ -1635,7 +1635,7 @@ wheels = [
1635
1635
 
1636
1636
  [[package]]
1637
1637
  name = "txt2ebook"
1638
- version = "0.1.145"
1638
+ version = "0.1.146"
1639
1639
  source = { editable = "." }
1640
1640
  dependencies = [
1641
1641
  { name = "bs4" },
@@ -1,28 +0,0 @@
1
- # pylint: disable=C0114,C0116
2
- import argparse
3
-
4
- import pytest
5
-
6
-
7
- @pytest.fixture(name="config")
8
- def fixture_config():
9
- return argparse.Namespace(
10
- **{
11
- "title": False,
12
- "author": False,
13
- "cover": None,
14
- "paragraph_separator": "\n\n",
15
- "re_delete": False,
16
- "re_replace": False,
17
- "re_delete_line": False,
18
- "re_volume_chapter": (),
19
- "re_volume": (),
20
- "re_chapter": (),
21
- "re_title": (),
22
- "re_author": (),
23
- "no_wrapping": False,
24
- "raise_on_warning": False,
25
- "width": False,
26
- "language": "zh-cn",
27
- }
28
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes