Ubuntu – ny command-line software to create e-books from the scratch in Ubuntu

16.04command lineebooks

I would like to automate e-book build from remote repositories. A command-line tool would be useful in this case. Is there any software for Ubuntu?

Best Answer

A wide variety of documents can be converted to ebook (epub, mobi, ...) using ebook-convert which is part of the calibre package.

For example, as long as input is a supported format, an epub can be created with the command:

ebook-convert  input output.epub

Or, if you use kindles:

ebook-convert  input output.mobi

Some input formats include: LIT, MOBI, AZW, EPUB, AZW3, FB2, DOCX, HTML, PRC, ODT, RTF, PDB, TXT, PDF.

If the input file is a PDF, then one may want to add an option:

ebook-convert --enable-heuristics  input.pdf output.epub

Calibre may be available from your package manager but it often helps to install the latest version which is available here.

Authoring a book

As an alternative to calibre, OpenOffice/LibreOffice offers an extension, Writer2ePub, to claims to be able to create "well formatted, easy readable ePub" files with a single click.

The Writer2ePub extension can be downloaded from here.