E-book conversion with Calibre: Difference between revisions
m (→HTML Input) |
|||
Line 76: | Line 76: | ||
'''Others''' | '''Others''' | ||
* [http://www.crummy.com/software/BeautifulSoup/ Beautiful soup], a parser written in Python (for programmers only) | * [http://www.crummy.com/software/BeautifulSoup/ Beautiful soup], a parser written in Python (for programmers only) |
Revision as of 20:35, 26 March 2017
Introduction
Calibre is a one stop solution for most of your e-book needs. It is free, open source and cross-platform in design and works well on Linux, OS X and Windows.
Features
List of general features according to the calibre about page, retrieved 19:54, 29 November 2010 (CET)
(1) Library Management
Calibre manages your e-book collection for you. It is designed around the concept of the logical book, i.e., a single entry in your library that may correspond to actual e-book files in several formats. Calibre can sort the books in your library by: Title, Author, Date added, Date published, Size, Rating, Series, etc.
You can search your book collection for a particular book either with simple or advanced search.
You can export arbitrary subsets of your collection to your hard disk arranged in a fully customizable folder structure.
Calibre will retrive book metadata from the Internet based on existing title/author or ISBN information. It can download various types of metadata and covers for your books, automatically. The metadata system is written using plugins so that different types of metadata sources can be supported in the future.
(2) E-book conversion
Calibre can convert from a huge number of formats to a huge number of formats. It supports all the major e-book formats.
The conversion engine has lots of powerful features. It can rescale all font sizes, ensuring the output e-book is readable no matter what font sizes the input document uses. It can automatically detect/create book structure, like chapters and Table of Contents. It can insert the book metadata into a "Book Jacket" at the start of the book. Itcan create chapters out of single text using XPath expressions, add title image, title, author, data, etc.
- Source formats (as of version 0.7.27 (nov 2010): CBZ, CBR, CBC, CHM, EPUB, FB2, HTML, LIT, LRF, MOBI, ODT, PDF, PRC. Some convert better than others, e.g. PDF pictures and tables don't translate well and some can be lost. In order of decreasing preference: LIT, MOBI, EPUB, HTML, PRC, RTF, PDB, TXT, PDF
- Output formats: EPUB, FB2, OEB, LIT, LRF, MOBI, PDB, PML, RB, PDF, SNB, TCR, TXT
(3) Syncing to e-book reader devices
calibre has a modular device driver design that makes adding support for different e-reader devices easy. It has support for a large number of devices. Syncing supports updating metadata on the device from metadata in the library and creation of collections on the device based on the tags defined in the library. If a book has more than one format available, calibre automatically chooses the best format when uploading to the device. If none of the formats is suitable, calibre will automatically convert the e-book to a format suitable for the device before sending it.
(4) Downloading news from the web and converting it into e-book form
Calibre can automatically fetch news from websites or RSS feeds, format the news into a ebook and upload to a connected device. The ebooks include the full versions of the articles, not just the summaries. Examples of supported news sites include: The New York Times, The Wall Street Journal, The Economist, Time and many more.
(5) Comprehensive e-book viewer
calibre has a built-in ebook viewer that can display all the major ebook formats. It has full support for Table of Contents, bookmarks, CSS, a reference mode, printing, searching, copying, customizing the rendering via a user style sheet, embedded fonts, etc.
(6) Content server for online access to your book collection
Calibre has a built-in web server that allows you to access your ebook collection using a simple browser from any computer anywhere in the world. It can also email your books and downloaded news to you automatically. It has support for mobile devices, so you can browse your collection and download books from your smartphone, Kindle, etc.
Supported system and installation
- Windows
- MacOSX
- Linux: Calibre is easy install under Ubuntu (tested with 8.04, 9.04 and 10.04). You can do it with one command line. An older version is available through Synaptic.
Preparing input
Calibre can read many input files (including e-book formats other than ePub. However, if you want to create your own book you probably will start from a more frequent format. According to the manual, the best option is HTML followd in decreasing order by DocX, RTF, TXT, and PDF. Avoid PDF.
HTML Input
You either can create an e-book from one big HTML file or from several smaller ones (as we shall see later)
Avoid creating an e-book from HTML pages that include a tabular column layout (lots of menus on top, to left, right and at the bottom), unless you want to learn advanced filtering functions of Calibre or how to use a page scrapping program. I noticed that some e-book readers can choke on an unfiltered EduTechWiki page, even if the translation process per se does work.
In addition HTML input files should be reasonably clean. Either author them that way or use a HTML cleanup / parsing / scrapping program.
HTML Tidy Tidy is a command line tool (Windows version). There exist some user-friendly front ends for older versions. E.g. the CSE HTML Validator (free demo version).
I suggest the following strategy.
- Install the Html Validator Firefox extension.
- Then open the HTML in your navigator
- Menu:View-> Source
- Then click on the Clean up the page button (lower right)
- Change the layout options to XHTML and strict and refresh
- Copy/paste the contents to a text editor.
Others
- Beautiful soup, a parser written in Python (for programmers only)
Word input
Calibre can deal with *.docx word files quite well under the condition that it uses the official heading styles for sectioning.
Convert older *.doc formats to HTML before importing to Calibre.
Overview of the process and page setup
(to be written)
Output calibration
By default font sizes are chosen according to the output profile
Creating books from a single simple HTML file
Let's assume that you have got a single HTML file with the following properties:
- It just contains text and links to pictures.
- There are no headings and footers that must be removed
- Text is structured into chapters with either h1 tag in the beginning and h2 tags for chapters or all h1 tags for chapters
Creating books from multiple files
In order to convert a collection of HTML files in a specific oder, you have to create a table of contents file. That is, another HTML file that contains links to all the other files in the desired order. Such a file looks like:
<html>
<body>
<h1>Table of Contents</h1>
<p style="text-indent:0pt">
<a href="file1.html">First File</a><br/>
<a href="file2.html">Second File</a><br/>
.
.
.
</p>
</body>
</html>
Then just add this HTML file to the GUI and use the convert button to create your ebook.
A tested example file is here, i.e. an index of an old VRML manual I wrote over 10 years ago with Latex.
Post processing
Books made with Calibre may need some post-processing. A good program is the free Sigil which is available for Win 32/64bit, Mac(Intel) and Linux 32/64bit.
Links
List of Calibre tutorials
- ABCs of e-book format conversion by John Schember, (this short tutorial is also included in the Calibre installation as ebook as of nov. 2010)
- Absolute e-book beginners also should read Beginner’s Guide to Calibre by John Schember, jan 2010. This tutorial explains how to read books with calibre and how to download stuff and upload to your device.
- Ebook Formatting Tutorial by Amalthia
- step-by-step guide
General ePub tutorials
- See the ePub article for more
Manual
- User Manual (Official). Of particular interest is the Conversion Section