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
b85fe8209f
commit
3a361db030
@ -64,8 +64,8 @@ create the EPUB file, automatically generating all metadata, Table of Contents,
|
|||||||
|
|
||||||
You can see this process in action by using the debug option |dbgi|. Just specify the path to
|
You can see this process in action by using the debug option |dbgi|. Just specify the path to
|
||||||
a directory for the debug output. During conversion, calibre will place the XHTML generated by
|
a directory for the debug output. During conversion, calibre will place the XHTML generated by
|
||||||
the various stages of the conversion pipeline in different sub-directories.
|
the various stages of the conversion pipeline in different sub-folders.
|
||||||
The four sub-directories are:
|
The four sub-folders are:
|
||||||
|
|
||||||
.. table:: Stages of the conversion pipeline
|
.. table:: Stages of the conversion pipeline
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ The four sub-directories are:
|
|||||||
========== =============
|
========== =============
|
||||||
|
|
||||||
If you want to edit the input document a little before having calibre convert it, the best thing to
|
If you want to edit the input document a little before having calibre convert it, the best thing to
|
||||||
do is edit the files in the :file:`input` sub-directory, then zip it up, and use the ZIP file as the
|
do is edit the files in the :file:`input` sub-folder, then zip it up, and use the ZIP file as the
|
||||||
input format for subsequent conversions. To do this use the :guilabel:`Edit meta information` dialog
|
input format for subsequent conversions. To do this use the :guilabel:`Edit meta information` dialog
|
||||||
to add the ZIP file as a format for the book and then, in the top left corner of the conversion dialog,
|
to add the ZIP file as a format for the book and then, in the top left corner of the conversion dialog,
|
||||||
select ZIP as the input format.
|
select ZIP as the input format.
|
||||||
@ -206,7 +206,7 @@ options. Instead add the following CSS code to :ref:`Extra CSS <extra-css>`::
|
|||||||
|
|
||||||
Then, in your source document, mark the paragraphs that need spacing with `class="spacious"`.
|
Then, in your source document, mark the paragraphs that need spacing with `class="spacious"`.
|
||||||
If your input document is not in HTML, use the Debug option, described in the Introduction to get HTML
|
If your input document is not in HTML, use the Debug option, described in the Introduction to get HTML
|
||||||
(use the :file:`input` sub-directory).
|
(use the :file:`input` sub-folder).
|
||||||
|
|
||||||
Another useful options is :guilabel:`Linearize tables`. Some badly designed
|
Another useful options is :guilabel:`Linearize tables`. Some badly designed
|
||||||
documents use tables to control the layout of text on the page. When converted
|
documents use tables to control the layout of text on the page. When converted
|
||||||
|
@ -186,7 +186,7 @@ If your device appears as a USB disk to the operating system, adding support for
|
|||||||
We just need some information from you:
|
We just need some information from you:
|
||||||
|
|
||||||
* Complete list of e-book formats that your device supports.
|
* 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?
|
* 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-folders?
|
||||||
* We also need information about your device that calibre will collect automatically. First, if your
|
* 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`
|
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
|
and click the "Debug device detection" button. This will create some debug output. Copy it to a file
|
||||||
|
@ -21,7 +21,7 @@ class PML2PMLZ(FileTypePlugin):
|
|||||||
name = 'PML to PMLZ'
|
name = 'PML to PMLZ'
|
||||||
author = 'John Schember'
|
author = 'John Schember'
|
||||||
description = _('Create a PMLZ archive containing the PML file '
|
description = _('Create a PMLZ archive containing the PML file '
|
||||||
'and all images in the directory pmlname_img or images. '
|
'and all images in the folder pmlname_img or images. '
|
||||||
'This plugin is run every time you add '
|
'This plugin is run every time you add '
|
||||||
'a PML file to the library.')
|
'a PML file to the library.')
|
||||||
version = numeric_version
|
version = numeric_version
|
||||||
|
@ -763,7 +763,7 @@ def option_parser():
|
|||||||
parser.add_option('-a', '--add-plugin', default=None,
|
parser.add_option('-a', '--add-plugin', default=None,
|
||||||
help=_('Add a plugin by specifying the path to the ZIP file containing it.'))
|
help=_('Add a plugin by specifying the path to the ZIP file containing it.'))
|
||||||
parser.add_option('-b', '--build-plugin', default=None,
|
parser.add_option('-b', '--build-plugin', default=None,
|
||||||
help=_('For plugin developers: Path to the directory where you are'
|
help=_('For plugin developers: Path to the folder where you are'
|
||||||
' developing the plugin. This command will automatically zip '
|
' developing the plugin. This command will automatically zip '
|
||||||
'up the plugin and update it in calibre.'))
|
'up the plugin and update it in calibre.'))
|
||||||
parser.add_option('-r', '--remove-plugin', default=None,
|
parser.add_option('-r', '--remove-plugin', default=None,
|
||||||
|
@ -65,7 +65,7 @@ class DeviceConfig(object):
|
|||||||
c.add_opt('format_map', default=cls.FORMATS,
|
c.add_opt('format_map', default=cls.FORMATS,
|
||||||
help=_('Ordered list of formats the device will accept'))
|
help=_('Ordered list of formats the device will accept'))
|
||||||
c.add_opt('use_subdirs', default=cls.SUPPORTS_SUB_DIRS_DEFAULT,
|
c.add_opt('use_subdirs', default=cls.SUPPORTS_SUB_DIRS_DEFAULT,
|
||||||
help=_('Place files in sub-directories if the device supports them'))
|
help=_('Place files in sub-folders if the device supports them'))
|
||||||
c.add_opt('read_metadata', default=True,
|
c.add_opt('read_metadata', default=True,
|
||||||
help=_('Read metadata from files on device'))
|
help=_('Read metadata from files on device'))
|
||||||
c.add_opt('use_author_sort', default=False,
|
c.add_opt('use_author_sort', default=False,
|
||||||
|
@ -342,7 +342,7 @@ class USBMS(CLI, Device):
|
|||||||
'''
|
'''
|
||||||
Upload book cover to the device. Default implementation does nothing.
|
Upload book cover to the device. Default implementation does nothing.
|
||||||
|
|
||||||
:param path: The full path to the directory where the associated book is located.
|
:param path: The full path to the folder where the associated book is located.
|
||||||
:param filename: The name of the book file without the extension.
|
:param filename: The name of the book file without the extension.
|
||||||
:param metadata: metadata belonging to the book. Use metadata.thumbnail
|
:param metadata: metadata belonging to the book. Use metadata.thumbnail
|
||||||
for cover
|
for cover
|
||||||
|
@ -1362,7 +1362,7 @@ class OPFCreator(Metadata):
|
|||||||
def __init__(self, base_path, other):
|
def __init__(self, base_path, other):
|
||||||
'''
|
'''
|
||||||
Initialize.
|
Initialize.
|
||||||
@param base_path: An absolute path to the directory in which this OPF file
|
@param base_path: An absolute path to the folder in which this OPF file
|
||||||
will eventually be. This is used by the L{create_manifest} method
|
will eventually be. This is used by the L{create_manifest} method
|
||||||
to convert paths to files into relative paths.
|
to convert paths to files into relative paths.
|
||||||
'''
|
'''
|
||||||
|
@ -333,7 +333,7 @@ def check_links(container):
|
|||||||
# or the link is a directory
|
# or the link is a directory
|
||||||
apath = container.name_to_abspath(tname)
|
apath = container.name_to_abspath(tname)
|
||||||
if os.path.isdir(apath):
|
if os.path.isdir(apath):
|
||||||
a(BadLink(_('The linked resource %s is a directory') % fl(href), name, lnum, col))
|
a(BadLink(_('The linked resource %s is a folder') % fl(href), name, lnum, col))
|
||||||
else:
|
else:
|
||||||
a(CaseMismatch(href, actual_case_for_name(container, tname), name, lnum, col))
|
a(CaseMismatch(href, actual_case_for_name(container, tname), name, lnum, col))
|
||||||
else:
|
else:
|
||||||
|
@ -226,7 +226,7 @@ class Container(ContainerBase): # {{{
|
|||||||
opf file. There are two important concepts:
|
opf file. There are two important concepts:
|
||||||
|
|
||||||
* The root folder. This is the base of the e-book. All the e-books
|
* The root folder. This is the base of the e-book. All the e-books
|
||||||
files are inside this directory or in its sub-directories.
|
files are inside this folder or in its sub-folders.
|
||||||
|
|
||||||
* Names: These are paths to the books' files relative to the root
|
* Names: These are paths to the books' files relative to the root
|
||||||
directory. They always contain POSIX separators and are unquoted. They
|
directory. They always contain POSIX separators and are unquoted. They
|
||||||
@ -402,7 +402,7 @@ class Container(ContainerBase): # {{{
|
|||||||
|
|
||||||
def rename(self, current_name, new_name):
|
def rename(self, current_name, new_name):
|
||||||
''' Renames a file from current_name to new_name. It automatically
|
''' Renames a file from current_name to new_name. It automatically
|
||||||
rebases all links inside the file if the directory the file is in
|
rebases all links inside the file if the folder the file is in
|
||||||
changes. Note however, that links are not updated in the other files
|
changes. Note however, that links are not updated in the other files
|
||||||
that could reference this file. This is for performance, such updates
|
that could reference this file. This is for performance, such updates
|
||||||
should be done once, in bulk. '''
|
should be done once, in bulk. '''
|
||||||
|
@ -143,7 +143,7 @@ def implode(output_dir, ebook_file):
|
|||||||
with lopen(efmt_path, 'rb') as f:
|
with lopen(efmt_path, 'rb') as f:
|
||||||
efmt = f.read()
|
efmt = f.read()
|
||||||
except Exception:
|
except Exception:
|
||||||
raise SystemExit('The directory %s does not seem to have been created by --explode-book' % output_dir)
|
raise SystemExit('The folder %s does not seem to have been created by --explode-book' % output_dir)
|
||||||
if efmt != fmt:
|
if efmt != fmt:
|
||||||
raise SystemExit('You must use the same format of file as was used when exploding the book')
|
raise SystemExit('You must use the same format of file as was used when exploding the book')
|
||||||
os.remove(efmt_path)
|
os.remove(efmt_path)
|
||||||
|
@ -59,7 +59,7 @@ class AddAction(InterfaceAction):
|
|||||||
self._add_filesystem_book = self.Dispatcher(self.__add_filesystem_book)
|
self._add_filesystem_book = self.Dispatcher(self.__add_filesystem_book)
|
||||||
self.add_menu = self.qaction.menu()
|
self.add_menu = self.qaction.menu()
|
||||||
ma = partial(self.create_menu_action, self.add_menu)
|
ma = partial(self.create_menu_action, self.add_menu)
|
||||||
ma('recursive-add', _('Add from directories and sub-directories')).triggered.connect(self.add_recursive_question)
|
ma('recursive-add', _('Add from folders and sub-folders')).triggered.connect(self.add_recursive_question)
|
||||||
ma('archive-add-book', _('Add multiple books from archive (ZIP/RAR)')).triggered.connect(self.add_from_archive)
|
ma('archive-add-book', _('Add multiple books from archive (ZIP/RAR)')).triggered.connect(self.add_from_archive)
|
||||||
self.add_menu.addSeparator()
|
self.add_menu.addSeparator()
|
||||||
ma('add-empty', _('Add empty book (Book entry with no formats)'),
|
ma('add-empty', _('Add empty book (Book entry with no formats)'),
|
||||||
|
@ -48,7 +48,7 @@ class DebugWidget(Widget, Ui_Form):
|
|||||||
except:
|
except:
|
||||||
import traceback
|
import traceback
|
||||||
det_msg = traceback.format_exc()
|
det_msg = traceback.format_exc()
|
||||||
error_dialog(self, _('Invalid debug directory'),
|
error_dialog(self, _('Invalid debug folder'),
|
||||||
_('Failed to create debug directory')+': '+ unicode_type(self.opt_debug_pipeline.text()),
|
_('Failed to create debug directory')+': '+ unicode_type(self.opt_debug_pipeline.text()),
|
||||||
det_msg=det_msg, show=True)
|
det_msg=det_msg, show=True)
|
||||||
return False
|
return False
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
<string>If checked, books are placed into sub-folders based on their metadata on the device. If unchecked, books are all put into the top level folder.</string>
|
<string>If checked, books are placed into sub-folders based on their metadata on the device. If unchecked, books are all put into the top level folder.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use sub-directories</string>
|
<string>Use sub-folders</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -89,8 +89,8 @@ class TabbedDeviceConfig(QTabWidget):
|
|||||||
self.formats.hide()
|
self.formats.hide()
|
||||||
|
|
||||||
self.opt_use_subdirs = create_checkbox(
|
self.opt_use_subdirs = create_checkbox(
|
||||||
_("Use sub-directories"),
|
_("Use sub-folders"),
|
||||||
_('Place files in sub-directories if the device supports them'),
|
_('Place files in sub-folders if the device supports them'),
|
||||||
device_settings.use_subdirs
|
device_settings.use_subdirs
|
||||||
)
|
)
|
||||||
self.opt_read_metadata = create_checkbox(
|
self.opt_read_metadata = create_checkbox(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user