Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

TextToApp

Converts Chinese-language novels from plain .txt files into EPUB e-books, detecting chapter boundaries automatically from the chapter headings in the text.

Novels distributed as plain text usually arrive as one large .txt file with no structure. The text is readable, but there is no table of contents, no way to jump between chapters, and no reasonable way to resume where you left off. This script finds the chapter headings, splits the text on them, and writes a proper EPUB with a navigable table of contents.

Usage

python [script name].py input.txt

Produces input.epub in the same directory.

Requirements

  • Python 3
  • [dependencies — e.g. ebooklib]
pip install -r requirements.txt

How chapter detection works

[One or two sentences: what pattern the script looks for. For example — it scans for lines matching Chinese chapter headings such as 第一章 / 第1章 / 第一节, treats each match as a chapter boundary, and uses the matched line as the chapter title.]

Limitations

  • Written for Chinese-language novels; chapter detection assumes Chinese chapter headings and will not work on English or Japanese text as-is
  • Input is assumed to be UTF-8
  • No cover image or metadata editing — output is a plain, functional EPUB

License

[MIT, or whichever you prefer]

About

Convert Chinese novel .txt files to EPUB with automatic chapter detection

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages