Scroll to navigation

epub2txt(1) General Commands Manual epub2txt(1)

NAME

epub2txt - Extract text from EPUB documents

SYNOPSIS

epub2txt [options] {files...}

DESCRIPTION

epub2txt is simple utility for extracting text from EPUB documents. It is mainly intended for reading EPUB e-books on systems that cannot run a graphical EPUB viewer, and favours speed over optimal rendering of complex layout.

The output is to stdout; if multiple files are specified, they are simply processed sequentially. Unless otherwise specified, the character encoding of the output is the same as for the EPUB source, which is invariably UTF-8. However, epub2txt can attempt to output plain ASCII if required.

OPTIONS

Converts Unicode characters in the EPUB document that have close ASCII equivalents to ASCII. For example, the Unicode left single quote is similar to an ASCII straight quote. This option is intended for use when feeding the output of epub2txt into another utility that cannot deal with properly UTF8 encoding. However, many Unicode characters have no ASCII equivalents.
Set the level of debugging information, from 0 (none) to 4 (extremely detailed tracing).
Output document meta-data: title, creator, description, etc.
Do not use ANSI terminal highlighting, even when running in a terminal. Some pagers, e.g., more do not always handle ANSI codes properly .
Do not output the document body. At present, useful only with --meta.
No formatting at all. This mode is different to setting unlimited width (-w 0) in that whitespace is not trimmed, successive empty lines are not collapsed, and --noansi is implied. This is the fastest way to extract text, and is appropriate when feeding output to an external formatter such as groff.
Format the output to fit into a specified width. If this option is omitted, the width is determined from the terminal, if possible. If not, then the width defaults to 80 characters. If the width is set to zero or less, then the output is assumed to be of unlimited width. Setting unlimited width can be useful in situations where the output is being processed by another application. between paragraphs).
Displays the version and copyright infomation.

AUTHOR AND LEGAL

epub2txt is maintained by Kevin Boone, with contributions from others, and is open source under the terms of the GNU Public Licence, version 3.0. There is no warranty of any kind.

May 2022