txt2ebook 0.1.37__tar.gz → 0.1.38__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.37 → txt2ebook-0.1.38}/CHANGELOG.md +10 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/PKG-INFO +1 -6
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/pyproject.toml +3 -1
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/__init__.py +1 -1
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/pdf.py +3 -4
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po +2 -2
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/locales/txt2ebook.pot +2 -2
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po +2 -2
- txt2ebook-0.1.38/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po +25 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/CONTRIBUTING.md +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/LICENSE.md +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/README.md +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/__main__.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/exceptions.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/__init__.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/base.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/epub.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/md.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/templates/__init__.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/templates/epub/__init__.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/templates/epub/clean.css +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/templates/epub/condense.css +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/templates/epub/noindent.css +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/formats/txt.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/helpers/__init__.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/languages/__init__.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/languages/en.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/languages/zh_cn.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/languages/zh_tw.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.mo +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.mo +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/models/__init__.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/models/book.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/models/chapter.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/models/volume.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/parser.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/tokenizer.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/txt2ebook.py +0 -0
- {txt2ebook-0.1.37 → txt2ebook-0.1.38}/src/txt2ebook/zh_utils.py +0 -0
@@ -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.38 - 2023-06-04
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Add `zh-tw` translations
|
15
|
+
|
16
|
+
### Updated
|
17
|
+
|
18
|
+
- Update deprecating call of script_runner in tests
|
19
|
+
|
10
20
|
## v0.1.37 - 2023-05-28
|
11
21
|
|
12
22
|
### Added
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: txt2ebook
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.38
|
4
4
|
Summary: CLI tool to convert txt file to ebook format
|
5
5
|
Home-page: https://github.com/kianmeng/txt2ebook
|
6
6
|
License: AGPL-3.0-or-later
|
@@ -21,11 +21,6 @@ Classifier: Programming Language :: Python :: 3.9
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.10
|
22
22
|
Classifier: Programming Language :: Python :: 3.11
|
23
23
|
Classifier: Programming Language :: Python :: 3 :: Only
|
24
|
-
Classifier: Programming Language :: Python :: 3.10
|
25
|
-
Classifier: Programming Language :: Python :: 3.11
|
26
|
-
Classifier: Programming Language :: Python :: 3.7
|
27
|
-
Classifier: Programming Language :: Python :: 3.8
|
28
|
-
Classifier: Programming Language :: Python :: 3.9
|
29
24
|
Classifier: Topic :: Text Processing
|
30
25
|
Classifier: Topic :: Text Processing :: Filters
|
31
26
|
Classifier: Topic :: Text Processing :: General
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "txt2ebook"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.38"
|
4
4
|
description = "CLI tool to convert txt file to ebook format"
|
5
5
|
authors = ["Kian-Meng Ang <kianmeng@cpan.org>"]
|
6
6
|
license = "AGPL-3.0-or-later"
|
@@ -126,6 +126,8 @@ commands =
|
|
126
126
|
pygettext3 -d txt2ebook -o {toxinidir}/src/txt2ebook/locales/txt2ebook.pot {toxinidir}/src/txt2ebook/
|
127
127
|
msgmerge --update {toxinidir}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po {toxinidir}/src/txt2ebook/locales/txt2ebook.pot
|
128
128
|
msgmerge --update {toxinidir}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po {toxinidir}/src/txt2ebook/locales/txt2ebook.pot
|
129
|
+
msgmerge --update {toxinidir}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po {toxinidir}/src/txt2ebook/locales/txt2ebook.pot
|
129
130
|
msgfmt -o {toxinidir}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.mo {toxinidir}/src/txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po
|
130
131
|
msgfmt -o {toxinidir}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.mo {toxinidir}/src/txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po
|
132
|
+
msgfmt -o {toxinidir}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.mo {toxinidir}/src/txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po
|
131
133
|
"""
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"""Convert and back source text file into text as well."""
|
17
17
|
|
18
18
|
import logging
|
19
|
-
from typing import List
|
19
|
+
from typing import List, Tuple
|
20
20
|
|
21
21
|
import reportlab
|
22
22
|
from reportlab.lib.enums import TA_RIGHT
|
@@ -145,8 +145,7 @@ class PdfWriter(BaseWriter):
|
|
145
145
|
)
|
146
146
|
|
147
147
|
if self.config.debug:
|
148
|
-
|
149
|
-
style.borderColor="#000000",
|
148
|
+
style.borderColor = "#000000"
|
150
149
|
|
151
150
|
footer = Paragraph(f"{doc.page}", style=style)
|
152
151
|
_width, _height = footer.wrap(doc.width, doc.bottomMargin)
|
@@ -154,7 +153,7 @@ class PdfWriter(BaseWriter):
|
|
154
153
|
|
155
154
|
canvas.restoreState()
|
156
155
|
|
157
|
-
def _get_pagesize(self) ->
|
156
|
+
def _get_pagesize(self) -> Tuple:
|
158
157
|
page_size = (
|
159
158
|
self.config.page_size or self.langconf.DEFAULT_PDF_PAGE_SIZE
|
160
159
|
)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
msgid ""
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: PACKAGE VERSION\n"
|
8
|
-
"POT-Creation-Date: 2023-05-
|
8
|
+
"POT-Creation-Date: 2023-05-29 23:40+0800\n"
|
9
9
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
10
10
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
11
11
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -24,7 +24,7 @@ msgid "metadata"
|
|
24
24
|
msgstr "Metadata"
|
25
25
|
|
26
26
|
#: src/txt2ebook/formats/md.py:58 src/txt2ebook/formats/md.py:126
|
27
|
-
#: src/txt2ebook/formats/pdf.py:
|
27
|
+
#: src/txt2ebook/formats/pdf.py:131 src/txt2ebook/formats/txt.py:68
|
28
28
|
#: src/txt2ebook/formats/txt.py:155
|
29
29
|
msgid "toc"
|
30
30
|
msgstr "Table of Content"
|
@@ -5,7 +5,7 @@
|
|
5
5
|
msgid ""
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: PACKAGE VERSION\n"
|
8
|
-
"POT-Creation-Date: 2023-05-
|
8
|
+
"POT-Creation-Date: 2023-05-29 23:41+0800\n"
|
9
9
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
10
10
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
11
11
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -24,7 +24,7 @@ msgid "metadata"
|
|
24
24
|
msgstr ""
|
25
25
|
|
26
26
|
#: src/txt2ebook/formats/md.py:58 src/txt2ebook/formats/md.py:126
|
27
|
-
#: src/txt2ebook/formats/pdf.py:
|
27
|
+
#: src/txt2ebook/formats/pdf.py:131 src/txt2ebook/formats/txt.py:68
|
28
28
|
#: src/txt2ebook/formats/txt.py:155
|
29
29
|
msgid "toc"
|
30
30
|
msgstr ""
|
@@ -5,7 +5,7 @@
|
|
5
5
|
msgid ""
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: \n"
|
8
|
-
"POT-Creation-Date: 2023-05-
|
8
|
+
"POT-Creation-Date: 2023-05-29 23:40+0800\n"
|
9
9
|
"PO-Revision-Date: 2023-01-14 18:07+0800\n"
|
10
10
|
"Last-Translator: \n"
|
11
11
|
"Language-Team: \n"
|
@@ -25,7 +25,7 @@ msgid "metadata"
|
|
25
25
|
msgstr "元数据"
|
26
26
|
|
27
27
|
#: src/txt2ebook/formats/md.py:58 src/txt2ebook/formats/md.py:126
|
28
|
-
#: src/txt2ebook/formats/pdf.py:
|
28
|
+
#: src/txt2ebook/formats/pdf.py:131 src/txt2ebook/formats/txt.py:68
|
29
29
|
#: src/txt2ebook/formats/txt.py:155
|
30
30
|
msgid "toc"
|
31
31
|
msgstr "目录"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#: src/txt2ebook/formats/epub.py:142
|
2
|
+
msgid "cover"
|
3
|
+
msgstr ""
|
4
|
+
|
5
|
+
#: src/txt2ebook/formats/md.py:45 src/txt2ebook/formats/txt.py:55
|
6
|
+
msgid "metadata"
|
7
|
+
msgstr ""
|
8
|
+
|
9
|
+
#: src/txt2ebook/formats/md.py:58 src/txt2ebook/formats/md.py:126
|
10
|
+
#: src/txt2ebook/formats/pdf.py:131 src/txt2ebook/formats/txt.py:68
|
11
|
+
#: src/txt2ebook/formats/txt.py:155
|
12
|
+
msgid "toc"
|
13
|
+
msgstr ""
|
14
|
+
|
15
|
+
#: src/txt2ebook/formats/md.py:140 src/txt2ebook/formats/txt.py:169
|
16
|
+
msgid "title:"
|
17
|
+
msgstr ""
|
18
|
+
|
19
|
+
#: src/txt2ebook/formats/md.py:141 src/txt2ebook/formats/txt.py:170
|
20
|
+
msgid "author:"
|
21
|
+
msgstr ""
|
22
|
+
|
23
|
+
#: src/txt2ebook/formats/md.py:142 src/txt2ebook/formats/txt.py:171
|
24
|
+
msgid "tag:"
|
25
|
+
msgstr ""
|
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
|