Skip to main content

CLI tool to convert txt file to ebook format

Project description

txt2ebook

A console tool to convert txt file to different ebook formats.

Installation

Stable version From PyPI:

uv tool install txt2ebook

Upgrade to latest stable version:

uv tool upgrade txt2ebook

Add autocompletion to your Bash config:

eval "$(register-python-argcomplete tte)"
eval "$(register-python-argcomplete txt2ebook)"

Usage

Showing help message of command-line options:

txt2ebook --help
usage: txt2ebook [-of OUTPUT_FOLDER] [-p] [-y] [-l LANGUAGE] [-rw] [-q] [-v]
                 [-d] [-h] [-V]
                 {env,epub,gmi,massage,md,parse,pdf,tex,typ} ...

txt2ebook/tte is a cli tool to convert txt file to ebook format.

website: https://github.com/kianmeng/txt2ebook
changelog: https://github.com/kianmeng/txt2ebook/blob/master/CHANGELOG.md
issues: https://github.com/kianmeng/txt2ebook/issues

positional arguments:
  {env,epub,gmi,massage,md,parse,pdf,tex,typ}
      sub-command help
    env
      print environment information for bug reporting
    epub
      generate ebook in EPUB format
    gmi
      generate ebook in Gemtext format
    massage
      massage the source txt file
    md
      generate ebook in Markdown format
    parse
      parse and validate the txt file
    pdf
      generate ebook in Markdown format
    tex
      generate ebook in TeX/PDF format
    typ
      generate ebook in Typst format

options:
  -of, --output-folder OUTPUT_FOLDER
      set default output folder (default: 'output')
  -p, --purge
      remove converted ebooks specified by --output-folder option (default: 'False')
  -y, --yes
      assume yes to all prompts (default: 'False')
  -l, --language LANGUAGE
      language of the ebook (default: 'None')
  -rw, --raise-on-warning
      raise exception and stop parsing upon warning
  -q, --quiet
      suppress all logging
  -v, --verbose
      show verbosity of debugging log, use -vv, -vvv for more details
  -d, --debug
      show debugging log and stacktrace
  -h, --help
      show this help message and exit
  -V, --version
      show program's version number and exit

Convert a txt file into epub:

txt2ebook ebook.txt

Copyright and License

Copyright (c) 2021,2022,2023,2024,2025,2026 Kian-Meng Ang

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

The fish logo used in the documentation generated by Sphinx is a public domain drawing of Troschel's parrotfish (Chlorurus troschelii Var. A.) from https://commons.wikimedia.org/entity/M18506436. 18506436>.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

txt2ebook-0.1.186.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

txt2ebook-0.1.186-py3-none-any.whl (77.3 kB view details)

Uploaded Python 3

File details

Details for the file txt2ebook-0.1.186.tar.gz.

File metadata

  • Download URL: txt2ebook-0.1.186.tar.gz
  • Upload date:
  • Size: 46.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for txt2ebook-0.1.186.tar.gz
Algorithm Hash digest
SHA256 d98e927a02e7b0a9f92e3ff2e829207d1905ad4feb3e0d2ebb9f204211fa4cd1
MD5 bcc440138727d5871d363f34edbea8f4
BLAKE2b-256 1ab577539a2d2ab3f619d91be5fb43bfc21430c2ca0f365e97bddabb8b868c40

See more details on using hashes here.

File details

Details for the file txt2ebook-0.1.186-py3-none-any.whl.

File metadata

  • Download URL: txt2ebook-0.1.186-py3-none-any.whl
  • Upload date:
  • Size: 77.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for txt2ebook-0.1.186-py3-none-any.whl
Algorithm Hash digest
SHA256 cc11f041c13ca113c998b9c8c0fa81862694a5ae928427b63aeec8a6ffa9904b
MD5 c0c04fe6a7237b47b5ba0b5a0fe3e09d
BLAKE2b-256 268d30d3692ce386b3168e691ae2f2a4289792bdbaa0e05d7f47ee547828dd08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page