txt2ebook 0.1.70__py3-none-any.whl → 0.1.72__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.
txt2ebook/__init__.py CHANGED
@@ -21,7 +21,7 @@ import sys
21
21
 
22
22
  logger = logging.getLogger(__name__)
23
23
 
24
- __version__ = "0.1.70"
24
+ __version__ = "0.1.72"
25
25
 
26
26
 
27
27
  def setup_logger(config: argparse.Namespace) -> None:
txt2ebook/formats/typ.py CHANGED
@@ -67,7 +67,7 @@ class TypWriter(BaseWriter):
67
67
  def _to_cover(self) -> str:
68
68
  return textwrap.dedent(
69
69
  f"""
70
- #set page(paper: "a5", numbering: none)
70
+ #set page(paper: {self.config.page_size}, numbering: none)
71
71
  #align(center, text(17pt)[{self.book.title}])
72
72
  #pagebreak()
73
73
 
@@ -77,8 +77,8 @@ class TypWriter(BaseWriter):
77
77
  def _to_outline(self) -> str:
78
78
  return (
79
79
  textwrap.dedent(
80
- """
81
- #set page(paper: "a5", numbering: none)
80
+ f"""
81
+ #set page(paper: {self.config.page_size}, numbering: none)
82
82
  #outline(title: [目录], indent: 2em,)
83
83
  #pagebreak()
84
84
  """
@@ -89,9 +89,9 @@ class TypWriter(BaseWriter):
89
89
 
90
90
  def _to_metadata_typ(self) -> str:
91
91
  return textwrap.dedent(
92
- """
92
+ f"""
93
93
  #set page(
94
- paper: "a5",
94
+ paper: {self.config.page_size},
95
95
  margin: (x: 2.5cm, y: 2.5cm),
96
96
  numbering: "1",
97
97
  number-align: right,
txt2ebook/txt2ebook.py CHANGED
@@ -235,7 +235,7 @@ def build_parser(
235
235
  "-pz",
236
236
  "--page-size",
237
237
  dest="page_size",
238
- default=None,
238
+ default="a5",
239
239
  choices=PAGE_SIZES,
240
240
  help="page size of the ebook (default: '%(default)s')",
241
241
  metavar="PAGE_SIZE",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: txt2ebook
3
- Version: 0.1.70
3
+ Version: 0.1.72
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
@@ -51,6 +51,12 @@ Stable version From PyPI:
51
51
  python3 -m pip install txt2ebook
52
52
  ```
53
53
 
54
+ Upgrade to latest stable version:
55
+
56
+ ```console
57
+ python3 -m pip install txt2ebook --upgrade
58
+ ```
59
+
54
60
  Latest development version from GitHub:
55
61
 
56
62
  ```console
@@ -66,8 +72,7 @@ txt2ebook --help
66
72
  ```
67
73
 
68
74
  ```console
69
-
70
- usage: txt2ebook [-of OUTPUT_FOLDER] [-p] [-f {epub,gmi,md,pdf,txt,typ
75
+ usage: txt2ebook [-of OUTPUT_FOLDER] [-p] [-f {epub,gmi,md,pdf,txt,typ}]
71
76
  [-t TITLE] [-l LANGUAGE] [-a AUTHOR] [-tr TRANSLATOR]
72
77
  [-c IMAGE_FILENAME] [-w WIDTH] [-ff FILENAME_FORMAT]
73
78
  [-ps SEPARATOR] [-pz PAGE_SIZE] [-rd REGEX] [-rvc REGEX]
@@ -157,7 +162,7 @@ optional arguments:
157
162
 
158
163
  --format pdf:
159
164
  -pz PAGE_SIZE, --page-size PAGE_SIZE
160
- page size of the ebook (default: 'None')
165
+ page size of the ebook (default: 'a5')
161
166
 
162
167
  --format txt:
163
168
  -w WIDTH, --width WIDTH
@@ -1,4 +1,4 @@
1
- txt2ebook/__init__.py,sha256=btQ9brh9kWsjMIQsGbTLRXBOfTlxFloRedsac0yoWu8,1765
1
+ txt2ebook/__init__.py,sha256=aHYQyJV3tKexGjkhyLTLNjsYszMJBHLknabj0Pg5eCY,1765
2
2
  txt2ebook/__main__.py,sha256=gMLvgpqc_BL4cBqNe0vqErRF5dlJPAbvqu1zndcAHYI,850
3
3
  txt2ebook/exceptions.py,sha256=b2HDsXdqweLJbvSJEGt48nxvGkZq20SfYezSjwp77JU,842
4
4
  txt2ebook/formats/__init__.py,sha256=yjZsVk2L6FkUuEpyilp1XTrJeYYljws99vebiweWAKU,2395
@@ -13,7 +13,7 @@ txt2ebook/formats/templates/epub/clean.css,sha256=AnEwMckzUSKcjKsDiWtJW1oaceuklt
13
13
  txt2ebook/formats/templates/epub/condense.css,sha256=Fz80ZqkPsFRmGdURduAxqMV8drD0CCUlrv41P8rUsm8,477
14
14
  txt2ebook/formats/templates/epub/noindent.css,sha256=_O5Tv90TKyyPBRdgjuNKFwtKFbdheh2V9PtDhgRUg3U,483
15
15
  txt2ebook/formats/txt.py,sha256=v2YstXRmk0WTPqqHU7IZPD_YaC3m9I8BJPUdU1sLLSI,7392
16
- txt2ebook/formats/typ.py,sha256=h8ia1rmzexmWLwwctbPLkUiJ6glBpJBsOY2YOtVl0Bw,5011
16
+ txt2ebook/formats/typ.py,sha256=VbMVyGvr1tuKsIzHBefx02LvdFCywFBhXYZHD7kaKXQ,5070
17
17
  txt2ebook/helpers/__init__.py,sha256=cQmFjEsEEI0gRxDPL-284FMS5Z-iBMcu-4qe7Icf7is,1971
18
18
  txt2ebook/languages/__init__.py,sha256=oShuwgKn784v_XYrAKQM2x1h0-KEsJPeia9XWMnJTYU,758
19
19
  txt2ebook/languages/en.py,sha256=LVZsvr6JLbQFrfI1XSYG54mFwzlHa0fhKghlUemkQbo,920
@@ -32,10 +32,10 @@ txt2ebook/models/chapter.py,sha256=buECAklNQgM3tDehzyVO9YfA_F0iXyLq2PaMZGV_Zaw,1
32
32
  txt2ebook/models/volume.py,sha256=HyT4XO9yZ8d0PgZVfMMyAYUDFv58RrUmsSFNNmU-sHY,1592
33
33
  txt2ebook/parser.py,sha256=vdC--8I2c89xve7OA1OkYTDjSMwwKoyv4Wkmca0iFhE,11823
34
34
  txt2ebook/tokenizer.py,sha256=y1CQ3Xf5g74o_mUZSOwrwwu0grKmgmt6x3yxCWWokhU,9318
35
- txt2ebook/txt2ebook.py,sha256=fb9cnWDJ5443fFBJLefbwGO1pXtv2bCCM8tF_DpsWRo,12532
35
+ txt2ebook/txt2ebook.py,sha256=0TS2cYctSjSrbHsAIJnnDCy87EwgWq_c3HvO-FN4PcA,12532
36
36
  txt2ebook/zh_utils.py,sha256=EgKVbwqYGaTGswQUGcOCeSfRelzwkAb9WWY9TrsX1x4,4882
37
- txt2ebook-0.1.70.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
38
- txt2ebook-0.1.70.dist-info/METADATA,sha256=0TozLgxP8WAm-ulphRMiHkbPd4XBjE4VzDcw0sInx58,7223
39
- txt2ebook-0.1.70.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
40
- txt2ebook-0.1.70.dist-info/entry_points.txt,sha256=IQHyIIhd0MHjSSRVC1a6tMeIoLus8D06KHL_cumvEbg,83
41
- txt2ebook-0.1.70.dist-info/RECORD,,
37
+ txt2ebook-0.1.72.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
38
+ txt2ebook-0.1.72.dist-info/METADATA,sha256=a9BDHKAKSp7fgadwQW-in2In8ODQiWEbYB3380xAkL4,7316
39
+ txt2ebook-0.1.72.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
40
+ txt2ebook-0.1.72.dist-info/entry_points.txt,sha256=IQHyIIhd0MHjSSRVC1a6tMeIoLus8D06KHL_cumvEbg,83
41
+ txt2ebook-0.1.72.dist-info/RECORD,,