mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
String changes
This commit is contained in:
parent
a8c5b65bb4
commit
6615ee1305
@ -7,13 +7,13 @@ calibre has a conversion system that is designed to be very easy to use.
|
||||
Normally, you just add a book to calibre, click convert and calibre will try hard
|
||||
to generate output that is as close as possible to the input. However, calibre
|
||||
accepts a very large number of input formats, not all of which are as suitable
|
||||
as others for conversion to ebooks. In the case of such input formats, or if
|
||||
as others for conversion to e-books. In the case of such input formats, or if
|
||||
you just want greater control over the conversion system, calibre has a lot of
|
||||
options to fine tune the conversion process. Note however that calibre's
|
||||
conversion system is not a substitute for a full blown ebook editor. To edit
|
||||
ebooks, I recommend first converting them to EPUB or AZW3 using calibre and
|
||||
conversion system is not a substitute for a full blown e-book editor. To edit
|
||||
e-books, I recommend first converting them to EPUB or AZW3 using calibre and
|
||||
then using the :guilabel:`Edit book` feature to get them into perfect shape. You can then
|
||||
use the edited ebook as input for conversion into other formats in calibre.
|
||||
use the edited e-book as input for conversion into other formats in calibre.
|
||||
|
||||
This document will refer mainly to the conversion settings as found in the
|
||||
conversion dialog, pictured below. All these settings are also available via
|
||||
@ -23,7 +23,7 @@ it, a tooltip will appear describing the setting.
|
||||
|
||||
.. image:: images/conv_dialog.png
|
||||
:align: center
|
||||
:alt: Ebook conversion dialog
|
||||
:alt: E-book conversion dialog
|
||||
:class: half-width-img
|
||||
|
||||
.. contents:: Contents
|
||||
@ -75,7 +75,7 @@ The four sub-directories are:
|
||||
input This contains the HTML output by the Input Plugin. Use this to debug the Input Plugin.
|
||||
parsed The result of pre-processing and converting to XHTML the output from the Input Plugin. Use to debug structure detection.
|
||||
structure Post structure detection, but before CSS flattening and font size conversion. Use to debug font size conversion and CSS transforms.
|
||||
processed Just before the ebook is passed to the output plugin. Use to debug the output plugin.
|
||||
processed Just before the e-book is passed to the output plugin. Use to debug the output plugin.
|
||||
========== =============
|
||||
|
||||
If you want to edit the input document a little before having calibre convert it, the best thing to
|
||||
@ -85,7 +85,7 @@ to add the zip file as a format for the book and then, in the top left corner of
|
||||
select ZIP as the input format.
|
||||
|
||||
This document will deal mainly with the various transforms that operate on the intermediate XHTML
|
||||
and how to control them. At the end are some tips specific to each Input/Output format.
|
||||
and how to control them. At the end are some tips specific to each input/output format.
|
||||
|
||||
Look & feel
|
||||
-------------
|
||||
@ -94,7 +94,7 @@ Look & feel
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
This group of options controls various aspects of the look and feel of the converted ebook.
|
||||
This group of options controls various aspects of the look and feel of the converted e-book.
|
||||
|
||||
.. _font-size-rescaling:
|
||||
|
||||
@ -209,7 +209,7 @@ Miscellaneous
|
||||
There are a few more options in this section.
|
||||
|
||||
:guilabel:`No text justification`
|
||||
Normally, if the output format supports it, calibre will force the output ebook
|
||||
Normally, if the output format supports it, calibre will force the output e-book
|
||||
to have *justified* text (i.e., a smooth right margin). This option will turn
|
||||
off this behavior, in which case whatever justification is specified in the input document
|
||||
will be used instead.
|
||||
@ -227,7 +227,7 @@ There are a few more options in this section.
|
||||
with "Mikhail Gorbachiov". Also, note that in cases where there are multiple representations
|
||||
of a character (characters shared by Chinese and Japanese for instance) the representation used
|
||||
by the largest number of people will be used (Chinese in the previous example).
|
||||
This option is mainly useful if you are going to view the ebook on a device that does not
|
||||
This option is mainly useful if you are going to view the e-book on a device that does not
|
||||
have support for unicode.
|
||||
|
||||
:guilabel:`Input character encoding`
|
||||
@ -235,7 +235,7 @@ There are a few more options in this section.
|
||||
result in non-English characters or special characters like smart quotes being corrupted.
|
||||
calibre tries to auto-detect the character encoding of the source document, but it does not
|
||||
always succeed. You can force it to assume a particular character encoding by using this setting.
|
||||
`cp1252` is a common encoding for documents produced using windows software. You should also read
|
||||
`cp1252` is a common encoding for documents produced using Windows software. You should also read
|
||||
:ref:`char-encoding-faq` for more on encoding issues.
|
||||
|
||||
|
||||
@ -416,7 +416,7 @@ There are a few more options in this section.
|
||||
:guilabel:`Insert metadata as page at start of book`
|
||||
One of the great things about calibre is that it allows you to maintain very complete metadata
|
||||
about all of your books, for example, a rating, tags, comments, etc. This option will create
|
||||
a single page with all this metadata and insert it into the converted ebook, typically just
|
||||
a single page with all this metadata and insert it into the converted e-book, typically just
|
||||
after the cover. Think of it as a way to create your own customised book jacket.
|
||||
|
||||
:guilabel:`Remove first image`
|
||||
@ -432,7 +432,7 @@ Table of Contents
|
||||
When the input document has a Table of Contents in its metadata, calibre will just use that. However,
|
||||
a number of older formats either do not support a metadata based Table of Contents, or individual
|
||||
documents do not have one. In these cases, the options in this section can help you automatically
|
||||
generate a Table of Contents in the converted ebook, based on the actual content in the input document.
|
||||
generate a Table of Contents in the converted e-book, based on the actual content in the input document.
|
||||
|
||||
.. note:: Using these options can be a little challenging to get exactly right.
|
||||
If you prefer creating/editing the Table of Contents by hand, convert to
|
||||
@ -622,7 +622,7 @@ the latest version of calibre as support for ``.docx`` files is very new).
|
||||
|
||||
calibre will automatically generate a Table of Contents based on headings if you mark
|
||||
your headings with the ``Heading 1``, ``Heading 2``, etc. styles in Word. Open
|
||||
the output ebook in the calibre viewer and click the :guilabel:`Table of Contents` button
|
||||
the output e-book in the calibre viewer and click the :guilabel:`Table of Contents` button
|
||||
to view the generated Table of Contents.
|
||||
|
||||
Older .doc files
|
||||
@ -749,7 +749,7 @@ The .cbc file will then contain::
|
||||
two.cbz
|
||||
three.cbz
|
||||
|
||||
calibre will automatically convert this .cbc file into a ebook with a Table of Contents pointing to each entry in comics.txt.
|
||||
calibre will automatically convert this .cbc file into a e-book with a Table of Contents pointing to each entry in comics.txt.
|
||||
|
||||
|
||||
EPUB advanced formatting demo
|
||||
|
@ -34,11 +34,11 @@ Environment variables
|
||||
* ``CALIBRE_NO_NATIVE_MENUBAR`` - Causes calibre to not create a native (global) menu on Ubuntu Unity and similar linux desktop environments. The menu is instead placed inside the window, as is traditional.
|
||||
* ``CALIBRE_IGNORE_SYSTEM_THEME`` - Causes calibre to ignore any system Qt style plugins and use its builtin style plugin instead. Useful to workaround crashes caused by the system Qt plugin being incompatible with the version of Qt shipped with calibre.
|
||||
* ``CALIBRE_SHOW_DEPRECATION_WARNINGS`` - Causes calibre to print deprecation warnings to stdout. Useful for calibre developers.
|
||||
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - Prevent calibre from automatically registering the filetypes it is capable of handling with windows.
|
||||
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - Prevent calibre from automatically registering the filetypes it is capable of handling with Windows.
|
||||
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
|
||||
* ``http_proxy`` - Used on linux to specify an HTTP proxy
|
||||
|
||||
See `How to set environment variables in windows <http://www.computerhope.com/issues/ch000549.htm>`_ or
|
||||
See `How to set environment variables in Windows <http://www.computerhope.com/issues/ch000549.htm>`_ or
|
||||
`How to set environment variables in OS X <http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-mac-os-x-launchd-plist/>`_.
|
||||
|
||||
Tweaks
|
||||
|
@ -40,7 +40,7 @@ All the calibre python code is in the ``calibre`` package. This package contains
|
||||
* For details, see: ``devices.interface`` which defines the interface supported by device drivers and ``devices.usbms`` which
|
||||
defines a generic driver that connects to a USBMS device. All USBMS based drivers in calibre inherit from it.
|
||||
|
||||
* ebooks - All the ebook conversion/metadata code. A good starting point is ``calibre.ebooks.conversion.cli`` which is the
|
||||
* e-books - All the e-book conversion/metadata code. A good starting point is ``calibre.ebooks.conversion.cli`` which is the
|
||||
module powering the :command:`ebook-convert` command. The conversion process is controlled via ``conversion.plumber``.
|
||||
The format independent code is all in ``ebooks.oeb`` and the format dependent code is in ``ebooks.format_name``.
|
||||
|
||||
@ -49,20 +49,20 @@ All the calibre python code is in the ``calibre`` package. This package contains
|
||||
see :ref:`conversion-introduction`. The pipeline consists of an input
|
||||
plugin, various transforms and an output plugin. The code that constructs
|
||||
and drives the pipeline is in :file:`plumber.py`. The pipeline works on a
|
||||
representation of an ebook that is like an unzipped epub, with
|
||||
representation of an e-book that is like an unzipped epub, with
|
||||
manifest, spine, toc, guide, html content, etc. The
|
||||
class that manages this representation is OEBBook in ``ebooks.oeb.base``. The
|
||||
various transformations that are applied to the book during
|
||||
conversions live in :file:`oeb/transforms/*.py`. And the input and output
|
||||
plugins live in :file:`conversion/plugins/*.py`.
|
||||
* Ebook editing happens using a different container object. It is
|
||||
* E-book editing happens using a different container object. It is
|
||||
documented in :ref:`polish_api`.
|
||||
|
||||
* db - The database back-end. See :ref:`db_api` for the interface to the calibre library.
|
||||
|
||||
* content server: ``library.server`` is the calibre Content Server.
|
||||
|
||||
* gui2 - The Graphical User Interface. GUI initialization happens in ``gui2.main`` and ``gui2.ui``. The ebook-viewer is in ``gui2.viewer``. The ebook editor is in ``gui2.tweak_book``.
|
||||
* gui2 - The Graphical User Interface. GUI initialization happens in ``gui2.main`` and ``gui2.ui``. The e-book-viewer is in ``gui2.viewer``. The e-book editor is in ``gui2.tweak_book``.
|
||||
|
||||
If you want to locate the entry points for all the various calibre executables,
|
||||
look at the ``entry_points`` structure in `linux.py
|
||||
@ -286,11 +286,11 @@ terminal. For example, you can start the GUI from the terminal as::
|
||||
|
||||
calibre-debug -g
|
||||
|
||||
Similarly, you can start the ebook-viewer as::
|
||||
Similarly, you can start the e-book-viewer as::
|
||||
|
||||
calibre-debug -w /path/to/file/to/be/viewed
|
||||
|
||||
The ebook-editor can be started as::
|
||||
The e-book-editor can be started as::
|
||||
|
||||
calibre-debug -t /path/to/be/edited
|
||||
|
||||
|
@ -4,10 +4,10 @@ Comparing e-books
|
||||
========================
|
||||
|
||||
calibre includes an integrated e-book comparison tool that can be used to see
|
||||
what has changed inside an ebook after editing or converting it. It can compare
|
||||
what has changed inside an e-book after editing or converting it. It can compare
|
||||
books in the EPUB and AZW3 formats.
|
||||
|
||||
To use it, either open the ebook in the tool for :ref:`edit` and then click
|
||||
To use it, either open the e-book in the tool for :ref:`edit` and then click
|
||||
:guilabel:`File->Compare to other book` or use the :ref:`book_details` panel.
|
||||
If you do a conversion from EPUB to EPUB, the original EPUB file will be saved
|
||||
as ORIGINAL_EPUB. Simply right click on the ORIGINAL_EPUB entry in the Book
|
||||
@ -57,7 +57,7 @@ The comparison tool is most useful when you have two versions of the same book
|
||||
and you want to see what is different between them. To that end, there are
|
||||
several ways to launch the tool.
|
||||
|
||||
Comparing two ebook files
|
||||
Comparing two e-book files
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Open the first file in the :ref:`edit` tool. Now click :guilabel:`File->Compare
|
||||
|
@ -40,7 +40,7 @@ Tutorial <http://html.net/tutorials/html/>`_ and `CSS Tutorial
|
||||
As you make changes to the HTML or CSS in the editor, the changes will be
|
||||
previewed, live, in the preview panel to the right. When you are happy with how
|
||||
the changes you have made look, click the :guilabel:`Save` button or use
|
||||
:guilabel:`File->Save` to save your changes into the ebook.
|
||||
:guilabel:`File->Save` to save your changes into the e-book.
|
||||
|
||||
One useful feature is :guilabel:`Checkpoints`. Before you embark on some
|
||||
ambitious set of edits, you can create a checkpoint. The checkpoint
|
||||
@ -49,7 +49,7 @@ you don't like the changes you have made to you can go back to the state when
|
||||
you created the checkpoint. To create a checkpoint, use :guilabel:`Edit->Create
|
||||
checkpoint`. Checkpoints will also be automatically created for you whenever you
|
||||
run any automated tool like global search and replace. The checkpointing
|
||||
functionality is in addition to the normal Undo/redo mechanism when editing
|
||||
functionality is in addition to the normal undo/redo mechanism when editing
|
||||
individual files. Checkpoints are useful for when changes are spread over
|
||||
multiple files in the book.
|
||||
|
||||
@ -74,7 +74,7 @@ alphabetically.
|
||||
|
||||
By hovering your mouse over an entry, you can see its size, and also, at
|
||||
the bottom of the screen, the full path to the file inside the book. Note that
|
||||
files inside ebooks are compressed, so the size of the final book is not the
|
||||
files inside e-books are compressed, so the size of the final book is not the
|
||||
sum of the individual file sizes.
|
||||
|
||||
Many files have special meaning, in the book. These will typically have
|
||||
@ -114,7 +114,7 @@ Merging files
|
||||
Sometimes, you may want to merge two HTML files or two CSS files together. It
|
||||
can sometimes be useful to have everything in a single file. Be wary, though,
|
||||
putting a lot of content into a single file will cause performance problems
|
||||
when viewing the book in a typical ebook reader.
|
||||
when viewing the book in a typical e-book reader.
|
||||
|
||||
To merge multiple files together, select them by holding the Ctrl key and
|
||||
clicking on them (make sure you only select files of one type, either all HTML
|
||||
@ -416,7 +416,7 @@ Fixing HTML
|
||||
^^^^^^^^^^^
|
||||
|
||||
This tool simply converts HTML that cannot be parsed as XML into well-formed
|
||||
XML. It is very common in ebooks to have non-well-formed XML, so this tool
|
||||
XML. It is very common in e-books to have non-well-formed XML, so this tool
|
||||
simply automates the process of fixing such HTML. The tool works by parsing the
|
||||
HTML using the HTML5 algorithm (the algorithm used in all modern browsers) and
|
||||
then converting the result into XML. Be aware that auto-fixing can sometimes
|
||||
@ -450,8 +450,8 @@ beautify. Accessed via :guilabel:`Tools->Beautify all files`.
|
||||
Inserting an inline Table of Contents
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Normally in ebooks, the Table of Contents is separate from the main text and is
|
||||
typically accessed via a special Table of Contents button/menu in the ebook
|
||||
Normally in e-books, the Table of Contents is separate from the main text and is
|
||||
typically accessed via a special Table of Contents button/menu in the e-book
|
||||
reading device. You can also have calibre automatically generate an *inline*
|
||||
Table of Contents that becomes part of the text of the book. It is
|
||||
generated based on the currently defined Table of Contents.
|
||||
@ -809,7 +809,7 @@ to open that file in the editor automatically.
|
||||
Auto-complete
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
When editing an ebook, one of the most tedious tasks is creating links to other
|
||||
When editing an e-book, one of the most tedious tasks is creating links to other
|
||||
files inside the book, or to CSS stylesheets, or images. You have to figure out
|
||||
the correct filename and relative path to the file. The editor has
|
||||
auto-complete to make that easier.
|
||||
|
@ -7,7 +7,7 @@ Frequently Asked Questions
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
Ebook format conversion
|
||||
E-book format conversion
|
||||
-------------------------
|
||||
.. contents:: Contents
|
||||
:depth: 1
|
||||
@ -53,11 +53,11 @@ There are two aspects to this problem:
|
||||
What's the deal with Table of Contents in MOBI files?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The first thing to realize is that most ebooks have two tables of contents. One is the traditional Table of Contents, like the ToC you find in paper books. This Table of Contents is part of the main document flow and can be styled however you like. This ToC is called the *content ToC*.
|
||||
The first thing to realize is that most e-books have two tables of contents. One is the traditional Table of Contents, like the ToC you find in paper books. This Table of Contents is part of the main document flow and can be styled however you like. This ToC is called the *content ToC*.
|
||||
|
||||
Then there is the *metadata ToC*. A metadata ToC is a ToC that is not part of the book text and is typically accessed by some special button on a reader. For example, in the calibre viewer, you use the Show Table of Contents button to see this ToC. This ToC cannot be styled by the book creator. How it is represented is up to the viewer program.
|
||||
|
||||
In the MOBI format, the situation is a little confused. This is because the MOBI format, alone amongst mainstream ebook formats, *does not* have decent support for a metadata ToC. A MOBI book simulates the presence of a metadata ToC by putting an *extra* content ToC at the end of the book. When you click Goto Table of Contents on your Kindle, it is to this extra content ToC that the Kindle takes you.
|
||||
In the MOBI format, the situation is a little confused. This is because the MOBI format, alone amongst mainstream e-book formats, *does not* have decent support for a metadata ToC. A MOBI book simulates the presence of a metadata ToC by putting an *extra* content ToC at the end of the book. When you click Goto Table of Contents on your Kindle, it is to this extra content ToC that the Kindle takes you.
|
||||
|
||||
Now it might well seem to you that the MOBI book has two identical ToCs. Remember that one is semantically a content ToC and the other is a metadata ToC, even though both might have exactly the same entries and look the same. One can be accessed directly from the Kindle's menus, the other cannot.
|
||||
|
||||
@ -65,7 +65,7 @@ When converting to MOBI, calibre detects the *metadata ToC* in the input documen
|
||||
|
||||
If you have a hand edited ToC in the input document, you can use the ToC detection options in calibre to automatically generate the metadata ToC from it. See the conversion section of the User Manual for more details on how to use these options.
|
||||
|
||||
Finally, I encourage you to ditch the content ToC and only have a metadata ToC in your ebooks. Metadata ToCs will give the people reading your ebooks a much superior navigation experience (except on the Kindle, where they are essentially the same as a content ToC).
|
||||
Finally, I encourage you to ditch the content ToC and only have a metadata ToC in your e-books. Metadata ToCs will give the people reading your e-books a much superior navigation experience (except on the Kindle, where they are essentially the same as a content ToC).
|
||||
|
||||
.. note::
|
||||
The newer AZW3 format has proper support for a metadata ToC. However, the
|
||||
@ -126,7 +126,7 @@ to all the other files in the desired order. Such a file looks like::
|
||||
</html>
|
||||
|
||||
Then, just add this HTML file to the GUI and use the :guilabel:`Convert` button to create
|
||||
your ebook. You can use the option in the Table of Contents section in the
|
||||
your e-book. You can use the option in the Table of Contents section in the
|
||||
conversion dialog to control how the Table of Contents is generated.
|
||||
|
||||
.. note:: By default, when adding HTML files, calibre follows links in the files
|
||||
@ -170,9 +170,9 @@ Device integration
|
||||
|
||||
What devices does calibre support?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
calibre can directly connect to all the major (and most of the minor) ebook
|
||||
calibre can directly connect to all the major (and most of the minor) e-book
|
||||
reading devices, smarthphones, tablets, etc. In addition, using the
|
||||
:guilabel:`Connect to folder` function you can use it with any ebook reader
|
||||
:guilabel:`Connect to folder` function you can use it with any e-book reader
|
||||
that exports itself as a USB disk. You can even connect to Apple devices (via
|
||||
iTunes), using the :guilabel:`Connect to iTunes` function.
|
||||
|
||||
@ -184,8 +184,8 @@ How can I help get my device supported in calibre?
|
||||
If your device appears as a USB disk to the operating system, adding support for it to calibre is very easy.
|
||||
We just need some information from you:
|
||||
|
||||
* Complete list of ebook formats that your device supports.
|
||||
* Is there a special directory on the device in which all ebook files should be placed? Also does the device detect files placed in sub-directories?
|
||||
* Complete list of e-book formats that your device supports.
|
||||
* Is there a special directory on the device in which all e-book files should be placed? Also does the device detect files placed in sub-directories?
|
||||
* We also need information about your device that calibre will collect automatically. First, if your
|
||||
device supports SD cards, insert them. Then connect your device to the computer. In calibre go to :guilabel:`Preferences->Miscellaneous`
|
||||
and click the "Debug device detection" button. This will create some debug output. Copy it to a file
|
||||
@ -223,12 +223,12 @@ Follow these steps to find the problem:
|
||||
My device is non-standard or unusual. What can I do to connect to it?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In addition to the :guilabel:`Connect to Folder` function found under the
|
||||
:guilabel:`Connect/Share` button, calibre provides a ``User Defined`` device
|
||||
In addition to the :guilabel:`Connect to folder` function found under the
|
||||
:guilabel:`Connect/share` button, calibre provides a ``User defined`` device
|
||||
plugin that can be used to connect to any USB device that shows up as a disk
|
||||
drive in your operating system. Note: on Windows, the device must have a drive
|
||||
letter for calibre to use it. See the device plugin ``Preferences -> Plugins ->
|
||||
Device Plugins -> User Defined`` and ``Preferences -> Miscellaneous -> Get
|
||||
Device plugins -> User defined`` and ``Preferences -> Miscellaneous -> Get
|
||||
information to setup the user defined device`` for more information. Note that
|
||||
if you are using the user defined plugin for a device normally detected by a
|
||||
builtin calibre plugin, you must disable the builtin plugin first, so that your
|
||||
@ -246,7 +246,7 @@ default, collections are created from tags and series. You can control what meta
|
||||
values, calibre will not add the book to any collection.
|
||||
|
||||
Collection management is largely controlled by the 'Metadata management' option found at
|
||||
:guilabel:`Preferences->Import/Export->Sending books to devices`. If set to 'Manual' (the default), managing collections is left to
|
||||
:guilabel:`Preferences->Import/export->Sending books to devices`. If set to 'Manual' (the default), managing collections is left to
|
||||
the user; calibre will not delete already existing collections for a book on your reader when you resend the
|
||||
book to the reader, but calibre will add the book to collections if necessary. To ensure that the collections
|
||||
for a book are based only on current calibre metadata, first delete the books from the reader, then resend the
|
||||
@ -327,7 +327,7 @@ over the net. First perform the following steps in calibre
|
||||
under :guilabel:`Preferences->Conversion->Common options->Page setup`
|
||||
* Convert the books you want to read on your iDevice to EPUB format by
|
||||
selecting them and clicking the :guilabel:`Convert` button.
|
||||
* Turn on the Content Server by clicking the :guilabel:`Connect/Share` button
|
||||
* Turn on the Content Server by clicking the :guilabel:`Connect/share` button
|
||||
and leave calibre running. You can also tell calibre to automatically start the
|
||||
content server via :guilabel:`Preferences->Sharing over the net`.
|
||||
|
||||
@ -393,8 +393,8 @@ How do I use calibre with my Android phone/tablet or Kindle Fire HD?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
There are two ways that you can connect your Android device to calibre. Using a USB cable -- or wirelessly, over the air.
|
||||
The first step to using an Android device is installing an ebook reading
|
||||
application on it. There are many free and paid ebook reading applications for
|
||||
The first step to using an Android device is installing an e-book reading
|
||||
application on it. There are many free and paid e-book reading applications for
|
||||
Android: Some examples (in no particular order):
|
||||
`FBReader <https://play.google.com/store/apps/details?id=org.geometerplus.zlibrary.ui.android&hl=en>`_,
|
||||
`Moon+ <https://play.google.com/store/apps/details?id=com.flyersoft.moonreader&hl=en>`_,
|
||||
@ -455,7 +455,7 @@ change ``8080`` as well to the new port.
|
||||
The local IP address is the IP address your computer is assigned on your home
|
||||
network. A quick Google search will tell you how to find out your local IP
|
||||
address. You can now browse your book collection and download books from calibre
|
||||
to your device to open with whatever ebook reading software you have on your
|
||||
to your device to open with whatever e-book reading software you have on your
|
||||
android device.
|
||||
|
||||
Calibre Companion and many reading apps support browsing the calibre library
|
||||
@ -823,9 +823,9 @@ Otherwise, you can request a particular news site by posting in the `calibre Rec
|
||||
Why the name calibre?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Take your pick:
|
||||
* Convertor And LIBRary for Ebooks
|
||||
* Convertor And LIBRary for E-books
|
||||
* A high *calibre* product
|
||||
* A tribute to the SONY Librie which was the first e-ink based ebook reader
|
||||
* A tribute to the SONY Librie which was the first e-ink based e-book reader
|
||||
* My wife chose it ;-)
|
||||
|
||||
calibre is pronounced as cal-i-ber *not* ca-li-bre. If you're wondering, calibre is the British/commonwealth spelling for caliber. Being Indian, that's the natural spelling for me.
|
||||
@ -833,7 +833,7 @@ calibre is pronounced as cal-i-ber *not* ca-li-bre. If you're wondering, calibre
|
||||
Why does calibre show only some of my fonts on OS X?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
calibre embeds fonts in ebook files it creates. Ebook files support embedding
|
||||
calibre embeds fonts in e-book files it creates. E-book files support embedding
|
||||
only TrueType and OpenType (.ttf and .otf) fonts. Most fonts on OS X systems
|
||||
are in .dfont format, thus they cannot be embedded. calibre shows only TrueType
|
||||
and OpenType fonts found on your system. You can obtain many such fonts on the
|
||||
@ -867,7 +867,7 @@ There can be several causes for this:
|
||||
has trouble with library locations if the path contains non-English characters, or only numbers, etc.)
|
||||
* Try running it as Administrator (Right click on the icon and select "Run as Administrator")
|
||||
|
||||
If it still wont launch, start a command prompt (press the windows key and R; then type :command:`cmd.exe` in the Run dialog that appears). At the command prompt type the following command and press Enter::
|
||||
If it still wont launch, start a command prompt (press the Windows key and R; then type :command:`cmd.exe` in the Run dialog that appears). At the command prompt type the following command and press Enter::
|
||||
|
||||
calibre-debug -g
|
||||
|
||||
@ -932,10 +932,10 @@ Using the viewer or doing any conversions results in a permission denied error o
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Something on your computer is preventing calibre from accessing its own
|
||||
temporary files. Most likely the permissions on your Temp folder are incorrect.
|
||||
temporary files. Most likely the permissions on your :file:`Temp` folder are incorrect.
|
||||
Go to the folder file:`C:\\Users\\USERNAME\\AppData\\Local` in Windows
|
||||
Explorer and then right click on the file:`Temp` folder, select Properties and go to
|
||||
the Security tab. Make sure that your user account has full control for this
|
||||
Explorer and then right click on the file:`Temp` folder, select :guilabel:`Properties` and go to
|
||||
the :guilabel:`Security` tab. Make sure that your user account has full control for this
|
||||
folder.
|
||||
|
||||
Some users have reported that running the following command in an Administrator
|
||||
@ -1022,7 +1022,7 @@ If you want to backup the calibre configuration/plugins, you have to backup the
|
||||
|
||||
How do I use purchased EPUB books with calibre (or what do I do with .acsm files)?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Most purchased EPUB books have `DRM <https://drmfree.calibre-ebook.com/about#drm>`_. This prevents calibre from opening them. You can still use calibre to store and transfer them to your ebook reader. First, you must authorize your reader on a windows machine with Adobe Digital Editions. Once this is done, EPUB books transferred with calibre will work fine on your reader. When you purchase an epub book from a website, you will get an ".acsm" file. This file should be opened with Adobe Digital Editions, which will then download the actual ".epub" ebook. The ebook file will be stored in the folder "My Digital Editions", from where you can add it to calibre.
|
||||
Most purchased EPUB books have `DRM <https://drmfree.calibre-ebook.com/about#drm>`_. This prevents calibre from opening them. You can still use calibre to store and transfer them to your e-book reader. First, you must authorize your reader on a windows machine with Adobe Digital Editions. Once this is done, EPUB books transferred with calibre will work fine on your reader. When you purchase an epub book from a website, you will get an ".acsm" file. This file should be opened with Adobe Digital Editions, which will then download the actual ".epub" e-book. The e-book file will be stored in the folder "My Digital Editions", from where you can add it to calibre.
|
||||
|
||||
I am getting a "Permission Denied" error?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -1041,9 +1041,9 @@ You will need to fix the underlying cause of the permissions error before resumi
|
||||
Can I have the comment metadata show up on my reader?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Most readers do not support this. You should complain to the manufacturer about it and hopefully if enough people complain, things will change. In the meantime, you can insert the metadata, including comments into a "Jacket page" at the start of the ebook, by using the option to "Insert metadata as page at start of book" during conversion. The option is found in the :guilabel:`Structure detection` section of the conversion settings. Note that for this to have effect you have to *convert* the book. If your book is already in a format that does not need conversion, you can convert from that format to the same format.
|
||||
Most readers do not support this. You should complain to the manufacturer about it and hopefully if enough people complain, things will change. In the meantime, you can insert the metadata, including comments into a "Jacket page" at the start of the e-book, by using the option to "Insert metadata as page at start of book" during conversion. The option is found in the :guilabel:`Structure detection` section of the conversion settings. Note that for this to have effect you have to *convert* the book. If your book is already in a format that does not need conversion, you can convert from that format to the same format.
|
||||
|
||||
Another alternative is to create a catalog in ebook form containing a listing of all the books in your calibre library, with their metadata. Click-and-hold the :guilabel:`Convert` button to access the catalog creation tool. And before you ask, no you cannot have the catalog "link directly to" books on your reader.
|
||||
Another alternative is to create a catalog in e-book form containing a listing of all the books in your calibre library, with their metadata. Click-and-hold the :guilabel:`Convert` button to access the catalog creation tool. And before you ask, no you cannot have the catalog "link directly to" books on your reader.
|
||||
|
||||
How do I get calibre to use my HTTP proxy?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -1119,7 +1119,7 @@ You can run the calibre server via the command::
|
||||
|
||||
/opt/calibre/calibre-server --with-library /path/to/the/library/you/want/to/share
|
||||
|
||||
You can download news and convert it into an ebook with the command::
|
||||
You can download news and convert it into an e-book with the command::
|
||||
|
||||
/opt/calibre/ebook-convert "Title of news source.recipe" outputfile.epub
|
||||
|
||||
|
@ -44,7 +44,7 @@ functions to process text in arbitrary ways. The Smarten Punctuation tool in
|
||||
the editor leaves individual hyphens alone, so you can use the this function to
|
||||
replace them with em-dashes.
|
||||
|
||||
To create a new function, simply click the :guilabel:`Create/Edit` button to create a new
|
||||
To create a new function, simply click the :guilabel:`Create/edit` button to create a new
|
||||
function and copy the python code from below.
|
||||
|
||||
.. code-block:: python
|
||||
@ -73,7 +73,7 @@ inside HTML tag definitions.
|
||||
The power of function mode - using a spelling dictionary to fix mis-hyphenated words
|
||||
------------------------------------------------------------------------------------
|
||||
|
||||
Often, ebooks created from scans of printed books contain mis-hyphenated words
|
||||
Often, e-books created from scans of printed books contain mis-hyphenated words
|
||||
-- words that were split at the end of the line on the printed page. We will
|
||||
write a simple function to automatically find and fix such words.
|
||||
|
||||
|
@ -5,10 +5,10 @@ Glossary
|
||||
.. glossary::
|
||||
|
||||
RSS
|
||||
**RSS** *(Really Simple Syndication)* is a web feed format that is used to publish frequently updated content, like news articles, blog posts, etc. It is a format that is particularly suited to being read by computers, and is therefore the preferred way of getting content from the web into an ebook. There are many other feed formats in use on the Internet, and calibre understands most of them. In particular, it has good support for the *ATOM* format, which is commonly used for blogs.
|
||||
**RSS** *(Really Simple Syndication)* is a web feed format that is used to publish frequently updated content, like news articles, blog posts, etc. It is a format that is particularly suited to being read by computers, and is therefore the preferred way of getting content from the web into an e-book. There are many other feed formats in use on the Internet, and calibre understands most of them. In particular, it has good support for the *ATOM* format, which is commonly used for blogs.
|
||||
|
||||
recipe
|
||||
A recipe is a set of instructions that teach calibre how to convert an online news source, such as a magazine or a blog, into an ebook. A recipe is essentially `Python <https://www.python.org>`_ code. As such, it is capable of converting arbitrarily complex news sources into ebooks. At the simplest level, it is just a set of variables, such as URLs, that give calibre enough information to go out onto the Internet and download the news.
|
||||
A recipe is a set of instructions that teach calibre how to convert an online news source, such as a magazine or a blog, into an e-book. A recipe is essentially `Python <https://www.python.org>`_ code. As such, it is capable of converting arbitrarily complex news sources into e-books. At the simplest level, it is just a set of variables, such as URLs, that give calibre enough information to go out onto the Internet and download the news.
|
||||
|
||||
HTML
|
||||
**HTML** *(Hyper Text Mark-Up Language)*, a subset of Standard Generalized Mark-Up Language (SGML) for electronic publishing, is the specific standard used for the World Wide Web.
|
||||
@ -20,7 +20,7 @@ Glossary
|
||||
**API** *(Application Programming Interface)* is a source code interface that a library provides to support requests for services to be made of it by computer programs.
|
||||
|
||||
LRF
|
||||
**LRF** The ebook format that is read by the SONY ebook readers.
|
||||
**LRF** The e-book format that is read by the SONY e-book readers.
|
||||
|
||||
URL
|
||||
**URL** *(Uniform Resource Locator)* for example: ``http://example.com``
|
||||
|
@ -4,7 +4,7 @@ The Graphical User Interface
|
||||
===============================================
|
||||
|
||||
The Graphical User Interface *(GUI)* provides access to all
|
||||
library management and ebook format conversion features. The basic workflow
|
||||
library management and e-book format conversion features. The basic workflow
|
||||
for using calibre is to first add books to the library from your hard disk.
|
||||
calibre will automatically try to read metadata from the books and add them
|
||||
to its internal database. Once they are in the database, you can perform various
|
||||
@ -29,7 +29,7 @@ Actions
|
||||
:align: center
|
||||
|
||||
The actions toolbar provides convenient shortcuts to commonly used actions. If you right-click the buttons, you can perform variations on the default action.
|
||||
Please note that the actions toolbar will look slightly different depending on whether you have an ebook reader attached to your computer.
|
||||
Please note that the actions toolbar will look slightly different depending on whether you have an e-book reader attached to your computer.
|
||||
|
||||
.. contents::
|
||||
:depth: 1
|
||||
@ -45,13 +45,13 @@ Add books
|
||||
|adbi| The :guilabel:`Add books` action has seven variations accessed by doing a right-click on the button.
|
||||
|
||||
|
||||
1. **Add books from a single directory**: Opens a file chooser dialog and allows you to specify which books in a directory should be added. This action is *context sensitive*, i.e. it depends on which :ref:`catalog <catalogs>` you have selected. If you have selected the :guilabel:`Library`, books will be added to the library. If you have selected the ebook reader device, the books will be uploaded to the device, and so on.
|
||||
1. **Add books from a single directory**: Opens a file chooser dialog and allows you to specify which books in a directory should be added. This action is *context sensitive*, i.e. it depends on which :ref:`catalog <catalogs>` you have selected. If you have selected the :guilabel:`Library`, books will be added to the library. If you have selected the e-book reader device, the books will be uploaded to the device, and so on.
|
||||
|
||||
2. **Add books from directories, including sub-directories (One book per directory, assumes every ebook file is the same book in a different format)**: Allows you to choose a directory. The directory and all its sub-directories are scanned recursively, and any ebooks found are added to the library. calibre assumes that each directory contains a single book. All ebook files in a directory are assumed to be the same book in different formats. This action is the inverse of the :ref:`Save to disk <save_to_disk_multiple>` action, i.e. you can :guilabel:`Save to disk`, delete the books and re-add them with no lost information except for the date (this assumes you have not changed any of the setting for the Save to disk action).
|
||||
2. **Add books from directories, including sub-directories (One book per directory, assumes every e-book file is the same book in a different format)**: Allows you to choose a directory. The directory and all its sub-directories are scanned recursively, and any e-books found are added to the library. calibre assumes that each directory contains a single book. All e-book files in a directory are assumed to be the same book in different formats. This action is the inverse of the :ref:`Save to disk <save_to_disk_multiple>` action, i.e. you can :guilabel:`Save to disk`, delete the books and re-add them with no lost information except for the date (this assumes you have not changed any of the setting for the Save to disk action).
|
||||
|
||||
3. **Add books from directories, including sub-directories (Multiple books per directory, assumes every ebook file is a different book)**: Allows you to choose a directory. The directory and all its sub-directories are scanned recursively and any ebooks found are added to the library. calibre assumes that each directory contains many books. All ebook files with the same name in a directory are assumed to be the same book in different formats. Ebooks with different names are added as different books.
|
||||
3. **Add books from directories, including sub-directories (Multiple books per directory, assumes every e-book file is a different book)**: Allows you to choose a directory. The directory and all its sub-directories are scanned recursively and any e-books found are added to the library. calibre assumes that each directory contains many books. All e-book files with the same name in a directory are assumed to be the same book in different formats. E-books with different names are added as different books.
|
||||
|
||||
4. **Add multiple books from archive (ZIP/RAR)**: Allows you to add multiple ebooks that are stored inside the selected ZIP or RAR files. It is a convenient shortcut that avoids having to first unzip the archive and then add the books via one of the above two options.
|
||||
4. **Add multiple books from archive (ZIP/RAR)**: Allows you to add multiple e-books that are stored inside the selected ZIP or RAR files. It is a convenient shortcut that avoids having to first unzip the archive and then add the books via one of the above two options.
|
||||
|
||||
5. **Add empty book (Book Entry with no formats)**: Allows you to create a blank book record. This can be used to then manually fill out the information about a book that you may not have yet in your collection.
|
||||
|
||||
@ -59,7 +59,7 @@ Add books
|
||||
|
||||
7. **Add files to selected book records**: Allows you to add or update the files associated with an existing book in your library.
|
||||
|
||||
The :guilabel:`Add books` action can read metadata from a wide variety of ebook formats. In addition, it tries to guess metadata from the filename.
|
||||
The :guilabel:`Add books` action can read metadata from a wide variety of e-book formats. In addition, it tries to guess metadata from the filename.
|
||||
See the :ref:`config_filename_metadata` section, to learn how to configure this.
|
||||
|
||||
To add an additional format for an existing book you can do any of three things:
|
||||
@ -79,7 +79,7 @@ Edit metadata
|
||||
|
||||
|emii| The :guilabel:`Edit metadata` action has four variations which can be accessed by doing a right-click on the button.
|
||||
|
||||
1. **Edit metadata individually**: Allows you to edit the metadata of books one-by-one with the option of fetching metadata, including covers, from the Internet. It also allows you to add or remove particular ebook formats from a book.
|
||||
1. **Edit metadata individually**: Allows you to edit the metadata of books one-by-one with the option of fetching metadata, including covers, from the Internet. It also allows you to add or remove particular e-book formats from a book.
|
||||
2. **Edit metadata in bulk**: Allows you to edit common metadata fields for large numbers of books simultaneously. It operates on all the books you have selected in the :ref:`Library view <search_sort>`.
|
||||
3. **Download metadata and covers**: Downloads metadata and covers (if available) for the books that are selected in the book list.
|
||||
4. **Merge book records**: Gives you the capability of merging the metadata and formats of two or more book records. You can choose to either delete or keep the records that were not clicked first.
|
||||
@ -93,24 +93,24 @@ Convert books
|
||||
.. |cei| image:: images/convert_ebooks.png
|
||||
:class: float-right-img
|
||||
|
||||
|cei| Ebooks can be converted from a number of formats into whatever format your ebook reader prefers.
|
||||
Many ebooks available for purchase will be protected by `Digital Rights Management <https://drmfree.calibre-ebook.com/about#drm>`_ *(DRM)* technology.
|
||||
calibre will not convert these ebooks. It is easy to remove the DRM from many formats, but as this may be illegal,
|
||||
|cei| E-books can be converted from a number of formats into whatever format your e-book reader prefers.
|
||||
Many e-books available for purchase will be protected by `Digital Rights Management <https://drmfree.calibre-ebook.com/about#drm>`_ *(DRM)* technology.
|
||||
calibre will not convert these e-books. It is easy to remove the DRM from many formats, but as this may be illegal,
|
||||
you will have to find tools to liberate your books yourself and then use calibre to convert them.
|
||||
|
||||
For most people, conversion should be a simple one-click affair. If you want to learn more about the conversion process, see :ref:`conversion`.
|
||||
|
||||
The :guilabel:`Convert books` action has three variations, accessed by doing a right-click on the button.
|
||||
|
||||
1. **Convert individually**: Allows you to specify conversion options to customize the conversion of each selected ebook.
|
||||
1. **Convert individually**: Allows you to specify conversion options to customize the conversion of each selected e-book.
|
||||
|
||||
2. **Bulk convert**: Allows you to specify options only once to convert a number of ebooks in bulk.
|
||||
2. **Bulk convert**: Allows you to specify options only once to convert a number of e-books in bulk.
|
||||
|
||||
3. **Create a catalog of the books in your calibre library**: Allows you to generate a complete listing of the books in your library, including all metadata,
|
||||
in several formats such as XML, CSV, BiBTeX, EPUB and MOBI. The catalog will contain all the books currently showing in the library view.
|
||||
This allows you to use the search features to limit the books to be catalogued. In addition, if you select multiple books using the mouse,
|
||||
only those books will be added to the catalog. If you generate the catalog in an ebook format such as EPUB, MOBI or AZW3,
|
||||
the next time you connect your ebook reader the catalog will be automatically sent to the device.
|
||||
only those books will be added to the catalog. If you generate the catalog in an e-book format such as EPUB, MOBI or AZW3,
|
||||
the next time you connect your e-book reader the catalog will be automatically sent to the device.
|
||||
For more information on how catalogs work, read the :ref:`catalog_tut`.
|
||||
|
||||
.. _view:
|
||||
@ -120,7 +120,7 @@ View
|
||||
.. |vi| image:: images/view.png
|
||||
:class: float-right-img
|
||||
|
||||
|vi| The :guilabel:`View` action displays the book in an ebook viewer program. calibre has a built-in viewer for many ebook formats.
|
||||
|vi| The :guilabel:`View` action displays the book in an e-book viewer program. calibre has a built-in viewer for many e-book formats.
|
||||
For other formats it uses the default operating system application. You can configure which formats should open with the internal viewer via
|
||||
Preferences->Behavior. If a book has more than one format, you can view a particular format by doing a right-click on the button.
|
||||
|
||||
@ -134,17 +134,17 @@ Send to device
|
||||
|
||||
|stdi| The :guilabel:`Send to device` action has eight variations, accessed by doing a right-click on the button.
|
||||
|
||||
1. **Send to main memory**: The selected books are transferred to the main memory of the ebook reader.
|
||||
2. **Send to card (A)**: The selected books are transferred to the storage card (A) on the ebook reader.
|
||||
3. **Send to card (B)**: The selected books are transferred to the storage card (B) on the ebook reader.
|
||||
1. **Send to main memory**: The selected books are transferred to the main memory of the e-book reader.
|
||||
2. **Send to card (A)**: The selected books are transferred to the storage card (A) on the e-book reader.
|
||||
3. **Send to card (B)**: The selected books are transferred to the storage card (B) on the e-book reader.
|
||||
4. **Send specific format to**: The selected books are transferred to the selected storage location on the device, in the format that you specify.
|
||||
5. **Eject device**: Detaches the device from calibre.
|
||||
6. **Set default send to device action**: Allows you to specify which of the options, 1 through 5 above or 7 below, will be the default action when you click the main button.
|
||||
7. **Send and delete from library**: The selected books are transferred to the selected storage location on the device and then **deleted** from the Library.
|
||||
8. **Fetch Annotations (experimental)**: Transfers annotations you may have made on an ebook on your device to the comments metadata of the book in the calibre library.
|
||||
8. **Fetch Annotations (experimental)**: Transfers annotations you may have made on an e-book on your device to the comments metadata of the book in the calibre library.
|
||||
|
||||
You can control the file name and folder structure of files sent to the device by setting up a template in
|
||||
:guilabel:`Preferences->Import/Export->Sending books to devices`. Also see :ref:`templatelangcalibre`.
|
||||
:guilabel:`Preferences->Import/export->Sending books to devices`. Also see :ref:`templatelangcalibre`.
|
||||
|
||||
.. _fetch_news:
|
||||
|
||||
@ -153,7 +153,7 @@ Fetch news
|
||||
.. |fni| image:: images/fetch_news.png
|
||||
:class: float-right-img
|
||||
|
||||
|fni| The :guilabel:`Fetch news` action downloads news from various websites and converts it into an ebook that can be read on your ebook reader. Normally, the newly created ebook is added to your ebook library, but if an ebook reader is connected at the time the download finishes, the news is also uploaded to the reader automatically.
|
||||
|fni| The :guilabel:`Fetch news` action downloads news from various websites and converts it into an e-book that can be read on your e-book reader. Normally, the newly created e-book is added to your e-book library, but if an e-book reader is connected at the time the download finishes, the news is also uploaded to the reader automatically.
|
||||
|
||||
The :guilabel:`Fetch news` action uses simple recipes (10-15 lines of code) for each news site. To learn how to create recipes for your own news sources, see :ref:`news`.
|
||||
|
||||
@ -180,7 +180,7 @@ Library
|
||||
5. **<library name>**: Actions 5, 6 etc... give you immediate switch access between multiple libraries that you have created or attached to. This list contains only the 5 most frequently used libraries. For the complete list, use the Quick Switch menu.
|
||||
6. **Library maintenance**: Allows you to check the current library for data consistency issues and restore the current library's database from backups.
|
||||
|
||||
.. note:: Metadata about your ebooks, e.g. title, author, and tags, is stored in a single file in your calibre library folder called metadata.db. If this file gets corrupted (a very rare event), you can lose the metadata. Fortunately, calibre automatically backs up the metadata for every individual book in the book's folder as an OPF file. By using the Restore database action under Library Maintenance described above, you can have calibre rebuild the metadata.db file from the individual OPF files for you.
|
||||
.. note:: Metadata about your e-books, e.g. title, author, and tags, is stored in a single file in your calibre library folder called metadata.db. If this file gets corrupted (a very rare event), you can lose the metadata. Fortunately, calibre automatically backs up the metadata for every individual book in the book's folder as an OPF file. By using the Restore database action under Library Maintenance described above, you can have calibre rebuild the metadata.db file from the individual OPF files for you.
|
||||
|
||||
You can copy or move books between different libraries (once you have more than one library setup) by right clicking on the book and selecting the action :guilabel:`Copy to library`.
|
||||
|
||||
@ -213,7 +213,7 @@ Save to disk
|
||||
Book Files
|
||||
|
||||
You can control the file name and folder structure of files saved to disk by setting up a template in
|
||||
:guilabel:`Preferences->Import/Export->Saving books to disk`. Also see :ref:`templatelangcalibre`.
|
||||
:guilabel:`Preferences->Import/export->Saving books to disk`. Also see :ref:`templatelangcalibre`.
|
||||
|
||||
.. _save_to_disk_single:
|
||||
|
||||
@ -221,22 +221,22 @@ Save to disk
|
||||
|
||||
For 1. and 2., all available formats, as well as metadata, are stored to disk for each selected book. Metadata is stored in an OPF file. Saved books can be re-imported to the library without any loss of information by using the :ref:`Add books <add_books>` action.
|
||||
|
||||
3. **Save only *<your preferred>* format to disk**: Saves the selected books to disk in the directory structure as shown in (1.) but only in your preferred ebook format. You can set your preferred format in :guilabel:`Preferences->Behaviour->Preferred output format`
|
||||
3. **Save only *<your preferred>* format to disk**: Saves the selected books to disk in the directory structure as shown in (1.) but only in your preferred e-book format. You can set your preferred format in :guilabel:`Preferences->Behaviour->Preferred output format`
|
||||
|
||||
4. **Save only *<your preferred>* format to disk in a single directory**: Saves the selected books to disk in a single directory but only in your preferred ebook format. You can set your preferred format in :guilabel:`Preferences->Behaviour->Preferred output format`
|
||||
4. **Save only *<your preferred>* format to disk in a single directory**: Saves the selected books to disk in a single directory but only in your preferred e-book format. You can set your preferred format in :guilabel:`Preferences->Behaviour->Preferred output format`
|
||||
|
||||
5. **Save single format to disk...**: Saves the selected books to disk in the directory structure as shown in (1.) but only in the format you select from the pop-out list.
|
||||
|
||||
.. _connect_share:
|
||||
|
||||
Connect/Share
|
||||
Connect/share
|
||||
~~~~~~~~~~~~~~~~~
|
||||
.. |csi| image:: images/connect_share.png
|
||||
:class: float-right-img
|
||||
|
||||
|csi| The :guilabel:`Connect/Share` action allows you to manually connect to a device or folder on your computer. It also allows you to set up your calibre library for access via a web browser or email.
|
||||
|csi| The :guilabel:`Connect/share` action allows you to manually connect to a device or folder on your computer. It also allows you to set up your calibre library for access via a web browser or email.
|
||||
|
||||
The :guilabel:`Connect/Share` action has four variations, accessed by doing a right-click on the button.
|
||||
The :guilabel:`Connect/share` action has four variations, accessed by doing a right-click on the button.
|
||||
|
||||
1. **Connect to folder**: Allows you to connect to any folder on your computer as though it were a device and use all the facilities calibre has for devices with that folder. Useful if your device cannot be supported by calibre but is available as a USB disk.
|
||||
|
||||
@ -253,22 +253,22 @@ Remove books
|
||||
.. |rbi| image:: images/remove_books.png
|
||||
:class: float-right-img
|
||||
|
||||
|rbi| The :guilabel:`Remove books` action **deletes books permanently**, so use it with care. It is *context sensitive*, i.e. it depends on which :ref:`catalog <catalogs>` you have selected. If you have selected the :guilabel:`Library`, books will be removed from the library. If you have selected the ebook reader device, books will be removed from the device. To remove only a particular format for a given book use the :ref:`edit_meta_information` action. Remove books also has five variations which can be accessed by doing a right-click on the button.
|
||||
|rbi| The :guilabel:`Remove books` action **deletes books permanently**, so use it with care. It is *context sensitive*, i.e. it depends on which :ref:`catalog <catalogs>` you have selected. If you have selected the :guilabel:`Library`, books will be removed from the library. If you have selected the e-book reader device, books will be removed from the device. To remove only a particular format for a given book use the :ref:`edit_meta_information` action. Remove books also has five variations which can be accessed by doing a right-click on the button.
|
||||
|
||||
1. **Remove selected books**: Allows you to **permanently** remove all books that are selected in the book list.
|
||||
|
||||
2. **Remove files of a specific format from selected books...**: Allows you to **permanently** remove ebook files of a specified format from books that are selected in the book list.
|
||||
2. **Remove files of a specific format from selected books...**: Allows you to **permanently** remove e-book files of a specified format from books that are selected in the book list.
|
||||
|
||||
3. **Remove all formats from selected books, except...**: Allows you to **permanently** remove ebook files of any format except a specified format from books that are selected in the book list.
|
||||
3. **Remove all formats from selected books, except...**: Allows you to **permanently** remove e-book files of any format except a specified format from books that are selected in the book list.
|
||||
|
||||
4. **Remove all formats from selected books**: Allows you to **permanently** remove all ebook files from books that are selected in the book list. Only the metadata will remain.
|
||||
4. **Remove all formats from selected books**: Allows you to **permanently** remove all e-book files from books that are selected in the book list. Only the metadata will remain.
|
||||
|
||||
5. **Remove covers from selected books**: Allows you to **permanently** remove cover image files from books that are selected in the book list.
|
||||
|
||||
6. **Remove matching books from device**: Allows you to remove ebook files from a connected device that match the books that are selected in the book list.
|
||||
6. **Remove matching books from device**: Allows you to remove e-book files from a connected device that match the books that are selected in the book list.
|
||||
|
||||
.. note::
|
||||
Note that when you use Remove books to delete books from your calibre library, the book record is permanently deleted, but on Windows and OS X the files are placed into the recycle bin. This allows you to recover them if you change your mind.
|
||||
Note that when you use :guilabel:`Remove books` to delete books from your calibre library, the book record is permanently deleted, but on Windows and OS X the files are placed into the recycle bin. This allows you to recover them if you change your mind.
|
||||
|
||||
.. _configuration:
|
||||
|
||||
@ -295,7 +295,7 @@ A *catalog* is a collection of books. calibre can manage two types of different
|
||||
|
||||
1. **Library**: This is a collection of books stored in your calibre library on your computer.
|
||||
|
||||
2. **Device**: This is a collection of books stored in your ebook reader. It will be available when you connect the reader to your computer.
|
||||
2. **Device**: This is a collection of books stored in your e-book reader. It will be available when you connect the reader to your computer.
|
||||
|
||||
Many operations, such as adding books, deleting, viewing, etc., are context sensitive. So, for example, if you click the :guilabel:`View` button when you have the **Device** catalog selected, calibre will open the files on the device to view. If you have the **Library** catalog selected, files in your calibre library will be opened instead.
|
||||
|
||||
@ -462,7 +462,7 @@ be configured to read metadata from the file name instead, via
|
||||
You can also control how metadata is read from the filename using regular
|
||||
expressions (see :doc:`regexp`). In the :guilabel:`Adding Books` section of
|
||||
the configuration dialog, you can specify a regular expression that calibre
|
||||
will use to try and guess metadata from the names of ebook files that you add
|
||||
will use to try and guess metadata from the names of e-book files that you add
|
||||
to the library. The default regular expression is::
|
||||
|
||||
title - author
|
||||
@ -497,7 +497,7 @@ Similarly, if you download metadata for the book, the Book details panel will
|
||||
automatically show you links pointing to the web pages for the book on amazon,
|
||||
worldcat, etc. from where the metadata was downloaded.
|
||||
|
||||
You can right click on individual ebook formats in the Book details panel to
|
||||
You can right click on individual e-book formats in the Book details panel to
|
||||
delete them, compare them to their original versions, save them to disk, open
|
||||
them with an external program, etc.
|
||||
|
||||
@ -505,7 +505,7 @@ You can change the cover of the book by simply drag and dropping an
|
||||
image onto the book details panel. If you wish to edit the cover image in
|
||||
an external program, simply right click on it and choose :guilabel:`Open With`.
|
||||
|
||||
You can also add ebook files to the current book by drag and dropping the files
|
||||
You can also add e-book files to the current book by drag and dropping the files
|
||||
onto the book details panel.
|
||||
|
||||
Double clicking the book details panel will open it up in a separate popup
|
||||
@ -615,7 +615,7 @@ Jobs
|
||||
.. image:: images/jobs.png
|
||||
:class: float-left-img
|
||||
|
||||
The Jobs panel shows the number of currently running jobs. Jobs are tasks that run in a separate process. They include converting ebooks and talking to your reader device. You can click on the jobs panel to access the list of jobs. Once a job has completed you can see a detailed log from that job by double-clicking it in the list. This is useful to debug jobs that may not have completed successfully.
|
||||
The Jobs panel shows the number of currently running jobs. Jobs are tasks that run in a separate process. They include converting e-books and talking to your reader device. You can click on the jobs panel to access the list of jobs. Once a job has completed you can see a detailed log from that job by double-clicking it in the list. This is useful to debug jobs that may not have completed successfully.
|
||||
|
||||
.. raw:: html epub
|
||||
|
||||
@ -624,7 +624,7 @@ The Jobs panel shows the number of currently running jobs. Jobs are tasks that r
|
||||
Keyboard Shortcuts
|
||||
---------------------
|
||||
|
||||
calibre has several keyboard shortcuts to save you time and mouse movement. These shortcuts are active in the book list view (when you're not editing the details of a particular book), and most of them affect the title you have selected. The calibre ebook viewer has its own shortcuts which can be customised by clicking the :guilabel:`Preferences` button in the viewer.
|
||||
calibre has several keyboard shortcuts to save you time and mouse movement. These shortcuts are active in the book list view (when you're not editing the details of a particular book), and most of them affect the title you have selected. The calibre e-book viewer has its own shortcuts which can be customised by clicking the :guilabel:`Preferences` button in the viewer.
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -16,7 +16,7 @@ Adding your favorite news website to calibre
|
||||
|
||||
news
|
||||
|
||||
The calibre ebook viewer
|
||||
The calibre e-book viewer
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. toctree::
|
||||
@ -24,7 +24,7 @@ The calibre ebook viewer
|
||||
|
||||
viewer
|
||||
|
||||
Customizing calibre's ebook conversion
|
||||
Customizing calibre's e-book conversion
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. toctree::
|
||||
@ -32,7 +32,7 @@ Customizing calibre's ebook conversion
|
||||
|
||||
conversion
|
||||
|
||||
Editing ebooks
|
||||
Editing e-books
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. toctree::
|
||||
@ -40,7 +40,7 @@ Editing ebooks
|
||||
|
||||
edit
|
||||
|
||||
Comparing ebooks
|
||||
Comparing e-books
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. toctree::
|
||||
@ -48,7 +48,7 @@ Comparing ebooks
|
||||
|
||||
diff
|
||||
|
||||
Editing ebook metadata
|
||||
Editing e-book metadata
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. toctree::
|
||||
|
@ -7,7 +7,7 @@ Editing e-book metadata
|
||||
:depth: 2
|
||||
:local:
|
||||
|
||||
Ebooks come in all shapes and sizes and more often than not, their metadata (things like title/author/series/publisher) is incomplete or incorrect.
|
||||
E-books come in all shapes and sizes and more often than not, their metadata (things like title/author/series/publisher) is incomplete or incorrect.
|
||||
The simplest way to change metadata in calibre is to simply double click on an entry and type in the correct replacement.
|
||||
For more sophisticated, "power editing" use the edit metadata tools discussed below.
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
Adding your favorite news website
|
||||
==================================
|
||||
|
||||
calibre has a powerful, flexible and easy-to-use framework for downloading news from the Internet and converting it into an ebook. The following will show you, by means of examples, how to get news from various websites.
|
||||
calibre has a powerful, flexible and easy-to-use framework for downloading news from the Internet and converting it into an e-book. The following will show you, by means of examples, how to get news from various websites.
|
||||
|
||||
To gain an understanding of how to use the framework, follow the examples in the order listed below:
|
||||
|
||||
@ -27,20 +27,20 @@ The calibre blog
|
||||
|
||||
The calibre blog is a blog of posts that describe many useful calibre features
|
||||
in a simple and accessible way for new calibre users. In order to download this
|
||||
blog into an ebook, we rely on the :term:`RSS` feed of the blog::
|
||||
blog into an e-book, we rely on the :term:`RSS` feed of the blog::
|
||||
|
||||
https://blog.calibre-ebook.com/feeds/posts/default
|
||||
|
||||
I got the RSS URL by looking under "Subscribe to" at the bottom of the blog
|
||||
page and choosing :guilabel:`Posts->Atom`. To make calibre download the feeds and convert
|
||||
them into an ebook, you should right click the :guilabel:`Fetch news` button
|
||||
them into an e-book, you should right click the :guilabel:`Fetch news` button
|
||||
and then the :guilabel:`Add a custom news source` menu item and then the
|
||||
:guilabel:`New Recipe` button. A dialog similar to that shown below should open up.
|
||||
|
||||
.. image:: images/custom_news.png
|
||||
:align: center
|
||||
|
||||
First enter ``calibre Blog`` into the :guilabel:`Recipe title` field. This will be the title of the ebook that will be created from the articles in the above feeds.
|
||||
First enter ``calibre Blog`` into the :guilabel:`Recipe title` field. This will be the title of the e-book that will be created from the articles in the above feeds.
|
||||
|
||||
The next two fields (:guilabel:`Oldest article` and :guilabel:`Max. number of articles`) allow you some control over how many articles should be downloaded from each feed, and they are pretty self explanatory.
|
||||
|
||||
@ -48,9 +48,9 @@ To add the feeds to the recipe, enter the feed title and the feed URL and click
|
||||
the :guilabel:`Add feed` button. Once you have added the feed, simply click the
|
||||
:guilabel:`Save` button and you're done! Close the dialog.
|
||||
|
||||
To test your new :term:`recipe`, click the :guilabel:`Fetch news` button and in the :guilabel:`Custom news sources` sub-menu click :guilabel:`calibre Blog`. After a couple of minutes, the newly downloaded ebook of blog posts will appear in the main library view (if you have your reader connected, it will be put onto the reader instead of into the library). Select it and hit the :guilabel:`View` button to read!
|
||||
To test your new :term:`recipe`, click the :guilabel:`Fetch news` button and in the :guilabel:`Custom news sources` sub-menu click :guilabel:`calibre Blog`. After a couple of minutes, the newly downloaded e-book of blog posts will appear in the main library view (if you have your reader connected, it will be put onto the reader instead of into the library). Select it and hit the :guilabel:`View` button to read!
|
||||
|
||||
The reason this worked so well, with so little effort is that the blog provides *full-content* :term:`RSS` feeds, i.e., the article content is embedded in the feed itself. For most news sources that provide news in this fashion, with *full-content* feeds, you don't need any more effort to convert them to ebooks. Now we will look at a news source that does not provide full content feeds. In such feeds, the full article is a webpage and the feed only contains a link to the webpage with a short summary of the article.
|
||||
The reason this worked so well, with so little effort is that the blog provides *full-content* :term:`RSS` feeds, i.e., the article content is embedded in the feed itself. For most news sources that provide news in this fashion, with *full-content* feeds, you don't need any more effort to convert them to e-books. Now we will look at a news source that does not provide full content feeds. In such feeds, the full article is a webpage and the feed only contains a link to the webpage with a short summary of the article.
|
||||
|
||||
.. _bbc:
|
||||
|
||||
@ -62,19 +62,19 @@ Lets try the following two feeds from *The BBC*:
|
||||
#. News Front Page: https://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
|
||||
#. Science/Nature: https://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml
|
||||
|
||||
Follow the procedure outlined in :ref:`calibre_blog` above to create a recipe for *The BBC* (using the feeds above). Looking at the downloaded ebook, we see that calibre has done a creditable job of extracting only the content you care about from each article's webpage. However, the extraction process is not perfect. Sometimes it leaves in undesirable content like menus and navigation aids or it removes content that should have been left alone, like article headings. In order, to have perfect content extraction, we will need to customize the fetch process, as described in the next section.
|
||||
Follow the procedure outlined in :ref:`calibre_blog` above to create a recipe for *The BBC* (using the feeds above). Looking at the downloaded e-book, we see that calibre has done a creditable job of extracting only the content you care about from each article's webpage. However, the extraction process is not perfect. Sometimes it leaves in undesirable content like menus and navigation aids or it removes content that should have been left alone, like article headings. In order, to have perfect content extraction, we will need to customize the fetch process, as described in the next section.
|
||||
|
||||
Customizing the fetch process
|
||||
--------------------------------
|
||||
|
||||
When you want to perfect the download process, or download content from a particularly complex website, you can avail yourself of all the power and flexibility of the :term:`recipe` framework. In order to do that, in the :guilabel:`Add custom news sources` dialog, simply click the :guilabel:`Switch to Advanced mode` button.
|
||||
|
||||
The easiest and often most productive customization is to use the print version of the online articles. The print version typically has much less cruft and translates much more smoothly to an ebook. Let's try to use the print version of the articles from *The BBC*.
|
||||
The easiest and often most productive customization is to use the print version of the online articles. The print version typically has much less cruft and translates much more smoothly to an e-book. Let's try to use the print version of the articles from *The BBC*.
|
||||
|
||||
Using the print version of bbc.co.uk
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The first step is to look at the ebook we downloaded previously from :ref:`bbc`. At the end of each article, in the ebook is a little blurb telling you where the article was downloaded from. Copy and paste that URL into a browser. Now on the article webpage look for a link that points to the "Printable version". Click it to see the print version of the article. It looks much neater! Now compare the two URLs. For me they were:
|
||||
The first step is to look at the e-book we downloaded previously from :ref:`bbc`. At the end of each article, in the e-book is a little blurb telling you where the article was downloaded from. Copy and paste that URL into a browser. Now on the article webpage look for a link that points to the "Printable version". Click it to see the print version of the article. It looks much neater! Now compare the two URLs. For me they were:
|
||||
|
||||
Article URL
|
||||
https://news.bbc.co.uk/2/hi/science/nature/7312016.stm
|
||||
@ -105,7 +105,7 @@ This is python, so indentation is important. After you've added the lines, it sh
|
||||
|
||||
In the above, ``def print_version(self, url)`` defines a *method* that is called by calibre for every article. ``url`` is the URL of the original article. What ``print_version`` does is take that url and replace it with the new URL that points to the print version of the article. To learn about `python <https://www.python.org>`_ see the `tutorial <https://docs.python.org/2/tutorial/>`_.
|
||||
|
||||
Now, click the :guilabel:`Add/update recipe` button and your changes will be saved. Re-download the ebook. You should have a much improved ebook. One of the problems with the new version is that the fonts on the print version webpage are too small. This is automatically fixed when converting to an ebook, but even after the fixing process, the font size of the menus and navigation bar to become too large relative to the article text. To fix this, we will do some more customization, in the next section.
|
||||
Now, click the :guilabel:`Add/update recipe` button and your changes will be saved. Re-download the e-book. You should have a much improved e-book. One of the problems with the new version is that the fonts on the print version webpage are too small. This is automatically fixed when converting to an e-book, but even after the fixing process, the font size of the menus and navigation bar to become too large relative to the article text. To fix this, we will do some more customization, in the next section.
|
||||
|
||||
Replacing article styles
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -138,7 +138,7 @@ This can be removed by adding::
|
||||
|
||||
remove_tags = [dict(name='div', attrs={'class':'footer'})]
|
||||
|
||||
to the recipe. Finally, lets replace some of the :term:`CSS` that we disabled earlier, with our own :term:`CSS` that is suitable for conversion to an ebook::
|
||||
to the recipe. Finally, lets replace some of the :term:`CSS` that we disabled earlier, with our own :term:`CSS` that is suitable for conversion to an e-book::
|
||||
|
||||
extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'
|
||||
|
||||
@ -241,7 +241,7 @@ We see several new features in this :term:`recipe`. First, we have::
|
||||
|
||||
timefmt = ' [%a, %d %b, %Y]'
|
||||
|
||||
This sets the displayed time on the front page of the created ebook to be in the format,
|
||||
This sets the displayed time on the front page of the created e-book to be in the format,
|
||||
``Day, Day_Number Month, Year``. See :attr:`timefmt <calibre.web.feeds.news.BasicNewsRecipe.timefmt>`.
|
||||
|
||||
Then we see a group of directives to cleanup the downloaded :term:`HTML`::
|
||||
@ -265,7 +265,7 @@ The next new feature is the
|
||||
:meth:`calibre.web.feeds.news.BasicNewsRecipe.parse_index` method. Its job is
|
||||
to go to https://www.nytimes.com/pages/todayspaper/index.html and fetch the list
|
||||
of articles that appear in *todays* paper. While more complex than simply using
|
||||
:term:`RSS`, the recipe creates an ebook that corresponds very closely to the
|
||||
:term:`RSS`, the recipe creates an e-book that corresponds very closely to the
|
||||
days paper. ``parse_index`` makes heavy use of `BeautifulSoup
|
||||
<https://www.crummy.com/software/BeautifulSoup/documentation.html>`_ to parse
|
||||
the daily paper webpage. You can also use other, more modern parsers if you
|
||||
@ -299,7 +299,7 @@ feeds. In addition, ebook-convert will put the downloaded HTML into the
|
||||
``debug/input`` directory, where ``debug`` is the directory you specified in
|
||||
the :option:`ebook-convert --debug-pipeline` option.
|
||||
|
||||
Once the download is complete, you can look at the downloaded :term:`HTML` by opening the file :file:`debug/input/index.html` in a browser. Once you're satisfied that the download and preprocessing is happening correctly, you can generate ebooks in different formats as shown below::
|
||||
Once the download is complete, you can look at the downloaded :term:`HTML` by opening the file :file:`debug/input/index.html` in a browser. Once you're satisfied that the download and preprocessing is happening correctly, you can generate e-books in different formats as shown below::
|
||||
|
||||
ebook-convert myrecipe.recipe myrecipe.epub
|
||||
ebook-convert myrecipe.recipe myrecipe.mobi
|
||||
@ -316,7 +316,7 @@ If you're satisfied with your recipe, and you feel there is enough demand to jus
|
||||
.. seealso::
|
||||
|
||||
:doc:`generated/en/ebook-convert`
|
||||
The command line interface for all ebook conversion.
|
||||
The command line interface for all e-book conversion.
|
||||
|
||||
|
||||
Further reading
|
||||
|
@ -3,7 +3,7 @@
|
||||
API documentation for the e-book editing tools
|
||||
===============================================
|
||||
|
||||
The ebook editing tools consist of a
|
||||
The e-book editing tools consist of a
|
||||
:class:`calibre.ebooks.oeb.polish.container.Container` object that represents a
|
||||
book as a collection of HTML + resource files, and various tools that can be
|
||||
used to perform operations on the container. All the tools are in the form of
|
||||
@ -17,7 +17,7 @@ You obtain a container object for a book at a path like this::
|
||||
from calibre.ebooks.oeb.polish.container import get_container
|
||||
container = get_container('Path to book file', tweak_mode=True)
|
||||
|
||||
If you are writing a plugin for the ebook editor, you get the current container
|
||||
If you are writing a plugin for the e-book editor, you get the current container
|
||||
for the book being edited like this::
|
||||
|
||||
from calibre.gui2.tweak_book import current_container
|
||||
@ -130,7 +130,7 @@ Edit book tool
|
||||
Controlling the editor's user interface
|
||||
-----------------------------------------
|
||||
|
||||
The ebook editor's user interface is controlled by a single global *Boss*
|
||||
The e-book editor's user interface is controlled by a single global *Boss*
|
||||
object. This has many useful methods that can be used in plugin code to
|
||||
perform common tasks.
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
All about using regular expressions in calibre
|
||||
=======================================================
|
||||
|
||||
Regular expressions are features used in many places in calibre to perform sophisticated manipulation of ebook content and metadata. This tutorial is a gentle introduction to getting you started with using regular expressions in calibre.
|
||||
Regular expressions are features used in many places in calibre to perform sophisticated manipulation of e-book content and metadata. This tutorial is a gentle introduction to getting you started with using regular expressions in calibre.
|
||||
|
||||
.. contents:: Contents
|
||||
:depth: 2
|
||||
@ -39,7 +39,7 @@ Well, that's why we're here. First, this is the most important concept in regula
|
||||
That doesn't sound too bad. What's next?
|
||||
------------------------------------------
|
||||
|
||||
Next is the beginning of the really good stuff. Remember where I said that regular expressions can match multiple strings? This is where it gets a little more complicated. Say, as a somewhat more practical exercise, the ebook you wanted to convert had a nasty footer counting the pages, like "Page 5 of 423". Obviously the page number would rise from 1 to 423, thus you'd have to match 423 different strings, right? Wrong, actually: regular expressions allow you to define sets of characters that are matched: To define a set, you put all the characters you want to be in the set into square brackets. So, for example, the set ``[abc]`` would match either the character "a", "b" or "c". *Sets will always only match one of the characters in the set*. They "understand" character ranges, that is, if you wanted to match all the lower case characters, you'd use the set ``[a-z]`` for lower- and uppercase characters you'd use ``[a-zA-Z]`` and so on. Got the idea? So, obviously, using the expression ``Page [0-9] of 423`` you'd be able to match the first 9 pages, thus reducing the expressions needed to three: The second expression ``Page [0-9][0-9] of 423`` would match all two-digit page numbers, and I'm sure you can guess what the third expression would look like. Yes, go ahead. Write it down.
|
||||
Next is the beginning of the really good stuff. Remember where I said that regular expressions can match multiple strings? This is where it gets a little more complicated. Say, as a somewhat more practical exercise, the e-book you wanted to convert had a nasty footer counting the pages, like "Page 5 of 423". Obviously the page number would rise from 1 to 423, thus you'd have to match 423 different strings, right? Wrong, actually: regular expressions allow you to define sets of characters that are matched: To define a set, you put all the characters you want to be in the set into square brackets. So, for example, the set ``[abc]`` would match either the character "a", "b" or "c". *Sets will always only match one of the characters in the set*. They "understand" character ranges, that is, if you wanted to match all the lower case characters, you'd use the set ``[a-z]`` for lower- and uppercase characters you'd use ``[a-zA-Z]`` and so on. Got the idea? So, obviously, using the expression ``Page [0-9] of 423`` you'd be able to match the first 9 pages, thus reducing the expressions needed to three: The second expression ``Page [0-9][0-9] of 423`` would match all two-digit page numbers, and I'm sure you can guess what the third expression would look like. Yes, go ahead. Write it down.
|
||||
|
||||
Hey, neat! This is starting to make sense!
|
||||
---------------------------------------------
|
||||
@ -72,7 +72,7 @@ As a last note on sets, you can also define a set as any character *but* those i
|
||||
But if I had a few varying strings I wanted to match, things get complicated?
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Fear not, life still is good and easy. Consider this example: The book you're converting has "Title" written on every odd page and "Author" written on every even page. Looks great in print, right? But in ebooks, it's annoying. You can group whole expressions in normal parentheses, and the character ``"|"`` will let you match *either* the expression to its right *or* the one to its left. Combine those and you're done. Too fast for you? Okay, first off, we group the expressions for odd and even pages, thus getting ``(Title)(Author)`` as our two needed expressions. Now we make things simpler by using the vertical bar (``"|"`` is called the vertical bar character): If you use the expression ``(Title|Author)`` you'll either get a match for "Title" (on the odd pages) or you'd match "Author" (on the even pages). Well, wasn't that easy?
|
||||
Fear not, life still is good and easy. Consider this example: The book you're converting has "Title" written on every odd page and "Author" written on every even page. Looks great in print, right? But in e-books, it's annoying. You can group whole expressions in normal parentheses, and the character ``"|"`` will let you match *either* the expression to its right *or* the one to its left. Combine those and you're done. Too fast for you? Okay, first off, we group the expressions for odd and even pages, thus getting ``(Title)(Author)`` as our two needed expressions. Now we make things simpler by using the vertical bar (``"|"`` is called the vertical bar character): If you use the expression ``(Title|Author)`` you'll either get a match for "Title" (on the odd pages) or you'd match "Author" (on the even pages). Well, wasn't that easy?
|
||||
|
||||
You can, of course, use the vertical bar without using grouping parentheses, as well. Remember when I said that quantifiers repeat the element preceding them? Well, the vertical bar works a little differently: The expression "Title|Author" will also match either the string "Title" or the string "Author", just as the above example using grouping. *The vertical bar selects between the entire expression preceding and following it*. So, if you wanted to match the strings "Calibre" and "calibre" and wanted to select only between the upper- and lowercase "c", you'd have to use the expression ``(c|C)alibre``, where the grouping ensures that only the "c" will be selected. If you were to use ``c|Calibre``, you'd get a match on the string "c" or on the string "Calibre", which isn't what we wanted. In short: If in doubt, use grouping together with the vertical bar.
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
calibre User Manual
|
||||
===============================================
|
||||
|
||||
calibre is an ebook library manager. It can view, convert and catalog ebooks in most of the major ebook formats. It can also talk to many ebook reader devices. It can go out to the Internet and fetch metadata for your books. It can download newspapers and convert them into ebooks for convenient reading. It is cross platform, running on Linux, Windows and OS X.
|
||||
calibre is an e-book library manager. It can view, convert and catalog e-books in most of the major e-book formats. It can also talk to many e-book reader devices. It can go out to the Internet and fetch metadata for your books. It can download newspapers and convert them into e-books for convenient reading. It is cross platform, running on Linux, Windows and OS X.
|
||||
|
||||
You've just started calibre. What do you do now? Before calibre can do anything with your ebooks, it first has to know about them. Drag and drop a few ebook files into calibre, or click the "Add books" button and browse for the ebooks you want to work with. Once you've added the books, they will show up in the main view looking something like this:
|
||||
You've just started calibre. What do you do now? Before calibre can do anything with your e-books, it first has to know about them. Drag and drop a few e-book files into calibre, or click the "Add books" button and browse for the e-books you want to work with. Once you've added the books, they will show up in the main view looking something like this:
|
||||
|
||||
.. image:: images/added_books.png
|
||||
|
||||
@ -17,7 +17,7 @@ To get started with more advanced usage, you should read about :doc:`gui`. For e
|
||||
|
||||
.. only:: online
|
||||
|
||||
**An ebook version of this user manual is available in** `EPUB format <calibre.epub>`_, `AZW3 (Kindle Fire) format <calibre.azw3>`_ and `PDF format <calibre.pdf>`_.
|
||||
**An e-book version of this user manual is available in** `EPUB format <calibre.epub>`_, `AZW3 (Kindle Fire) format <calibre.azw3>`_ and `PDF format <calibre.pdf>`_.
|
||||
|
||||
Sections
|
||||
------------
|
||||
|
@ -3,7 +3,7 @@
|
||||
The calibre template language
|
||||
=======================================================
|
||||
|
||||
The calibre template language is used in various places. It is used to control the folder structure and file name when saving files from the calibre library to the disk or eBook reader.
|
||||
The calibre template language is used in various places. It is used to control the folder structure and file name when saving files from the calibre library to the disk or e-book reader.
|
||||
It is also used to define "virtual" columns that contain data from other columns and so on.
|
||||
|
||||
The basic template language is very simple, but has very powerful advanced features. The basic idea is that a template consists of text and names in curly brackets that are then replaced by the corresponding metadata from the book being processed. So, for example, the default template used for saving books to device in calibre is::
|
||||
|
@ -1,14 +1,14 @@
|
||||
.. _typesetting_math:
|
||||
|
||||
|
||||
Typesetting Math in ebooks
|
||||
Typesetting Math in e-books
|
||||
============================
|
||||
|
||||
The calibre ebook viewer has the ability to display math embedded in ebooks (ePub
|
||||
and HTML files). You can typeset the math directly with TeX or MathML or
|
||||
The calibre e-book viewer has the ability to display math embedded in e-books
|
||||
(EPUB and HTML files). You can typeset the math directly with TeX or MathML or
|
||||
AsciiMath. The calibre viewer uses the excellent `MathJax
|
||||
<https://www.mathjax.org>`_ library to do this. This is a brief tutorial on
|
||||
creating ebooks with math in them that work well with the calibre viewer.
|
||||
creating e-books with math in them that work well with the calibre viewer.
|
||||
|
||||
|
||||
A simple HTML file with mathematics
|
||||
@ -47,7 +47,7 @@ This snippet looks like the following screen shot in the calibre viewer.
|
||||
|
||||
The complete HTML file, with more equations and inline mathematics is
|
||||
reproduced below. You can convert this HTML file to EPUB in calibre to end up
|
||||
with an ebook you can distribute easily to other people.
|
||||
with an e-book you can distribute easily to other people.
|
||||
|
||||
.. only:: online
|
||||
|
||||
@ -60,6 +60,6 @@ More information
|
||||
-----------------
|
||||
|
||||
Since the calibre viewer uses the MathJax library to render mathematics, the best
|
||||
place to find out more about math in ebooks and get help is the `MathJax
|
||||
place to find out more about math in e-books and get help is the `MathJax
|
||||
website <https://www.mathjax.org>`_.
|
||||
|
||||
|
@ -32,8 +32,8 @@ Navigating around an e-book
|
||||
.. |refmi| image:: images/ref_mode_button.png
|
||||
|
||||
|
||||
You can "turn pages" in a book by using the :guilabel:`Page Next` and :guilabel:`Page Previous` buttons |pni|, or by pressing
|
||||
the Page Down/Page Up keys. Unlike most e-book viewers, calibre does not force you to view books in paged mode. You can
|
||||
You can "turn pages" in a book by using the :guilabel:`Page next` and :guilabel:`Page previous` buttons |pni|, or by pressing
|
||||
the :guilabel:`Page down`/:guilabel:`Page up` keys. Unlike most e-book viewers, calibre does not force you to view books in paged mode. You can
|
||||
scroll by amounts less than a page by using the scroll bar or various customizable keyboard shortcuts.
|
||||
|
||||
Bookmarks
|
||||
@ -86,7 +86,7 @@ You can change font sizes on the fly by using the font size buttons |fontsizei|.
|
||||
by pressing the Full Screen button |fsi|. By clicking the Preferences button |prefbi|, you can change the default fonts used
|
||||
by the viewer to ones you like as well as the default font size when the viewer starts up.
|
||||
|
||||
More advanced customization can be achieved by the User Stylesheet setting. This is a stylesheet you can set that will be applied
|
||||
More advanced customization can be achieved by the :guilabel:`User stylesheet` setting. This is a stylesheet you can set that will be applied
|
||||
to every book. Using it you can do things like have white text on a black background, change paragraph styles, text justification, etc.
|
||||
For examples of custom stylesheets used by calibre's users, see `the forums <https://www.mobileread.com/forums/showthread.php?t=51500>`_.
|
||||
|
||||
|
@ -8,7 +8,7 @@ In this tutorial, you will be given a gentle introduction to
|
||||
used to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_
|
||||
documents in calibre. XPath is a widely
|
||||
used standard, and googling it will yield a ton of information. This tutorial,
|
||||
however, focuses on using XPath for ebook related tasks like finding chapter
|
||||
however, focuses on using XPath for e-book related tasks like finding chapter
|
||||
headings in an unstructured HTML document.
|
||||
|
||||
.. contents:: Contents
|
||||
@ -36,7 +36,7 @@ the prefix::
|
||||
/h:body/h:div/h:p (Selects <p> tags that are children of <div> tags that are
|
||||
children of the <body> tag)
|
||||
|
||||
This will match only ``<p>A very short ebook to demonstrate the use of XPath.</p>``
|
||||
This will match only ``<p>A very short e-book to demonstrate the use of XPath.</p>``
|
||||
in the :ref:`sample_ebook` but not any of the other ``<p>`` tags. The ``h:`` prefix
|
||||
in the above examples is needed to match XHTML tags. This is because internally,
|
||||
calibre represents all content as XHTML. In XHTML tags have a *namespace*, and
|
||||
@ -86,7 +86,7 @@ to its attributes.
|
||||
|
||||
.. _sample_ebook :
|
||||
|
||||
Sample ebook
|
||||
Sample e-book
|
||||
------------
|
||||
|
||||
.. literalinclude:: xpath.xhtml
|
||||
|
@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>A very short ebook</title>
|
||||
<title>A very short e-book</title>
|
||||
<meta name="charset" value="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bookTitle">A very short ebook</h1>
|
||||
<h1 class="bookTitle">A very short e-book</h1>
|
||||
<p style="text-align:right">Written by Kovid Goyal</p>
|
||||
<div class="introduction">
|
||||
<p>A very short ebook to demonstrate the use of XPath.</p>
|
||||
<p>A very short e-book to demonstrate the use of XPath.</p>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">Chapter One</h2>
|
||||
|
@ -569,10 +569,10 @@ restrict_output_formats = None
|
||||
# The value can be between 50 and 99
|
||||
content_server_thumbnail_compression_quality = 75
|
||||
|
||||
#: Image file types to treat as ebooks when dropping onto the Book details panel
|
||||
#: Image file types to treat as e-books when dropping onto the Book details panel
|
||||
# Normally, if you drop any image file in a format known to calibre onto the
|
||||
# Book details panel, it will be used to set the cover. If you want to store
|
||||
# some image types as ebooks instead, you can set this tweak.
|
||||
# some image types as e-books instead, you can set this tweak.
|
||||
# Examples:
|
||||
# cover_drop_exclude = {'tiff', 'webp'}
|
||||
cover_drop_exclude = ()
|
||||
|
@ -1226,7 +1226,7 @@ class Plugboard(PreferencesPlugin):
|
||||
icon = I('plugboard.png')
|
||||
gui_name = _('Metadata plugboards')
|
||||
category = 'Import/Export'
|
||||
gui_category = _('Import/Export')
|
||||
gui_category = _('Import/export')
|
||||
category_order = 3
|
||||
name_order = 4
|
||||
config_widget = 'calibre.gui2.preferences.plugboard'
|
||||
|
@ -64,12 +64,12 @@ class AppleOpenFeedback(OpenFeedback):
|
||||
msg.setText(_(
|
||||
'<p>If you do not want calibre to recognize your Apple iDevice '
|
||||
'when it is connected to your computer, '
|
||||
'click <b>Disable Apple Driver</b>.</p>'
|
||||
'click <b>Disable Apple driver</b>.</p>'
|
||||
'<p>To transfer books to your iDevice, '
|
||||
'click <b>Disable Apple Driver</b>, '
|
||||
'click <b>Disable Apple driver</b>, '
|
||||
"then use the 'Connect to iTunes' method recommended in the "
|
||||
'<a href="https://www.mobileread.com/forums/showthread.php?t=118559">Calibre + iDevices FAQ</a>, '
|
||||
'using the <em>Connect/Share</em>|<em>Connect to iTunes</em> menu item.</p>'
|
||||
'using the <em>Connect/share</em>--<em>Connect to iTunes</em> menu item.</p>'
|
||||
'<p>Enabling the Apple driver for direct connection to iDevices '
|
||||
'is an unsupported advanced user mode.</p>'
|
||||
'<p></p>'
|
||||
|
@ -230,7 +230,7 @@ class DevicePlugin(Plugin):
|
||||
is capable of handling it. If it is not it should return False. This method
|
||||
is only called after the vendor, product ids and the bcd have matched, so
|
||||
it can do some relatively time intensive checks. The default implementation
|
||||
returns True. This method is called only on windows. See also
|
||||
returns True. This method is called only on Windows. See also
|
||||
:meth:`can_handle`.
|
||||
|
||||
Note that for devices based on USBMS this method by default delegates
|
||||
|
@ -229,7 +229,7 @@ class MTP_DEVICE(BASE):
|
||||
steps = len(all_books) + 2
|
||||
count = 0
|
||||
|
||||
self.report_progress(0, _('Reading ebook metadata'))
|
||||
self.report_progress(0, _('Reading e-book metadata'))
|
||||
# Read the cache if it exists
|
||||
storage = self.filesystem_cache.storage(sid)
|
||||
cache = storage.find_path(self.calibre_file_paths['metadata'].split('/'))
|
||||
|
@ -217,10 +217,10 @@ class ContainerBase(object): # {{{
|
||||
class Container(ContainerBase): # {{{
|
||||
|
||||
'''
|
||||
A container represents an Open EBook as a directory full of files and an
|
||||
A container represents an Open E-Book as a directory full of files and an
|
||||
opf file. There are two important concepts:
|
||||
|
||||
* The root directory. This is the base of the ebook. All the ebooks
|
||||
* The root directory. This is the base of the e-book. All the e-books
|
||||
files are inside this directory or in its sub-directories.
|
||||
|
||||
* Names: These are paths to the books' files relative to the root
|
||||
@ -230,7 +230,7 @@ class Container(ContainerBase): # {{{
|
||||
in the NFC unicode normal form.
|
||||
|
||||
* Clones: the container object supports efficient on-disk cloning, which is used to
|
||||
implement checkpoints in the ebook editor. In order to make this work, you should
|
||||
implement checkpoints in the e-book editor. In order to make this work, you should
|
||||
never access files on the filesystem directly. Instead, use :meth:`raw_data` or
|
||||
:meth:`open` to read/write to component files in the book.
|
||||
|
||||
@ -545,17 +545,17 @@ class Container(ContainerBase): # {{{
|
||||
|
||||
@property
|
||||
def names_that_need_not_be_manifested(self):
|
||||
' Set of names that are allowed to be missing from the manifest. Depends on the ebook file format. '
|
||||
' Set of names that are allowed to be missing from the manifest. Depends on the e-book file format. '
|
||||
return {self.opf_name}
|
||||
|
||||
@property
|
||||
def names_that_must_not_be_removed(self):
|
||||
' Set of names that must never be deleted from the container. Depends on the ebook file format. '
|
||||
' Set of names that must never be deleted from the container. Depends on the e-book file format. '
|
||||
return {self.opf_name}
|
||||
|
||||
@property
|
||||
def names_that_must_not_be_changed(self):
|
||||
' Set of names that must never be renamed. Depends on the ebook file format. '
|
||||
' Set of names that must never be renamed. Depends on the e-book file format. '
|
||||
return set()
|
||||
|
||||
def parse(self, path, mime):
|
||||
@ -1031,9 +1031,9 @@ class Container(ContainerBase): # {{{
|
||||
|
||||
def commit(self, outpath=None, keep_parsed=False):
|
||||
'''
|
||||
Commit all dirtied parsed objects to the filesystem and write out the ebook file at outpath.
|
||||
Commit all dirtied parsed objects to the filesystem and write out the e-book file at outpath.
|
||||
|
||||
:param output: The path to write the saved ebook file to. If None, the path of the original book file is used.
|
||||
:param output: The path to write the saved e-book file to. If None, the path of the original book file is used.
|
||||
:param keep_parsed: If True the parsed representations of committed items are kept in the cache.
|
||||
'''
|
||||
for name in tuple(self.dirtied):
|
||||
|
@ -139,7 +139,7 @@ class ViewAction(InterfaceAction):
|
||||
'Windows will try to open %s with calibre itself'
|
||||
' resulting in a duplicate in your calibre library. You'
|
||||
' should install some program capable of viewing this'
|
||||
' file format and tell windows to use that program to open'
|
||||
' file format and tell Windows to use that program to open'
|
||||
' files of this type.') % name, show=True)
|
||||
|
||||
open_local_file(name)
|
||||
|
@ -566,12 +566,12 @@ def command_add_format(args, dbpath):
|
||||
if len(args) < 3:
|
||||
parser.print_help()
|
||||
print
|
||||
print >>sys.stderr, _('You must specify an id and an ebook file')
|
||||
print >>sys.stderr, _('You must specify an id and an e-book file')
|
||||
return 1
|
||||
|
||||
id, path, fmt = int(args[1]), args[2], os.path.splitext(args[2])[-1]
|
||||
if not fmt:
|
||||
print _('ebook file must have an extension')
|
||||
print _('e-book file must have an extension')
|
||||
do_add_format(get_db(dbpath, opts), id, fmt[1:], path, opts)
|
||||
return 0
|
||||
|
||||
|
@ -399,7 +399,7 @@ def create_global_prefs(conf_obj=None):
|
||||
c.add_opt('language', default=None,
|
||||
help=_('The language in which to display the user interface'))
|
||||
c.add_opt('output_format', default='EPUB',
|
||||
help=_('The default output format for ebook conversions.'))
|
||||
help=_('The default output format for e-book conversions.'))
|
||||
c.add_opt('input_format_order', default=['EPUB', 'AZW3', 'MOBI', 'LIT', 'PRC',
|
||||
'FB2', 'HTML', 'HTM', 'XHTM', 'SHTML', 'XHTML', 'ZIP', 'DOCX', 'ODT', 'RTF', 'PDF',
|
||||
'TXT'],
|
||||
|
@ -31,7 +31,7 @@ def default_programs():
|
||||
|
||||
'ebook-edit.exe': {
|
||||
'icon_id':'editor_icon',
|
||||
'description': _('The calibre e-book editor. It can be used to edit common ebook formats.'),
|
||||
'description': _('The calibre e-book editor. It can be used to edit common e-book formats.'),
|
||||
'capability_name': 'Editor' + ('64bit' if is64bit else ''),
|
||||
'name': 'calibre Editor' + (' 64-bit' if is64bit else ''),
|
||||
'assoc_name': 'calibreEditor' + ('64bit' if is64bit else ''),
|
||||
|
@ -321,7 +321,7 @@ class BasicNewsRecipe(Recipe):
|
||||
#: cover_margins = (10, 15, '#ffffff') pads the cover with a white margin
|
||||
#: 10px on the left and right, 15px on the top and bottom.
|
||||
#: Color names defined at https://www.imagemagick.org/script/color.php
|
||||
#: Note that for some reason, white does not always work on windows. Use
|
||||
#: Note that for some reason, white does not always work in Windows. Use
|
||||
#: #ffffff instead
|
||||
cover_margins = (0, 0, '#ffffff')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user