Metadata-Version: 2.1
Name: txt2epub
Version: 1.2.0
Summary: A simple TXT to ePub converter
Keywords: ebook
Author-Email: K4YT3X <i@k4yt3x.com>
License: GPL-2.0-only
Classifier: Environment :: Console
Classifier: Environment :: X11 Applications :: Qt
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Project-URL: homepage, https://github.com/k4yt3x/txt2epub/
Requires-Python: >=3.8
Requires-Dist: langdetect>=1.0.0
Requires-Dist: ebooklib>=0.18
Requires-Dist: PyQt6>=6.5.0
Description-Content-Type: text/markdown

# TXT2EPUB

[中文说明](README.zh.md)

A simple tool for converting TXT books into ePub.

![image](https://github.com/k4yt3x/txt2epub/assets/21986859/b342f068-28ff-4789-a261-1f82830f76a5)

## Installation

You'll first need to have Python3 and Pip installed. If you're using Windows, then the default Python installer will come with Pip. If you're using Linux, you may need to install an extra package like `python3-pip`. The exact package name depends on your distro.

Then, execute the following command to install TXT2EPUB.

```shell
pip install txt2epub
```

## Usage

You may convert a file from the command line:

```shell
txt2epub convert -i <input> -o <output> -t <title> -a <author> -l <language>
```

...or using the GUI:

```shell
txt2epub gui
```

## Chapter Detection

This program detects the book chapters and chapter titles following the standard TXT book format:

- Chapters are separated by three new lines (i.e., `\n\n\n`)
- The first line in a new chapter is the chapter's title.

For example, in the text below, there are two chapters with titles "Chapter 1" and "Chapter 2."

```txt
Chapter 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at sapien ante.

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae.


Chapter 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at sapien ante.

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae.
```
