Электронные книжки попадаются в сети в разных форматах, но читаю я в основном на Kindle. Часто возникает задача конвертнуть формат FB2 или EPUB в MOBI. Оказывается, есть пара удобных утилиток для этого: fb2c и kindlegen. Это опенсорсный проект на Гитхабе. Бинарники для Линукса, мака и Windows можно скачать здесь: https://github.com/rupor-github/fb2converter/releases
Из FB2 во всякое разное:
Из FB2 во всякое разное:
$ fb2c help convert
NAME:
fb2c convert - Converts FB2 file(s) to specified format
USAGE:
fb2c convert [command options] SOURCE [DESTINATION]
OPTIONS:
--force-zip-cp ENCODING Force ENCODING for ALL file names in archives (see IANA.org for character set names)
--nodirs when producing output do not keep input directory structure (default: false)
--ow continue even if destination exits, overwrite files (default: false)
--stk send converted file to kindle (epub only) (default: false)
--to TYPE conversion output TYPE (supported types: epub, kepub, azw3, mobi) (default: "epub")
SOURCE:
path to fb2 file(s) to process, following formats are supported:
path to a file: [path]file.fb2
path to a directory: [path]directory - recursively process all files under directory (symbolic links are not followed)
path to archive with path inside archive to a particular fb2 file: [path]archive.zip[archive path]/file.fb2
path to archive with path inside archive: [path]archive.zip[archive path] - recursively process all fb2 files under archive path
When working on archive recursively only fb2 files will be considered, processing of archives inside archives is not supported.
DESTINATION:
always a path, output file name(s) and extension will be derived from other parameters
if absent - current working directoryИз всякого разного в MOBI:$ kindlegen
*************************************************************
Amazon kindlegen(Linux) V2.9 build 1028-0897292
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2014
*************************************************************
Usage : kindlegen [filename.opf/.htm/.html/.epub/.zip or directory] [-c0 or -c1 or c2] [-verbose] [-western] [-o <file name>]
Note:
zip formats are supported for XMDF and FB2 sources
directory formats are supported for XMDF sources
Options:
-c0: no compression
-c1: standard DOC compression
-c2: Kindle huffdic compression
-o <file name>: Specifies the output file name. Output file will be created in the same directory as that of input file. <file name> should not contain directory path.
-verbose: provides more information during ebook conversion
-western: force build of Windows-1252 book
-releasenotes: display release notes
-gif: images are converted to GIF format (no JPEG in the book)
-locale <locale option> : To display messages in selected language
en: English
de: German
fr: French
it: Italian
es: Spanish
zh: Chinese
ja: Japanese
pt: Portuguese
ru: Russian
nl: Dutch