txt2ebook 0.1.137__tar.gz → 0.1.138__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 (111) hide show
  1. txt2ebook-0.1.138/.coveragerc +18 -0
  2. txt2ebook-0.1.138/.gitignore +150 -0
  3. txt2ebook-0.1.138/.pre-commit-config.yaml +111 -0
  4. txt2ebook-0.1.138/.python-version +5 -0
  5. txt2ebook-0.1.138/CHANGELOG.md +1034 -0
  6. txt2ebook-0.1.138/CONTRIBUTING.md +124 -0
  7. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/PKG-INFO +23 -25
  8. txt2ebook-0.1.138/docs/Makefile +24 -0
  9. txt2ebook-0.1.138/docs/make.bat +35 -0
  10. txt2ebook-0.1.138/docs/source/CHANGELOG.md +1 -0
  11. txt2ebook-0.1.138/docs/source/CONTRIBUTING.md +1 -0
  12. txt2ebook-0.1.138/docs/source/LICENSE.md +1 -0
  13. txt2ebook-0.1.138/docs/source/README.md +1 -0
  14. txt2ebook-0.1.138/docs/source/_static/logo.png +0 -0
  15. txt2ebook-0.1.138/docs/source/conf.py +77 -0
  16. txt2ebook-0.1.138/docs/source/index.rst +11 -0
  17. txt2ebook-0.1.138/docs/source/txt2ebook.formats.rst +29 -0
  18. txt2ebook-0.1.138/docs/source/txt2ebook.helpers.rst +10 -0
  19. txt2ebook-0.1.138/docs/source/txt2ebook.models.rst +37 -0
  20. txt2ebook-0.1.138/docs/source/txt2ebook.parsers.rst +45 -0
  21. txt2ebook-0.1.138/docs/source/txt2ebook.rst +32 -0
  22. txt2ebook-0.1.138/noxfile.py +229 -0
  23. txt2ebook-0.1.138/pyproject.toml +83 -0
  24. txt2ebook-0.1.138/tests/__init__.py +0 -0
  25. txt2ebook-0.1.138/tests/conftest.py +57 -0
  26. txt2ebook-0.1.138/tests/fixtures/empty_file.txt +0 -0
  27. txt2ebook-0.1.138/tests/fixtures/missing_chapters.txt +6 -0
  28. txt2ebook-0.1.138/tests/fixtures/sample.txt +27 -0
  29. txt2ebook-0.1.138/tests/fixtures/sample_all_headers.txt +31 -0
  30. txt2ebook-0.1.138/tests/fixtures/sample_long_headers.txt +35 -0
  31. txt2ebook-0.1.138/tests/fixtures/sample_remove_wrapping.txt +52 -0
  32. txt2ebook-0.1.138/tests/fixtures/sample_unsorted_headers.txt +33 -0
  33. txt2ebook-0.1.138/tests/fixtures/sample_with_issues.txt +15 -0
  34. txt2ebook-0.1.138/tests/fixtures/sample_with_metadata.txt +25 -0
  35. txt2ebook-0.1.138/tests/test_epub_writer.py +28 -0
  36. txt2ebook-0.1.138/tests/test_filename_format_flag.py +34 -0
  37. txt2ebook-0.1.138/tests/test_format_option.py +48 -0
  38. txt2ebook-0.1.138/tests/test_header_number_flag.py +33 -0
  39. txt2ebook-0.1.138/tests/test_input_file_arg.py +15 -0
  40. txt2ebook-0.1.138/tests/test_language_option.py +20 -0
  41. txt2ebook-0.1.138/tests/test_output_file_arg.py +21 -0
  42. txt2ebook-0.1.138/tests/test_overwrite_flag.py +10 -0
  43. txt2ebook-0.1.138/tests/test_parser.py +81 -0
  44. txt2ebook-0.1.138/tests/test_purge_flag.py +36 -0
  45. txt2ebook-0.1.138/tests/test_quiet_flag.py +11 -0
  46. txt2ebook-0.1.138/tests/test_raise_warnings.py +11 -0
  47. txt2ebook-0.1.138/tests/test_sort_volume_and_chapter_flag.py +31 -0
  48. txt2ebook-0.1.138/tests/test_split_volume_and_chapter_flag.py +38 -0
  49. txt2ebook-0.1.138/tests/test_subcommand_env.py +10 -0
  50. txt2ebook-0.1.138/tests/test_subcommand_epub.py +34 -0
  51. txt2ebook-0.1.138/tests/test_subcommand_massage.py +36 -0
  52. txt2ebook-0.1.138/tests/test_test_parsing_flag.py +15 -0
  53. txt2ebook-0.1.138/tests/test_tokenizer.py +114 -0
  54. txt2ebook-0.1.138/tests/test_translator_option.py +17 -0
  55. txt2ebook-0.1.138/tests/test_txt2ebook.py +8 -0
  56. txt2ebook-0.1.138/tests/test_verbose_flag.py +79 -0
  57. txt2ebook-0.1.138/tests/test_volume_page_flag.py +10 -0
  58. txt2ebook-0.1.138/tests/test_zh_utils_zh_halfwidth_to_fullwidth.py +8 -0
  59. txt2ebook-0.1.138/tests/test_zh_utils_zh_numeric.py +46 -0
  60. txt2ebook-0.1.138/tests/test_zh_utils_zh_words_to_numbers.py +29 -0
  61. txt2ebook-0.1.138/uv.lock +1627 -0
  62. txt2ebook-0.1.137/pyproject.toml +0 -76
  63. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/LICENSE.md +0 -0
  64. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/README.md +0 -0
  65. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/__init__.py +0 -0
  66. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/__main__.py +0 -0
  67. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/cli.py +0 -0
  68. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/exceptions.py +0 -0
  69. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/__init__.py +0 -0
  70. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/base.py +0 -0
  71. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/epub.py +0 -0
  72. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/gmi.py +0 -0
  73. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/md.py +0 -0
  74. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/pdf.py +0 -0
  75. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/templates/__init__.py +0 -0
  76. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/templates/epub/__init__.py +0 -0
  77. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/templates/epub/clean.css +0 -0
  78. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/templates/epub/condense.css +0 -0
  79. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/templates/epub/noindent.css +0 -0
  80. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/tex.py +0 -0
  81. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/txt.py +0 -0
  82. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/formats/typ.py +0 -0
  83. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/helpers/__init__.py +0 -0
  84. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/languages/__init__.py +0 -0
  85. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/languages/en.py +0 -0
  86. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/languages/zh_cn.py +0 -0
  87. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/languages/zh_tw.py +0 -0
  88. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.mo +0 -0
  89. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po +0 -0
  90. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/locales/txt2ebook.pot +0 -0
  91. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.mo +0 -0
  92. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po +0 -0
  93. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.mo +0 -0
  94. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po +0 -0
  95. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/models/__init__.py +0 -0
  96. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/models/book.py +0 -0
  97. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/models/chapter.py +0 -0
  98. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/models/volume.py +0 -0
  99. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/parser.py +0 -0
  100. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/__init__.py +0 -0
  101. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/env.py +0 -0
  102. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/epub.py +0 -0
  103. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/gmi.py +0 -0
  104. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/massage.py +0 -0
  105. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/md.py +0 -0
  106. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/parse.py +0 -0
  107. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/pdf.py +0 -0
  108. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/tex.py +0 -0
  109. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/subcommands/typ.py +0 -0
  110. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/tokenizer.py +0 -0
  111. {txt2ebook-0.1.137 → txt2ebook-0.1.138}/src/txt2ebook/zh_utils.py +0 -0
@@ -0,0 +1,18 @@
1
+ [run]
2
+ parallel = true
3
+ sigterm = true
4
+ source = txt2ebook
5
+ omit =
6
+ */src/txt2ebook/__main__.py
7
+
8
+ [report]
9
+ fail_under = 100
10
+ ignore_errors = True
11
+ show_missing = True
12
+ skip_covered = True
13
+ sort = Cover
14
+ exclude_also =
15
+ def __repr__
16
+
17
+ [html]
18
+ directory = cover
@@ -0,0 +1,150 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ # *.mo
56
+ # *.pot
57
+
58
+ # Created by msgmerge
59
+ *.po~
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ #.python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
99
+ __pypackages__/
100
+
101
+ # Celery stuff
102
+ celerybeat-schedule
103
+ celerybeat.pid
104
+
105
+ # SageMath parsed files
106
+ *.sage.py
107
+
108
+ # Environments
109
+ .env
110
+ .venv
111
+ env/
112
+ venv/
113
+ ENV/
114
+ env.bak/
115
+ venv.bak/
116
+
117
+ # Spyder project settings
118
+ .spyderproject
119
+ .spyproject
120
+
121
+ # Rope project settings
122
+ .ropeproject
123
+
124
+ # mkdocs documentation
125
+ /site
126
+
127
+ # mypy
128
+ .mypy_cache/
129
+ mypy/
130
+ .dmypy.json
131
+ dmypy.json
132
+
133
+ # Pyre type checker
134
+ .pyre/
135
+
136
+ # pytype static type analyzer
137
+ .pytype/
138
+
139
+ # Cython debug symbols
140
+ cython_debug/
141
+
142
+ # Misc.
143
+ *.bak.txt
144
+ *.epub
145
+ *.lprof
146
+ *.pdf
147
+ *.prof
148
+ *.sqlite3
149
+ .aider*
150
+ TODO
@@ -0,0 +1,111 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: check-case-conflict
8
+ - id: check-merge-conflict
9
+ - id: check-toml
10
+ - id: check-yaml
11
+ - id: debug-statements
12
+ - id: detect-private-key
13
+ - id: end-of-file-fixer
14
+ exclude: "locales/.*$"
15
+ - id: mixed-line-ending
16
+ - id: trailing-whitespace
17
+
18
+ - repo: https://github.com/abravalheri/validate-pyproject
19
+ rev: v0.24.1
20
+ hooks:
21
+ - id: validate-pyproject
22
+ name: validate pyproject
23
+
24
+ - repo: https://github.com/codespell-project/codespell
25
+ rev: v2.4.1
26
+ hooks:
27
+ - id: codespell
28
+ args:
29
+ - --skip=poetry.lock
30
+
31
+ - repo: https://github.com/pre-commit/mirrors-prettier
32
+ rev: v4.0.0-alpha.8
33
+ hooks:
34
+ - id: prettier
35
+ exclude: (poetry.lock)
36
+
37
+ - repo: https://github.com/pycqa/isort
38
+ rev: 6.0.1
39
+ hooks:
40
+ - id: isort
41
+ additional_dependencies:
42
+ - isort[pyproject]
43
+ args:
44
+ - --profile=black
45
+ - --line-length=79
46
+ - --py=312
47
+
48
+ - repo: https://github.com/psf/black-pre-commit-mirror
49
+ rev: 25.1.0
50
+ hooks:
51
+ - id: black
52
+ args:
53
+ - --line-length=79
54
+ - --target-version=py38
55
+ - --target-version=py39
56
+ - --target-version=py310
57
+ - --target-version=py311
58
+ - --target-version=py312
59
+
60
+ - repo: https://github.com/asottile/blacken-docs
61
+ rev: 1.19.1
62
+ hooks:
63
+ - id: blacken-docs
64
+ additional_dependencies:
65
+ - black==22.8.0
66
+
67
+ - repo: https://github.com/PyCQA/autoflake
68
+ rev: v2.3.1
69
+ hooks:
70
+ - id: autoflake
71
+ args:
72
+ - --in-place
73
+ - --remove-unused-variables
74
+ - --remove-all-unused-imports
75
+ language: python
76
+ files: \.py$
77
+
78
+ - repo: https://github.com/PyCQA/flake8
79
+ rev: 7.2.0
80
+ hooks:
81
+ - id: flake8
82
+ exclude: docs/
83
+ additional_dependencies:
84
+ - flake8-docstrings
85
+ - flake8-print
86
+ - flake8-pytest-style
87
+ - flake8-simplify
88
+ args:
89
+ - --docstring-convention=google
90
+ - --show-source
91
+ - --max-line-length=79
92
+ - --docstring-convention=google
93
+ - --per-file-ignores=src/*:D212,D208,T201 tests/*:ANN101,ANN201,D100,D103,D104,E501
94
+
95
+ - repo: local
96
+ hooks:
97
+ - id: pylint
98
+ name: pylint
99
+ entry: pylint
100
+ language: system
101
+ types:
102
+ - python
103
+ exclude: docs/
104
+ args:
105
+ - --disable=C0114,R0801,R0902,R0903,R0912,R0914,R0915
106
+
107
+ - repo: https://github.com/pre-commit/mirrors-mypy
108
+ rev: v1.15.0
109
+ hooks:
110
+ - id: mypy
111
+ exclude: docs/
@@ -0,0 +1,5 @@
1
+ 3.9
2
+ 3.10
3
+ 3.11
4
+ 3.12
5
+ 3.13