txt2ebook 0.1.37__py3-none-any.whl → 0.1.38__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
CHANGELOG.md CHANGED
@@ -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
txt2ebook/__init__.py CHANGED
@@ -21,7 +21,7 @@ import sys
21
21
 
22
22
  logger = logging.getLogger(__name__)
23
23
 
24
- __version__ = "0.1.37"
24
+ __version__ = "0.1.38"
25
25
 
26
26
 
27
27
  def setup_logger(config: argparse.Namespace) -> None:
txt2ebook/formats/pdf.py CHANGED
@@ -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
- borderWidth=1,
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) -> None:
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-22 05:43+0800\n"
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:76 src/txt2ebook/formats/txt.py:68
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-22 05:47+0800\n"
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:76 src/txt2ebook/formats/txt.py:68
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-22 05:43+0800\n"
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:76 src/txt2ebook/formats/txt.py:68
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 ""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: txt2ebook
3
- Version: 0.1.37
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,14 +1,14 @@
1
- CHANGELOG.md,sha256=yPBUThTgGLr8Hr-sjBJUM26b94AK2-w-BOPsjPAKVEo,16619
1
+ CHANGELOG.md,sha256=Voar7eK2duCzpoO5KJoMydz2FEDZRujOi0JiSgWiWOM,16749
2
2
  CONTRIBUTING.md,sha256=vaIsyeLVLLXOx3pVhOyNAzn4R74tbCnMb_1p8ak7Eug,1966
3
3
  LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
4
- txt2ebook/__init__.py,sha256=ddht3iOpdP9ROHRT5nGPaR_tcUW19A14GBV-wrS6PSM,1649
4
+ txt2ebook/__init__.py,sha256=B8GlmNAI8e-GObpfpgixbZAbNOqUabioQHT0i7LMoT8,1649
5
5
  txt2ebook/__main__.py,sha256=69yaheH-Fv2VIPS0T9kiVmiMluSgLGvwo1fa7badX2I,845
6
6
  txt2ebook/exceptions.py,sha256=Y6rqjXhiKIxNeKWVqvAqsUAOaBFKxlUE5Tm5EBcoi9w,837
7
7
  txt2ebook/formats/__init__.py,sha256=d9eNgHNMsSZYknt_AW59mFe9PJ12pyDGzrEeai5wjQo,2254
8
8
  txt2ebook/formats/base.py,sha256=gmOyrOgmCxyw1MsD1ZLTJ1vIGTHnObPaehzoucZfI8M,3362
9
9
  txt2ebook/formats/epub.py,sha256=NOo6aYeAFeghhum1lneGCcMzsZErQlqwoSegx2G6Sps,6788
10
10
  txt2ebook/formats/md.py,sha256=WPF-GAdiNB_B_Ak80OGDK2XMTxLcxljI1jYUb8cQFLE,6561
11
- txt2ebook/formats/pdf.py,sha256=9iL9K-8mElChGt9Y7Ej8ai8Gk7vxd6yfk582pltGkd8,7048
11
+ txt2ebook/formats/pdf.py,sha256=xTMAAkYXEWOgOPlJax8M5Y-5_H43PgwoqwqJVUNhK6w,7030
12
12
  txt2ebook/formats/templates/__init__.py,sha256=0Hhm7Dayb7eB9h2cFo2103H4Tr6ie0ySMZ5gR01q6ag,750
13
13
  txt2ebook/formats/templates/epub/__init__.py,sha256=O2sdWRhkuamReBR20WedGWosLp8Dt8NZ33aXzyNQuLQ,756
14
14
  txt2ebook/formats/templates/epub/clean.css,sha256=AnEwMckzUSKcjKsDiWtJW1oaceuklt2tyuS1VbpVK1s,462
@@ -21,10 +21,11 @@ txt2ebook/languages/en.py,sha256=xCIhL431eUgoGwci4LCBkso8bR2LBhxKqWCPczKKoJQ,915
21
21
  txt2ebook/languages/zh_cn.py,sha256=rfAXIlDcWe6SiqFFQp_ShCKIDX3lZ85pjKkxF4JXiQU,1878
22
22
  txt2ebook/languages/zh_tw.py,sha256=UyZQ8RYiSTaIXjk8W3GHaspdIEHclTtjRAoEk1X8XVw,1374
23
23
  txt2ebook/locales/en/LC_MESSAGES/txt2ebook.mo,sha256=z36DCUIbIycBGbC9Pm-3O8BdaQSQeN53_whv7IliEKU,564
24
- txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po,sha256=5avWMoU-LOIliXesOH-ZTsO-PFOT2oR8aX6oniJAhVA,1162
25
- txt2ebook/locales/txt2ebook.pot,sha256=yy6mq_H17Kis_xDOAD0sImda_OC8KalX6zA0WAyYRmY,1103
24
+ txt2ebook/locales/en/LC_MESSAGES/txt2ebook.po,sha256=sf1xgWDtu1xg7izUDZ4G7ZfowZhnOwQhi11A7cHsN6c,1163
25
+ txt2ebook/locales/txt2ebook.pot,sha256=FezHPYbi8wF7KA544uAODAKU7HLNEXjMkch8m8GX9E8,1104
26
26
  txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.mo,sha256=4S0znfoLRUmTAzvLyIV1tEXiHo-A3mAAzvpJ39Ga4mk,534
27
- txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po,sha256=0A9hf72gpzWQ6Cli_8sIaipOIzS4267GJUiZst43P6I,1136
27
+ txt2ebook/locales/zh-cn/LC_MESSAGES/txt2ebook.po,sha256=9Gn4LYSeUVf_gx1Og2I3lH9pSdM-KJQpF6X6oO_pxPM,1137
28
+ txt2ebook/locales/zh-tw/LC_MESSAGES/txt2ebook.po,sha256=OiUV2w_J79aqpME59LiClOUjGaTxHS13dDPCoMsqLg8,629
28
29
  txt2ebook/models/__init__.py,sha256=oHf4YvkEV7qKHhHiGxl4m95DSJ3zSIW2uJQec-BwXrc,920
29
30
  txt2ebook/models/book.py,sha256=PlnMweqZIvMYsVpr5g7Moi9BiXEfprqwZNsmEbzB6eY,2691
30
31
  txt2ebook/models/chapter.py,sha256=PhPHraG3QNgY4C-USAzTDpDPVNsvTL8yC3r2iTW42KU,1676
@@ -33,8 +34,8 @@ txt2ebook/parser.py,sha256=AK3rkY9uItu7AJQnl2b5sMroqJgbxxQdKsOAEfo3nXU,11929
33
34
  txt2ebook/tokenizer.py,sha256=lsgGZSVpKl5fC6eEf8eIrGKZIVQnLqKM1Kenn4xJ-u4,9263
34
35
  txt2ebook/txt2ebook.py,sha256=LOWS-3ys-COPvLcBC0rKhwB3krM4Kpvetql31vVHGLg,11211
35
36
  txt2ebook/zh_utils.py,sha256=CM6SnsQhJWzSevcJWQ_9Pj028JUGbG3v0AG6xK_KgBY,4877
36
- txt2ebook-0.1.37.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
37
- txt2ebook-0.1.37.dist-info/METADATA,sha256=GLz3PdOzTwn7LPZa2iUygz_PxpHnDlbSiCOCWQ6mP84,6541
38
- txt2ebook-0.1.37.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
39
- txt2ebook-0.1.37.dist-info/entry_points.txt,sha256=IQHyIIhd0MHjSSRVC1a6tMeIoLus8D06KHL_cumvEbg,83
40
- txt2ebook-0.1.37.dist-info/RECORD,,
37
+ txt2ebook-0.1.38.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
38
+ txt2ebook-0.1.38.dist-info/METADATA,sha256=kL2fmoBh9szh-WZkrHGYAmn3un5JmrR6HEcu8-QhUl8,6289
39
+ txt2ebook-0.1.38.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
40
+ txt2ebook-0.1.38.dist-info/entry_points.txt,sha256=IQHyIIhd0MHjSSRVC1a6tMeIoLus8D06KHL_cumvEbg,83
41
+ txt2ebook-0.1.38.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.5.2
2
+ Generator: poetry-core 1.6.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any