天天看点

linux电子书解决方案Calibre

https://apps.ubuntu.com/cat/applications/natty/calibre/

简介:

Calibre is meant to be a complete e-library solution. It includes library management, format conversion, news feeds to ebook conversion as well as e-book reader sync features.

Calibre is primarily a ebook cataloging program. It manages your ebook collection for you. It is designed around the concept of the logical book, i.e. a single entry in the database that may correspond to ebooks in several formats. It also supports conversion from a dozen different ebook formats to LRF and EPUB. A graphical interface to the conversion software can be accessed easily by just clicking the “Convert E-books” button.

Supported input formats are: MOBI, LIT, PRC, EPUB, ODT, HTML, CBR, CBZ, RTF, TXT, PDF and LRS.

Calibre has a modular device driver design that makes adding support for different e-reader devices easy. At the moment, it has support for the SONY PRS 500/505/700 and the iPhone (with the stanza reader software). Syncing supports updating metadata on the device from metadata in the library and the creation of collections on the device based on the tags defined in the library view. If an book has more than one format available, calibre automatically chooses the best format when uploading to the device.

Calibre can automatically fetch news from a number of websites/RSS feeds, format the news into a ebook and upload to a connected device. There is support for generating LRF/EPUB ebooks. The ebooks include the full versions of the articles, not just the summaries.

Calibre has also a built-in ebook viewer that can display all the major ebook formats.

使用

格式转换

我主要是用格式转换功能,因为喜欢看kindle电子书,有不少在亚马逊下载不不到电子版,而kindle对txt的支持不是很好,常常出现漏行问题。所以可以把txt转mobi,从而解决该问题。

linux电子书解决方案Calibre

可以选择各种格式:

linux电子书解决方案Calibre

kindle

连接kindle到计算机,该软件会自动检测到kindle,并且软件左下方状态栏会显示Amazon kindle已连接。可以设置文件自动同步。或者传输数据。还可以直接阅读kindle里面的电子书(在亚马逊下载的不行)。

linux电子书解决方案Calibre

可以对阅读器进行设置,例如设置背景为视觉保护色(色调85、饱和度125、亮度205 )。

linux电子书解决方案Calibre

添加章节信息

首先编辑txt文件,按照类似markdown的方式编辑章节,即1级标题前面加一个#,2级标题后面前面加两个#….

## 第 一 回  风 月 无 情
「越女采莲秋水畔,窄袖轻罗,暗露双金钏。照影摘花花似面,芳心只共丝争乱。
           

添加#的方法是用编辑器(例如sublime)的查找替换:

Find What: 第(\D+)章
Replace With: 第\章
           

然后使用calibre转换时,设置如下:

linux电子书解决方案Calibre

问题

格式转换,如果txt大于10M,就会出错,目前不知道解决办法。

把文件切开转换,例如:

cat book.txt | sed -n '1,16770p' > book1.txt
cat book.txt | sed -n '16770,35781p' > book2.txt
cat book.txt | sed -n '35781, 78345p' > book3.txt
           

继续阅读