mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
a3edeb95bc
@ -875,7 +875,7 @@ class ActionCopyToLibrary(InterfaceActionBase):
|
||||
class ActionTweakEpub(InterfaceActionBase):
|
||||
name = 'Tweak ePub'
|
||||
actual_plugin = 'calibre.gui2.actions.tweak_epub:TweakEpubAction'
|
||||
description = _('Make small twekas to epub files in your calibre library')
|
||||
description = _('Make small tweaks to epub files in your calibre library')
|
||||
|
||||
class ActionNextMatch(InterfaceActionBase):
|
||||
name = 'Next Match'
|
||||
|
@ -633,6 +633,7 @@ TXT input supports a number of options to differentiate how paragraphs are detec
|
||||
:guilabel:`Formatting Style: None`
|
||||
Applies no special formatting to the text, the document is converted to html with no other changes.
|
||||
|
||||
.. _pdfconversion:
|
||||
|
||||
Convert PDF documents
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -35,29 +35,11 @@ What are the best source formats to convert?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
In order of decreasing preference: LIT, MOBI, EPUB, FB2, HTML, PRC, RTF, PDB, TXT, PDF
|
||||
|
||||
Why does the PDF conversion lose some images/tables?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The PDF conversion tries to extract the text and images from the PDF file and convert them to and HTML based ebook. Some PDF files have images in a format that cannot be extracted (vector images). All tables
|
||||
are also represented as vector diagrams, thus they cannot be extracted.
|
||||
I converted a PDF file, but the result has various problems?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
How do I convert a collection of HTML files in a specific order?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
In order to convert a collection of HTML files in a specific oder, you have to create a table of contents file. That is, another HTML file that contains links to all the other files in the desired order. Such a file looks like::
|
||||
PDF is a terrible format to convert from. For a list of the various issues you will encounter when converting PDF, see: :ref:`pdfconversion`.
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<h1>Table of Contents</h1>
|
||||
<p style="text-indent:0pt">
|
||||
<a href="file1.html">First File</a><br/>
|
||||
<a href="file2.html">Second File</a><br/>
|
||||
.
|
||||
.
|
||||
.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Then just add this HTML file to the GUI and use the convert button to create your ebook.
|
||||
|
||||
.. _char-encoding-faq:
|
||||
|
||||
@ -85,6 +67,26 @@ If you have a hand edited TOC in the input document, you can use the TOC detecti
|
||||
|
||||
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).
|
||||
|
||||
How do I convert a collection of HTML files in a specific order?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
In order to convert a collection of HTML files in a specific oder, you have to create a table of contents file. That is, another HTML file that contains links to all the other files in the desired order. Such a file looks like::
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<h1>Table of Contents</h1>
|
||||
<p style="text-indent:0pt">
|
||||
<a href="file1.html">First File</a><br/>
|
||||
<a href="file2.html">Second File</a><br/>
|
||||
.
|
||||
.
|
||||
.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Then just add this HTML file to the GUI and use the convert button to create your ebook.
|
||||
|
||||
|
||||
How do I use some of the advanced features of the conversion tools?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You can get help on any individual feature of the converters by mousing over it in the GUI or running ``ebook-convert dummy.html .epub -h`` at a terminal. A good place to start is to look at the following demo files that demonstrate some of the advanced features:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -208,6 +208,8 @@ def gc_histogram():
|
||||
def diff_hists(h1, h2):
|
||||
"""Prints differences between two results of gc_histogram()."""
|
||||
for k in h1:
|
||||
if k not in h2:
|
||||
h2[k] = 0
|
||||
if h1[k] != h2[k]:
|
||||
print "%s: %d -> %d (%s%d)" % (
|
||||
k, h1[k], h2[k], h2[k] > h1[k] and "+" or "", h2[k] - h1[k])
|
||||
|
Loading…
x
Reference in New Issue
Block a user