天天看點

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
           

繼續閱讀