String changes

This commit is contained in:
Kovid Goyal 2017-04-25 10:27:18 +05:30
parent e8a3258dcb
commit 910886157d
15 changed files with 49 additions and 45 deletions

View File

@ -12,7 +12,7 @@ from calibre.devices.usbms.driver import USBMS
class BOEYE_BEX(USBMS): class BOEYE_BEX(USBMS):
name = 'BOEYE BEX reader driver' name = 'BOEYE BEX reader driver'
gui_name = 'BOEYE BEX' gui_name = 'BOEYE BEX'
description = _('Communicate with BOEYE BEX Serial eBook readers.') description = _('Communicate with BOEYE BEX Serial e-book readers.')
author = 'szboeye' author = 'szboeye'
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
@ -34,7 +34,7 @@ class BOEYE_BEX(USBMS):
class BOEYE_BDX(USBMS): class BOEYE_BDX(USBMS):
name = 'BOEYE BDX reader driver' name = 'BOEYE BDX reader driver'
gui_name = 'BOEYE BDX' gui_name = 'BOEYE BDX'
description = _('Communicate with BOEYE BDX serial eBook readers.') description = _('Communicate with BOEYE BDX serial e-book readers.')
author = 'szboeye' author = 'szboeye'
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']

View File

@ -22,7 +22,7 @@ class CYBOOK(USBMS):
name = 'Cybook Gen 3 / Opus Device Interface' name = 'Cybook Gen 3 / Opus Device Interface'
gui_name = 'Cybook Gen 3/Opus' gui_name = 'Cybook Gen 3/Opus'
description = _('Communicate with the Cybook Gen 3/Opus eBook reader.') description = _('Communicate with the Cybook Gen 3/Opus e-book reader.')
author = 'John Schember' author = 'John Schember'
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
@ -66,7 +66,7 @@ class ORIZON(CYBOOK):
name = 'Cybook Orizon Device Interface' name = 'Cybook Orizon Device Interface'
gui_name = 'Orizon' gui_name = 'Orizon'
description = _('Communicate with the Cybook Orizon eBook reader.') description = _('Communicate with the Cybook Orizon e-book reader.')
BCD = [0x319] BCD = [0x319]
@ -118,7 +118,7 @@ class MUSE(CYBOOK):
name = 'Cybook Muse Device Interface' name = 'Cybook Muse Device Interface'
gui_name = 'Muse' gui_name = 'Muse'
description = _('Communicate with the Cybook Muse eBook reader.') description = _('Communicate with the Cybook Muse e-book reader.')
author = 'Kovid Goyal' author = 'Kovid Goyal'
FORMATS = ['epub', 'html', 'fb2', 'txt', 'pdf', 'djvu'] FORMATS = ['epub', 'html', 'fb2', 'txt', 'pdf', 'djvu']

View File

@ -23,7 +23,7 @@ class EB600(USBMS):
name = 'Netronix EB600 Device Interface' name = 'Netronix EB600 Device Interface'
gui_name = 'Netronix EB600' gui_name = 'Netronix EB600'
description = _('Communicate with the EB600 eBook reader.') description = _('Communicate with the EB600 e-book reader.')
author = 'Kovid Goyal' author = 'Kovid Goyal'
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
@ -415,4 +415,3 @@ class PI2(EB600):
WINDOWS_CARD_A_MEM = 'INFIBEAM_PI' WINDOWS_CARD_A_MEM = 'INFIBEAM_PI'
DELETE_EXTS = ['.rec'] DELETE_EXTS = ['.rec']

View File

@ -59,7 +59,7 @@ class EPUBOutput(OutputFormatPlugin):
recommended_value=False, level=OptionRecommendation.LOW, recommended_value=False, level=OptionRecommendation.LOW,
help=_('Turn off splitting at page breaks. Normally, input ' help=_('Turn off splitting at page breaks. Normally, input '
'files are automatically split at every page break into ' 'files are automatically split at every page break into '
'two files. This gives an output ebook that can be ' 'two files. This gives an output e-book that can be '
'parsed faster and with less resources. However, ' 'parsed faster and with less resources. However, '
'splitting is slow and if your source file contains a ' 'splitting is slow and if your source file contains a '
'very large number of page breaks, you should turn off ' 'very large number of page breaks, you should turn off '
@ -512,4 +512,3 @@ class EPUBOutput(OutputFormatPlugin):
simplify_toc_entry(self.oeb.toc) simplify_toc_entry(self.oeb.toc)
# }}} # }}}

View File

@ -345,7 +345,7 @@ OptionRecommendation(name='chapter_mark',
OptionRecommendation(name='start_reading_at', OptionRecommendation(name='start_reading_at',
recommended_value=None, level=OptionRecommendation.LOW, recommended_value=None, level=OptionRecommendation.LOW,
help=_('An XPath expression to detect the location in the document' help=_('An XPath expression to detect the location in the document'
' at which to start reading. Some ebook reading programs' ' at which to start reading. Some e-book reading programs'
' (most prominently the Kindle) use this location as the' ' (most prominently the Kindle) use this location as the'
' position at which to open the book. See the XPath tutorial' ' position at which to open the book. See the XPath tutorial'
' in the calibre User Manual for further help using this' ' in the calibre User Manual for further help using this'
@ -486,7 +486,7 @@ OptionRecommendation(name='insert_blank_line_size',
OptionRecommendation(name='remove_first_image', OptionRecommendation(name='remove_first_image',
recommended_value=False, level=OptionRecommendation.LOW, recommended_value=False, level=OptionRecommendation.LOW,
help=_('Remove the first image from the input ebook. Useful if the ' help=_('Remove the first image from the input e-book. Useful if the '
'input document has a cover image that is not identified as a cover. ' 'input document has a cover image that is not identified as a cover. '
'In this case, if you set a cover in calibre, the output document will ' 'In this case, if you set a cover in calibre, the output document will '
'end up with two cover images if you do not specify this option.' 'end up with two cover images if you do not specify this option.'
@ -496,7 +496,7 @@ OptionRecommendation(name='remove_first_image',
OptionRecommendation(name='insert_metadata', OptionRecommendation(name='insert_metadata',
recommended_value=False, level=OptionRecommendation.LOW, recommended_value=False, level=OptionRecommendation.LOW,
help=_('Insert the book metadata at the start of ' help=_('Insert the book metadata at the start of '
'the book. This is useful if your ebook reader does not support ' 'the book. This is useful if your e-book reader does not support '
'displaying/searching metadata directly.' 'displaying/searching metadata directly.'
) )
), ),
@ -574,15 +574,15 @@ OptionRecommendation(name='cover',
OptionRecommendation(name='comments', OptionRecommendation(name='comments',
recommended_value=None, level=OptionRecommendation.LOW, recommended_value=None, level=OptionRecommendation.LOW,
help=_('Set the ebook description.')), help=_('Set the e-book description.')),
OptionRecommendation(name='publisher', OptionRecommendation(name='publisher',
recommended_value=None, level=OptionRecommendation.LOW, recommended_value=None, level=OptionRecommendation.LOW,
help=_('Set the ebook publisher.')), help=_('Set the e-book publisher.')),
OptionRecommendation(name='series', OptionRecommendation(name='series',
recommended_value=None, level=OptionRecommendation.LOW, recommended_value=None, level=OptionRecommendation.LOW,
help=_('Set the series this ebook belongs to.')), help=_('Set the series this e-book belongs to.')),
OptionRecommendation(name='series_index', OptionRecommendation(name='series_index',
recommended_value=None, level=OptionRecommendation.LOW, recommended_value=None, level=OptionRecommendation.LOW,
@ -818,7 +818,7 @@ OptionRecommendation(name='search_replace',
html_pat = re.compile(r'\.(x){0,1}htm(l){0,1}$', re.IGNORECASE) html_pat = re.compile(r'\.(x){0,1}htm(l){0,1}$', re.IGNORECASE)
html_files = [f for f in files if html_pat.search(f) is not None] html_files = [f for f in files if html_pat.search(f) is not None]
if not html_files: if not html_files:
raise ValueError(_('Could not find an ebook inside the archive')) raise ValueError(_('Could not find an e-book inside the archive'))
html_files = [(f, os.stat(f).st_size) for f in html_files] html_files = [(f, os.stat(f).st_size) for f in html_files]
html_files.sort(cmp=lambda x, y: cmp(x[1], y[1])) html_files.sort(cmp=lambda x, y: cmp(x[1], y[1]))
html_files = [f[0] for f in html_files] html_files = [f[0] for f in html_files]
@ -1110,7 +1110,7 @@ OptionRecommendation(name='search_replace',
self.input_plugin.specialize(self.oeb, self.opts, self.log, self.input_plugin.specialize(self.oeb, self.opts, self.log,
self.output_fmt) self.output_fmt)
pr(0., _('Running transforms on ebook...')) pr(0., _('Running transforms on e-book...'))
self.oeb.plumber_output_format = self.output_fmt or '' self.oeb.plumber_output_format = self.output_fmt or ''

View File

@ -19,7 +19,7 @@ from calibre.utils.date import parse_date
USAGE=_('%prog ebook_file [options]\n') + \ USAGE=_('%prog ebook_file [options]\n') + \
_(''' _('''
Read/Write metadata from/to ebook files. Read/Write metadata from/to e-book files.
Supported formats for reading metadata: {0} Supported formats for reading metadata: {0}
@ -50,13 +50,13 @@ def config():
c.add_opt('cover', ['--cover'], c.add_opt('cover', ['--cover'],
help=_('Set the cover to the specified file.')) help=_('Set the cover to the specified file.'))
c.add_opt('comments', ['-c', '--comments'], c.add_opt('comments', ['-c', '--comments'],
help=_('Set the ebook description.')) help=_('Set the e-book description.'))
c.add_opt('publisher', ['-p', '--publisher'], c.add_opt('publisher', ['-p', '--publisher'],
help=_('Set the ebook publisher.')) help=_('Set the e-book publisher.'))
c.add_opt('category', ['--category'], c.add_opt('category', ['--category'],
help=_('Set the book category.')) help=_('Set the book category.'))
c.add_opt('series', ['-s', '--series'], c.add_opt('series', ['-s', '--series'],
help=_('Set the series this ebook belongs to.')) help=_('Set the series this e-book belongs to.'))
c.add_opt('series_index', ['-i', '--index'], c.add_opt('series_index', ['-i', '--index'],
help=_('Set the index of the book in this series.')) help=_('Set the index of the book in this series.'))
c.add_opt('rating', ['-r', '--rating'], c.add_opt('rating', ['-r', '--rating'],
@ -78,14 +78,14 @@ def config():
help=_('Set the published date.')) help=_('Set the published date.'))
c.add_opt('get_cover', ['--get-cover'], c.add_opt('get_cover', ['--get-cover'],
help=_('Get the cover from the ebook and save it at as the ' help=_('Get the cover from the e-book and save it at as the '
'specified file.')) 'specified file.'))
c.add_opt('to_opf', ['--to-opf'], c.add_opt('to_opf', ['--to-opf'],
help=_('Specify the name of an OPF file. The metadata will ' help=_('Specify the name of an OPF file. The metadata will '
'be written to the OPF file.')) 'be written to the OPF file.'))
c.add_opt('from_opf', ['--from-opf'], c.add_opt('from_opf', ['--from-opf'],
help=_('Read metadata from the specified OPF file and use it to ' help=_('Read metadata from the specified OPF file and use it to '
'set metadata in the ebook. Metadata specified on the ' 'set metadata in the e-book. Metadata specified on the '
'command line will override metadata read from the OPF file')) 'command line will override metadata read from the OPF file'))
c.add_opt('lrf_bookid', ['--lrf-bookid'], c.add_opt('lrf_bookid', ['--lrf-bookid'],
@ -221,5 +221,6 @@ def main(args=sys.argv):
return 0 return 0
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main()) sys.exit(main())

View File

@ -46,7 +46,7 @@ class OverDrive(Source):
config_help_message = '<p>'+_('Additional metadata can be taken from Overdrive\'s book detail' config_help_message = '<p>'+_('Additional metadata can be taken from Overdrive\'s book detail'
' page. This includes a limited set of tags used by libraries, comments, language,' ' page. This includes a limited set of tags used by libraries, comments, language,'
' and the ebook ISBN. Collecting this data is disabled by default due to the extra' ' and the e-book ISBN. Collecting this data is disabled by default due to the extra'
' time required. Check the download all metadata option below to' ' time required. Check the download all metadata option below to'
' enable downloading this data.') ' enable downloading this data.')

View File

@ -21,7 +21,7 @@ from tinycss.fonts3 import parse_font_family
class InvalidFont(BaseError): class InvalidFont(BaseError):
HELP = _('This font could not be processed. It most likely will' HELP = _('This font could not be processed. It most likely will'
' not work in an ebook reader, either') ' not work in an e-book reader, either')
def fix_sheet(sheet, css_name, font_name): def fix_sheet(sheet, css_name, font_name):

View File

@ -73,7 +73,7 @@ class BadDestinationType(BaseError):
def __init__(self, link_source, link_dest, link_elem): def __init__(self, link_source, link_dest, link_elem):
BaseError.__init__(self, _('Link points to a file that is not a text document'), link_source, line=link_elem.sourceline) BaseError.__init__(self, _('Link points to a file that is not a text document'), link_source, line=link_elem.sourceline)
self.HELP = _('The link "{0}" points to a file <i>{1}</i> that is not a text (HTML) document.' self.HELP = _('The link "{0}" points to a file <i>{1}</i> that is not a text (HTML) document.'
' Many ebook readers will be unable to follow such a link. You should' ' Many e-book readers will be unable to follow such a link. You should'
' either remove the link or change it to point to a text document.' ' either remove the link or change it to point to a text document.'
' For example, if it points to an image, you can create small wrapper' ' For example, if it points to an image, you can create small wrapper'
' document that contains the image and change the link to point to that.').format( ' document that contains the image and change the link to point to that.').format(
@ -96,7 +96,7 @@ class BadDestinationFragment(BaseError):
class FileLink(BadLink): class FileLink(BadLink):
HELP = _('This link uses the file:// URL scheme. This does not work with many ebook readers.' HELP = _('This link uses the file:// URL scheme. This does not work with many e-book readers.'
' Remove the file:// prefix and make sure the link points to a file inside the book.') ' Remove the file:// prefix and make sure the link points to a file inside the book.')
@ -115,7 +115,7 @@ class EmptyLink(BadLink):
class UnreferencedResource(BadLink): class UnreferencedResource(BadLink):
HELP = _('This file is included in the book but not referred to by any document in the spine.' HELP = _('This file is included in the book but not referred to by any document in the spine.'
' This means that the file will not be viewable on most ebook readers. You should ' ' This means that the file will not be viewable on most e-book readers. You should '
' probably remove this file from the book or add a link to it somewhere.') ' probably remove this file from the book or add a link to it somewhere.')
def __init__(self, name): def __init__(self, name):
@ -184,7 +184,7 @@ class Bookmarks(BadLink):
HELP = _( HELP = _(
'This file stores the bookmarks and last opened information from' 'This file stores the bookmarks and last opened information from'
' the calibre ebook viewer. You can remove it if you do not' ' the calibre e-book viewer. You can remove it if you do not'
' need that information, or don\'t want to share it with' ' need that information, or don\'t want to share it with'
' other people you send this book to.') ' other people you send this book to.')
INDIVIDUAL_FIX = _('Remove this file') INDIVIDUAL_FIX = _('Remove this file')
@ -192,7 +192,7 @@ class Bookmarks(BadLink):
def __init__(self, name): def __init__(self, name):
BadLink.__init__(self, _( BadLink.__init__(self, _(
'The bookmarks file used by the calibre ebook viewer is present'), name) 'The bookmarks file used by the calibre e-book viewer is present'), name)
def __call__(self, container): def __call__(self, container):
container.remove_item(self.name) container.remove_item(self.name)

View File

@ -42,7 +42,7 @@ class IncorrectCover(BaseError):
class NookCover(BaseError): class NookCover(BaseError):
HELP = _( HELP = _(
'Some ebook readers such as the Nook fail to recognize covers if' 'Some e-book readers such as the Nook fail to recognize covers if'
' the content attribute comes before the name attribute.' ' the content attribute comes before the name attribute.'
' For maximum compatibility move the name attribute before the content attribute.') ' For maximum compatibility move the name attribute before the content attribute.')
INDIVIDUAL_FIX = _('Move the name attribute before the content attribute') INDIVIDUAL_FIX = _('Move the name attribute before the content attribute')
@ -152,7 +152,7 @@ class NonLinearItems(BaseError):
has_multiple_locations = True has_multiple_locations = True
HELP = xml(_('There are items marked as non-linear in the <spine>.' HELP = xml(_('There are items marked as non-linear in the <spine>.'
' These will be displayed in random order by different ebook readers.' ' These will be displayed in random order by different e-book readers.'
' Some will ignore the non-linear attribute, some will display' ' Some will ignore the non-linear attribute, some will display'
' them at the end or the beginning of the book and some will' ' them at the end or the beginning of the book and some will'
' fail to display them at all. Instead of using non-linear items' ' fail to display them at all. Instead of using non-linear items'
@ -255,7 +255,7 @@ class BadSpineMime(BaseError):
BaseError.__init__(self, _('Incorrect media-type for spine item'), opf_name, lnum) BaseError.__init__(self, _('Incorrect media-type for spine item'), opf_name, lnum)
self.HELP = _( self.HELP = _(
'The item {0} present in the spine has the media-type {1}. ' 'The item {0} present in the spine has the media-type {1}. '
' Most ebook software cannot handle non-HTML spine items. ' ' Most e-book software cannot handle non-HTML spine items. '
' If the item is actually HTML, you should change its media-type to {2}.' ' If the item is actually HTML, you should change its media-type to {2}.'
' If it is not-HTML you should consider replacing it with an HTML item, as it' ' If it is not-HTML you should consider replacing it with an HTML item, as it'
' is unlikely to work in most readers.').format(name, mt, XHTML_MIME) ' is unlikely to work in most readers.').format(name, mt, XHTML_MIME)

View File

@ -59,7 +59,7 @@ class XMLParseError(BaseError):
is_parsing_error = True is_parsing_error = True
HELP = _('A parsing error in an XML file means that the XML syntax in the file is incorrect.' HELP = _('A parsing error in an XML file means that the XML syntax in the file is incorrect.'
' Such a file will most probably not open in an ebook reader. These errors can ' ' Such a file will most probably not open in an e-book reader. These errors can '
' usually be fixed automatically, however, automatic fixing can sometimes ' ' usually be fixed automatically, however, automatic fixing can sometimes '
' "do the wrong thing".') ' "do the wrong thing".')
@ -125,7 +125,7 @@ class EscapedName(BaseError):
self.sname = make_filename_safe(name) self.sname = make_filename_safe(name)
self.HELP = _( self.HELP = _(
'The filename {0} contains unsafe characters, that must be escaped, like' 'The filename {0} contains unsafe characters, that must be escaped, like'
' this {1}. This can cause problems with some ebook readers. To be' ' this {1}. This can cause problems with some e-book readers. To be'
' absolutely safe, use only the English alphabet [a-z], the numbers [0-9],' ' absolutely safe, use only the English alphabet [a-z], the numbers [0-9],'
' underscores and hyphens in your file names. While many other characters' ' underscores and hyphens in your file names. While many other characters'
' are allowed, they may cause problems with some software.').format(name, qname) ' are allowed, they may cause problems with some software.').format(name, qname)
@ -149,7 +149,7 @@ class TooLarge(BaseError):
level = INFO level = INFO
MAX_SIZE = 260 *1024 MAX_SIZE = 260 *1024
HELP = _('This HTML file is larger than %s. Too large HTML files can cause performance problems' HELP = _('This HTML file is larger than %s. Too large HTML files can cause performance problems'
' on some ebook readers. Consider splitting this file into smaller sections.') % human_readable(MAX_SIZE) ' on some e-book readers. Consider splitting this file into smaller sections.') % human_readable(MAX_SIZE)
def __init__(self, name): def __init__(self, name):
BaseError.__init__(self, _('File too large'), name) BaseError.__init__(self, _('File too large'), name)
@ -243,6 +243,7 @@ def check_html_size(name, mt, raw):
errors.append(TooLarge(name)) errors.append(TooLarge(name))
return errors return errors
entity_pat = re.compile(br'&(#{0,1}[a-zA-Z0-9]{1,8});') entity_pat = re.compile(br'&(#{0,1}[a-zA-Z0-9]{1,8});')
@ -325,6 +326,7 @@ class CSSError(BaseError):
elem.set('style', force_unicode(container.parse_css(raw, is_declaration=True).cssText, 'utf-8').replace('\n', ' ')) elem.set('style', force_unicode(container.parse_css(raw, is_declaration=True).cssText, 'utf-8').replace('\n', ' '))
return True return True
pos_pats = (re.compile(r'\[(\d+):(\d+)'), re.compile(r'(\d+), (\d+)\)')) pos_pats = (re.compile(r'\[(\d+):(\d+)'), re.compile(r'(\d+), (\d+)\)'))
@ -472,6 +474,7 @@ def check_filenames(container):
errors.append(EscapedName(name)) errors.append(EscapedName(name))
return errors return errors
valid_id = re.compile(r'^[a-zA-Z][a-zA-Z0-9_:.-]*$') valid_id = re.compile(r'^[a-zA-Z][a-zA-Z0-9_:.-]*$')

View File

@ -46,14 +46,14 @@ SUPPORTED = {'EPUB', 'AZW3'}
HELP = {'about': _( HELP = {'about': _(
'''\ '''\
<p><i>Polishing books</i> is all about putting the shine of perfection onto <p><i>Polishing books</i> is all about putting the shine of perfection onto
your carefully crafted ebooks.</p> your carefully crafted e-books.</p>
<p>Polishing tries to minimize the changes to the internal code of your ebook. <p>Polishing tries to minimize the changes to the internal code of your e-book.
Unlike conversion, it <i>does not</i> flatten CSS, rename files, change font Unlike conversion, it <i>does not</i> flatten CSS, rename files, change font
sizes, adjust margins, etc. Every action performs only the minimum set of sizes, adjust margins, etc. Every action performs only the minimum set of
changes needed for the desired effect.</p> changes needed for the desired effect.</p>
<p>You should use this tool as the last step in your ebook creation process.</p> <p>You should use this tool as the last step in your e-book creation process.</p>
{0} {0}
<p>Note that polishing only works on files in the %s formats.</p>\ <p>Note that polishing only works on files in the %s formats.</p>\
''')%_(' or ').join(sorted('<b>%s</b>'%x for x in SUPPORTED)), ''')%_(' or ').join(sorted('<b>%s</b>'%x for x in SUPPORTED)),
@ -124,6 +124,7 @@ def hfix(name, raw):
raw = raw.replace('&lt;', '<').replace('&gt;', '>') raw = raw.replace('&lt;', '<').replace('&gt;', '>')
return raw return raw
CLI_HELP = {x:hfix(x, re.sub('<.*?>', '', y)) for x, y in HELP.iteritems()} CLI_HELP = {x:hfix(x, re.sub('<.*?>', '', y)) for x, y in HELP.iteritems()}
# }}} # }}}
@ -229,6 +230,7 @@ def polish(file_map, opts, log, report):
report('-'*70) report('-'*70)
report(_('Polishing took: %.1f seconds')%(time.time()-st)) report(_('Polishing took: %.1f seconds')%(time.time()-st))
REPORT = '{0} REPORT {0}'.format('-'*30) REPORT = '{0} REPORT {0}'.format('-'*30)
@ -273,7 +275,7 @@ def option_parser():
o('--embed-fonts', '-e', dest='embed', help=CLI_HELP['embed']) o('--embed-fonts', '-e', dest='embed', help=CLI_HELP['embed'])
o('--subset-fonts', '-f', dest='subset', help=CLI_HELP['subset']) o('--subset-fonts', '-f', dest='subset', help=CLI_HELP['subset'])
a('--cover', '-c', help=_( a('--cover', '-c', help=_(
'Path to a cover image. Changes the cover specified in the ebook. ' 'Path to a cover image. Changes the cover specified in the e-book. '
'If no cover is present, or the cover is not properly identified, inserts a new cover.')) 'If no cover is present, or the cover is not properly identified, inserts a new cover.'))
a('--opf', '-o', help=_( a('--opf', '-o', help=_(
'Path to an OPF file. The metadata in the book is updated from the OPF file.')) 'Path to an OPF file. The metadata in the book is updated from the OPF file.'))
@ -327,6 +329,6 @@ def main(args=None):
log('Output written to:', outbook) log('Output written to:', outbook)
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -113,7 +113,7 @@ class Rules(RulesBase):
' when auto-adding. Click the "Add Rule" button' ' when auto-adding. Click the "Add Rule" button'
' below to get started. The rules will be processed in order for every file until either an' ' below to get started. The rules will be processed in order for every file until either an'
' "add" or an "ignore" rule matches. If no rules match, the file will be added only' ' "add" or an "ignore" rule matches. If no rules match, the file will be added only'
' if its file extension is of a known ebook type.') ' if its file extension is of a known e-book type.')
class Tester(TesterBase): class Tester(TesterBase):

View File

@ -39,7 +39,7 @@ def option_parser():
parser = _option_parser(_('''\ parser = _option_parser(_('''\
%prog [options] [path_to_ebook] %prog [options] [path_to_ebook]
Launch the main calibre Graphical User Interface and optionally add the ebook at Launch the main calibre Graphical User Interface and optionally add the e-book at
path_to_ebook to the database. path_to_ebook to the database.
''')) '''))
parser.add_option('--with-library', default=None, action='store', parser.add_option('--with-library', default=None, action='store',

View File

@ -202,12 +202,12 @@ Title match ignores leading indefinite articles (&quot;the&quot;, &quot;a&quot;,
<item row="5" column="0"> <item row="5" column="0">
<widget class="QCheckBox" name="opt_auto_add_everything"> <widget class="QCheckBox" name="opt_auto_add_everything">
<property name="toolTip"> <property name="toolTip">
<string>By default, calibre will auto-add only known ebook files. <string>By default, calibre will auto-add only known e-book files.
This option tells calibre to add all file types, except those This option tells calibre to add all file types, except those
that have been explicitly ignored below.</string> that have been explicitly ignored below.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Auto add files of &amp;all types (not just ebooks)</string> <string>Auto add files of &amp;all types (not just e-books)</string>
</property> </property>
</widget> </widget>
</item> </item>