From 1f18ef225f861616af28b473bf1494d32260f1be Mon Sep 17 00:00:00 2001 From: "Marshall T. Vandegrift" Date: Fri, 26 Jun 2009 18:56:56 -0400 Subject: [PATCH 01/19] Fix #2678. Don't emit multiple nested tags due to child element tail text. --- src/calibre/ebooks/mobi/mobiml.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 04db679a6c..9a3cabae61 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -49,6 +49,7 @@ class BlockState(object): class FormatState(object): def __init__(self): + self.rendered = False self.left = 0. self.halign = 'auto' self.indent = 0. @@ -159,13 +160,15 @@ class MobiMLizer(object): indent = 0 elif indent != 0 and abs(indent) < self.profile.fbase: indent = (indent / abs(indent)) * self.profile.fbase - if tag in NESTABLE_TAGS: + if tag in NESTABLE_TAGS and not istate.rendered: para = wrapper = etree.SubElement( parent, XHTML(tag), attrib=istate.attrib) bstate.nested.append(para) if tag == 'li' and len(istates) > 1: istates[-2].list_num += 1 para.attrib['value'] = str(istates[-2].list_num) + elif tag in NESTABLE_TAGS and istate.rendered: + para = wrapper = bstate.nested[-1] elif left > 0 and indent >= 0: para = wrapper = etree.SubElement(parent, XHTML('blockquote')) para = wrapper @@ -189,6 +192,7 @@ class MobiMLizer(object): vspace -= 1 if istate.halign != 'auto' and isinstance(istate.halign, (str, unicode)): para.attrib['align'] = istate.halign + istate.rendered = True pstate = bstate.istate if tag in CONTENT_TAGS: bstate.inline = para @@ -253,6 +257,7 @@ class MobiMLizer(object): return tag = barename(elem.tag) istate = copy.copy(istates[-1]) + istate.rendered = False istate.list_num = 0 istates.append(istate) left = 0 From 80bc5384bc76614ef7adf42eb434553ac74ade7b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Jun 2009 19:09:18 -0700 Subject: [PATCH 02/19] ... --- installer/windows/build_installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/windows/build_installer.py b/installer/windows/build_installer.py index 24a8768ded..01720bb2c0 100644 --- a/installer/windows/build_installer.py +++ b/installer/windows/build_installer.py @@ -36,7 +36,7 @@ def run_install_jammer(installer_name='<%AppName%>-<%Version%><%Ext%>', build_fo compression = 'zlib' if build_for_release: cmdline += ['--build-for-release'] - compression = 'lzma (solid)' + #compression = 'lzma (solid)' cmdline += ['-DCompressionMethod', compression] cmdline += ['--build', mpi] #print 'Running installjammer with cmdline:' From 9e3156782d2df7a38b3b3b8c8474f90cfed4d297 Mon Sep 17 00:00:00 2001 From: "Marshall T. Vandegrift" Date: Sun, 28 Jun 2009 10:04:21 -0400 Subject: [PATCH 03/19] Cleaner fix for #2696. --- src/calibre/ebooks/lit/writer.py | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/calibre/ebooks/lit/writer.py b/src/calibre/ebooks/lit/writer.py index 943fa6db62..e0cc691ad1 100644 --- a/src/calibre/ebooks/lit/writer.py +++ b/src/calibre/ebooks/lit/writer.py @@ -161,7 +161,7 @@ class ReBinary(object): def tree_to_binary(self, elem, nsrmap=NSRMAP, parents=[], inhead=False, preserve=False): if not isinstance(elem.tag, basestring): - self.write(etree.tostring(elem)) + # Don't emit any comments or raw entities return nsrmap = copy.copy(nsrmap) attrib = dict(elem.attrib) @@ -308,31 +308,6 @@ class LitWriter(object): else: self._logger.warn('No suitable cover image found.') - # Remove comments because they are not supported by LIT HTML - for item in oeb.spine: - for elem in item.data.getiterator(): - if isinstance(elem, etree._Comment): - tail = elem.tail - parent = elem.getparent() - index = parent.index(elem) - text = u'' - if index == 0: - if parent.text: - text += parent.text - if tail: - text += tail - parent.text = text - else: - prev = parent[index-1] - text = u'' - if prev.tail: - text += prev.tail - if tail: - text += tail - prev.tail = text - parent.remove(elem) - - def __call__(self, oeb, path): if hasattr(path, 'write'): return self._dump_stream(oeb, path) @@ -734,5 +709,3 @@ class LitWriter(object): ichunk = ''.join(['AOLI', pack(' Date: Mon, 29 Jun 2009 22:01:01 -0600 Subject: [PATCH 04/19] new recipes for inquirer and uncrate by Darko Miletic --- src/calibre/gui2/images/news/inquirer_net.png | Bin 0 -> 837 bytes src/calibre/gui2/images/news/uncrate.png | Bin 0 -> 269 bytes src/calibre/web/feeds/recipes/__init__.py | 2 +- .../web/feeds/recipes/recipe_inquirer_net.py | 61 ++++++++++++++++++ .../web/feeds/recipes/recipe_uncrate.py | 47 ++++++++++++++ 5 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 src/calibre/gui2/images/news/inquirer_net.png create mode 100644 src/calibre/gui2/images/news/uncrate.png create mode 100644 src/calibre/web/feeds/recipes/recipe_inquirer_net.py create mode 100644 src/calibre/web/feeds/recipes/recipe_uncrate.py diff --git a/src/calibre/gui2/images/news/inquirer_net.png b/src/calibre/gui2/images/news/inquirer_net.png new file mode 100644 index 0000000000000000000000000000000000000000..0653c9f4e6f44f75015d846a72fd8616eeb8f2a7 GIT binary patch literal 837 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GXl47#jk7LR=ZR+oKmgck`Wj^4L9* z{L9`wcP1^oBJZ>H{ny_{6_-m3)@iACtvK`1xB9ZE)w~C{Usf%77(M%O=a!ebDa$6! zJSmlY*0|%2OyxE2hfUPu&Q zv8}vd*>c-|>I2uw50zb4*RFk)Pk#2VXIW^aizERV=;YGUdstBX5)~XJjX@^~v3B=``0Yai>wjE@R`FH*UOAsJ>pf z?seVPH=5P=ye8cXo%bwt+4F}F-eoL!?9zTqH0R3cWB0!P{8w7Gt!~+4sr(CRRr}1E zZvW|G^!#iUKEU&gr9(2(2hSODKifnr`ZU0FfX(%%B*pL@7g z2dVO!vn9(Ww%U{$U%M6M>hI^rU&-bwtIm0w<6=f=~bUJT3Olb=L;(0Bs23CNXDG{`S7aDp=pd~ zqO3f5c)U7;syJ(o?laW;q{?^m<~^Q?6A!+c`0CZGBrhGOsAYvdJg)>2^5;)VdY6_I zbY?;mn*j?$UyY+R!?R3Jp#N1%Tq8=7i&7IyQgu^+1cQ-*fu*j2nXZv#h>@X{sj-!b x0g!8DV34VJ&<&;`H$NpatrA0nfu)tHr4>*!SVOHV_imsD22WQ%mvv4FO#q^7ZOH%t literal 0 HcmV?d00001 diff --git a/src/calibre/gui2/images/news/uncrate.png b/src/calibre/gui2/images/news/uncrate.png new file mode 100644 index 0000000000000000000000000000000000000000..74cb9ee91f70cc23271e1c1ea92f09f7d5acbf1a GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6n3BBRT^Rni_n+Ah2>S z4={E+nQaFWEGuwK2hw1@3^B*n9tLu(JY5_^G|nfd{5anrZeVD@!_2C~1aTF*39=HMKIb0CKGi3?}aX_7J8aH$NpatrA0nfu)tPv6Yb# VM1#qWqIjSN22WQ%mvv4FO#qJtM^yj- literal 0 HcmV?d00001 diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index af776493f8..6e4c27a5dd 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -50,7 +50,7 @@ recipe_modules = ['recipe_' + r for r in ( 'marca', 'kellog_faculty', 'kellog_insight', 'theeconomictimes_india', '7dias', 'buenosaireseconomico', 'diagonales', 'miradasalsur', 'newsweek_argentina', 'veintitres', - 'gva_be', 'hln', 'tijd', 'degentenaar', + 'gva_be', 'hln', 'tijd', 'degentenaar', 'inquirer_net', 'uncrate', )] import re, imp, inspect, time, os diff --git a/src/calibre/web/feeds/recipes/recipe_inquirer_net.py b/src/calibre/web/feeds/recipes/recipe_inquirer_net.py new file mode 100644 index 0000000000..5a7109e6fb --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_inquirer_net.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2009, Darko Miletic ' +''' +www.inquirer.net +''' + +from calibre.web.feeds.recipes import BasicNewsRecipe +from calibre.ebooks.BeautifulSoup import Tag + +class InquirerNet(BasicNewsRecipe): + title = 'Inquirer.net' + __author__ = 'Darko Miletic' + description = 'News from Philipines' + oldest_article = 2 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + encoding = 'cp1252' + publisher = 'inquirer.net' + category = 'news, politics, philipines' + lang = 'en' + language = _('English') + extra_css = ' .fontheadline{font-size: x-large} .fontsubheadline{font-size: large} .fontkick{font-size: medium}' + + html2lrf_options = [ + '--comment', description + , '--category', category + , '--publisher', publisher + , '--ignore-tables' + ] + + html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True' + + remove_tags = [dict(name=['object','link','script','iframe','form'])] + + feeds = [ + (u'Breaking news', u'http://services.inquirer.net/rss/breakingnews.xml' ) + ,(u'Top stories' , u'http://services.inquirer.net/rss/topstories.xml' ) + ,(u'Sports' , u'http://services.inquirer.net/rss/brk_breakingnews.xml' ) + ,(u'InfoTech' , u'http://services.inquirer.net/rss/infotech_tech.xml' ) + ,(u'InfoTech' , u'http://services.inquirer.net/rss/infotech_tech.xml' ) + ,(u'Business' , u'http://services.inquirer.net/rss/inq7money_breaking_news.xml' ) + ,(u'Editorial' , u'http://services.inquirer.net/rss/opinion_editorial.xml' ) + ,(u'Global Nation', u'http://services.inquirer.net/rss/globalnation_breakingnews.xml') + ] + + def preprocess_html(self, soup): + mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)]) + mcharset = Tag(soup,'meta',[("http-equiv","Content-Type"),("content","text/html; charset=utf-8")]) + soup.head.insert(0,mlang) + soup.head.insert(1,mcharset) + for item in soup.findAll(style=True): + del item['style'] + return soup + + def print_version(self, url): + rest, sep, art = url.rpartition('/view/') + art_id, sp, rrest = art.partition('/') + return 'http://services.inquirer.net/print/print.php?article_id=' + art_id diff --git a/src/calibre/web/feeds/recipes/recipe_uncrate.py b/src/calibre/web/feeds/recipes/recipe_uncrate.py new file mode 100644 index 0000000000..ac0c54cd37 --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_uncrate.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2009, Darko Miletic ' +''' +www.uncrate.com +''' + +from calibre.web.feeds.recipes import BasicNewsRecipe +from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag + +class Uncrate(BasicNewsRecipe): + title = 'Uncrate' + __author__ = 'Darko Miletic' + description = 'Uncrate is a web magazine for guys who love stuff. Our team digs up the best gadgets, clothes, cars, DVDs and more. New items are posted daily. Enjoy responsively.' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + encoding = 'utf-8' + publisher = 'Zombie corp.' + category = 'news, gadgets, clothes, cars, DVDs' + lang = 'en-US' + language = _('English') + + html2lrf_options = [ + '--comment', description + , '--category', category + , '--publisher', publisher + ] + + html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"' + + keep_only_tags = [dict(name='div', attrs={'class':'lefttext'})] + remove_tags_after = dict(name='div', attrs={'class':'serif'}) + remove_tags = [dict(name=['object','link','script','iframe','form'])] + + feeds = [(u'Articles', u'http://feeds.feedburner.com/uncrate')] + + def preprocess_html(self, soup): + mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)]) + mcharset = Tag(soup,'meta',[("http-equiv","Content-Type"),("content","text/html; charset=utf-8")]) + soup.head.insert(0,mlang) + soup.head.insert(1,mcharset) + for item in soup.findAll(style=True): + del item['style'] + return self.adeify_images(soup) From 431c60edd06797ca2fbc20edb1857d1394f446d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Jun 2009 07:12:54 -0600 Subject: [PATCH 05/19] Fix regression that was removing pubdate/timestamp from converted books --- src/calibre/ebooks/oeb/base.py | 2 +- src/calibre/ebooks/oeb/transforms/metadata.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 276f315873..1e8aaa8b60 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -455,7 +455,7 @@ class Metadata(object): 'description', 'format', 'identifier', 'language', 'publisher', 'relation', 'rights', 'source', 'subject', 'title', 'type']) - CALIBRE_TERMS = set(['series', 'series_index', 'rating']) + CALIBRE_TERMS = set(['series', 'series_index', 'rating', 'timestamp']) OPF_ATTRS = {'role': OPF('role'), 'file-as': OPF('file-as'), 'scheme': OPF('scheme'), 'event': OPF('event'), 'type': XSI('type'), 'lang': XML('lang'), 'id': 'id'} diff --git a/src/calibre/ebooks/oeb/transforms/metadata.py b/src/calibre/ebooks/oeb/transforms/metadata.py index b2d254f76c..74bf78c691 100644 --- a/src/calibre/ebooks/oeb/transforms/metadata.py +++ b/src/calibre/ebooks/oeb/transforms/metadata.py @@ -7,6 +7,7 @@ __copyright__ = '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' import os +from datetime import datetime def meta_info_to_oeb_metadata(mi, m, log): if mi.title: @@ -56,6 +57,15 @@ def meta_info_to_oeb_metadata(mi, m, log): m.clear('subject') for t in mi.tags: m.add('subject', t) + if mi.pubdate is not None: + m.clear('date') + m.add('date', mi.pubdate.isoformat()) + if mi.timestamp is not None: + m.clear('timestamp') + m.add('timestamp', mi.timestamp.isoformat()) + if not m.timestamp: + m.add('timestamp', datetime.utcnow().isoformat()) + class MergeMetadata(object): From e83acb96457fe17d1ebdae3ff5f28fb767b8976b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Jun 2009 07:22:01 -0600 Subject: [PATCH 06/19] Fix #2152 (Typo in GUI) --- src/calibre/ebooks/oeb/writer.py | 2 +- src/calibre/ebooks/pdb/input.py | 2 +- src/calibre/ebooks/pdb/output.py | 2 +- .../gui2/device_drivers/configwidget.ui | 2 +- src/calibre/translations/calibre.pot | 706 ++++++++---------- 5 files changed, 297 insertions(+), 417 deletions(-) diff --git a/src/calibre/ebooks/oeb/writer.py b/src/calibre/ebooks/oeb/writer.py index 3dcc81552c..9c7c1af48d 100644 --- a/src/calibre/ebooks/oeb/writer.py +++ b/src/calibre/ebooks/oeb/writer.py @@ -35,7 +35,7 @@ class OEBWriter(object): help=_('OPF version to generate. Default is %default.')) oeb('adobe_page_map', ['--adobe-page-map'], default=False, help=_('Generate an Adobe "page-map" file if pagination ' - 'information is avaliable.')) + 'information is available.')) return cfg @classmethod diff --git a/src/calibre/ebooks/pdb/input.py b/src/calibre/ebooks/pdb/input.py index 68e709e8b8..62ae24c7f0 100644 --- a/src/calibre/ebooks/pdb/input.py +++ b/src/calibre/ebooks/pdb/input.py @@ -23,7 +23,7 @@ class PDBInput(InputFormatPlugin): Reader = get_reader(header.ident) if Reader is None: - raise PDBError('No reader avaliable for format within container.\n Identity is %s. Book type is %s' % (header.ident, IDENTITY_TO_NAME.get(header.ident, _('Unknown')))) + raise PDBError('No reader available for format within container.\n Identity is %s. Book type is %s' % (header.ident, IDENTITY_TO_NAME.get(header.ident, _('Unknown')))) log.debug('Detected ebook format as: %s with identity: %s' % (IDENTITY_TO_NAME[header.ident], header.ident)) diff --git a/src/calibre/ebooks/pdb/output.py b/src/calibre/ebooks/pdb/output.py index bf9f05f24b..b591769ec8 100644 --- a/src/calibre/ebooks/pdb/output.py +++ b/src/calibre/ebooks/pdb/output.py @@ -42,7 +42,7 @@ class PDBOutput(OutputFormatPlugin): Writer = get_writer(opts.format) if Writer is None: - raise PDBError('No writer avaliable for format %s.' % format) + raise PDBError('No writer available for format %s.' % format) writer = Writer(opts, log) diff --git a/src/calibre/gui2/device_drivers/configwidget.ui b/src/calibre/gui2/device_drivers/configwidget.ui index 2f0359189e..15b50664c4 100644 --- a/src/calibre/gui2/device_drivers/configwidget.ui +++ b/src/calibre/gui2/device_drivers/configwidget.ui @@ -17,7 +17,7 @@ - Select avaliable formats and their order for this device + Select available formats and their order for this device diff --git a/src/calibre/translations/calibre.pot b/src/calibre/translations/calibre.pot index 6fc61b369a..5ad920d074 100644 --- a/src/calibre/translations/calibre.pot +++ b/src/calibre/translations/calibre.pot @@ -4,9 +4,9 @@ # msgid "" msgstr "" -"Project-Id-Version: calibre 0.6.0b8\n" -"POT-Creation-Date: 2009-06-24 08:51+PDT\n" -"PO-Revision-Date: 2009-06-24 08:51+PDT\n" +"Project-Id-Version: calibre 0.6.0b10\n" +"POT-Creation-Date: 2009-06-30 07:21+MDT\n" +"PO-Revision-Date: 2009-06-30 07:21+MDT\n" "Last-Translator: Automatically generated\n" "Language-Team: LANGUAGE\n" "MIME-Version: 1.0\n" @@ -20,16 +20,16 @@ msgid "Does absolutely nothing" msgstr "" #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:44 -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:68 -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:69 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:70 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:71 #: /home/kovid/work/calibre/src/calibre/devices/jetbook/driver.py:116 #: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:57 #: /home/kovid/work/calibre/src/calibre/devices/prs505/books.py:58 #: /home/kovid/work/calibre/src/calibre/devices/prs505/books.py:199 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:162 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:163 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:145 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:146 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:164 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:165 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:148 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:149 #: /home/kovid/work/calibre/src/calibre/ebooks/comic/input.py:404 #: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:50 #: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:52 @@ -67,8 +67,9 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/odt/input.py:46 #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:837 #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:842 -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/reader.py:169 -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/reader.py:172 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:880 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/reader.py:133 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/reader.py:135 #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/transforms/jacket.py:83 #: /home/kovid/work/calibre/src/calibre/ebooks/pdb/ereader/writer.py:101 #: /home/kovid/work/calibre/src/calibre/ebooks/pdb/ereader/writer.py:102 @@ -97,12 +98,12 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/__init__.py:198 #: /home/kovid/work/calibre/src/calibre/gui2/__init__.py:205 #: /home/kovid/work/calibre/src/calibre/gui2/convert/__init__.py:19 -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:69 -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:71 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:72 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:74 #: /home/kovid/work/calibre/src/calibre/gui2/device.py:531 #: /home/kovid/work/calibre/src/calibre/gui2/device.py:540 -#: /home/kovid/work/calibre/src/calibre/gui2/device.py:755 -#: /home/kovid/work/calibre/src/calibre/gui2/device.py:758 +#: /home/kovid/work/calibre/src/calibre/gui2/device.py:756 +#: /home/kovid/work/calibre/src/calibre/gui2/device.py:759 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf.py:48 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:106 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:139 @@ -110,9 +111,9 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:39 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:40 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:123 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:356 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:369 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:932 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:361 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:374 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:942 #: /home/kovid/work/calibre/src/calibre/library/cli.py:264 #: /home/kovid/work/calibre/src/calibre/library/database.py:917 #: /home/kovid/work/calibre/src/calibre/library/database2.py:618 @@ -350,22 +351,22 @@ msgstr "" msgid "Kovid Goyal" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:16 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:18 msgid "Communicate with the Cybook eBook reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:17 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:19 #: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:14 #: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:70 #: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:79 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:26 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:29 msgid "John Schember" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:58 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:60 #: /home/kovid/work/calibre/src/calibre/devices/jetbook/driver.py:63 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:151 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:133 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:153 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:136 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:467 #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80 #: /home/kovid/work/calibre/src/calibre/library/database2.py:970 @@ -374,25 +375,25 @@ msgstr "" msgid "News" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:97 #: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:99 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:101 #: /home/kovid/work/calibre/src/calibre/devices/jetbook/driver.py:98 #: /home/kovid/work/calibre/src/calibre/devices/jetbook/driver.py:100 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:177 #: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:179 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:165 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:167 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:181 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:168 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:170 msgid "Transferring books to device..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:105 -#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:125 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:107 +#: /home/kovid/work/calibre/src/calibre/devices/cybookg3/driver.py:127 #: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:43 #: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:52 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:207 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:210 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:186 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:195 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:212 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:219 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:189 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:198 msgid "Removing books from device..." msgstr "" @@ -426,55 +427,55 @@ msgid "Communicate with the Sony PRS-500 eBook reader." msgstr "" #: /home/kovid/work/calibre/src/calibre/devices/prs505/books.py:150 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:82 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:85 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:88 -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:99 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:49 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:84 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:87 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:90 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:101 #: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:52 #: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:55 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:68 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:74 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:78 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:58 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:71 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:77 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:81 msgid "Getting list of books on device..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:19 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:21 msgid "Communicate with the Sony PRS-505 eBook reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:20 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:22 #: /home/kovid/work/calibre/src/calibre/devices/prs700/driver.py:14 msgid "Kovid Goyal and John Schember" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:77 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:41 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:79 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:44 msgid "Get device information..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:105 #: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:107 #: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:109 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:84 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:86 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:111 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:87 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:89 msgid "The reader has no storage card in this slot." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:130 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:109 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:132 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:112 msgid "There is insufficient free space in main memory" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:132 #: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:134 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:111 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:113 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:136 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:114 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:116 msgid "There is insufficient free space on the storage card" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:238 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:210 +#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:247 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:213 msgid "Sending metadata to device..." msgstr "" @@ -508,21 +509,21 @@ msgstr "" msgid "settings for device drivers" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:25 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:28 msgid "Communicate with an eBook reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:88 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:91 msgid "Selected slot: %s is not supported." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:173 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:181 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:176 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:184 msgid "Adding books to device metadata listing..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:199 -#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:204 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:202 +#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:207 msgid "Removing books from device metadata listing..." msgstr "" @@ -605,43 +606,43 @@ msgid "" "For full documentation of the conversion system see\n" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:89 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:96 msgid "INPUT OPTIONS" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:90 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:97 msgid "Options to control the processing of the input %s file" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:96 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:103 msgid "OUTPUT OPTIONS" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:97 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:104 msgid "Options to control the processing of the output %s" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:111 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:118 msgid "Options to control the look and feel of the output" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:125 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:132 msgid "Control auto-detection of document structure." msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:135 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:142 msgid "Control the automatic generation of a Table of Contents. By default, if the source file has a Table of Contents, it will be used in preference to the automatically generated one." msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:145 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:152 msgid "Options to set metadata in the output" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:148 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:155 msgid "Options to help with debugging the conversion" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:222 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/cli.py:229 msgid "Output saved to" msgstr "" @@ -856,7 +857,7 @@ msgstr "" msgid "Running transforms on ebook..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/plumber.py:684 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/plumber.py:683 msgid "Creating" msgstr "" @@ -1144,23 +1145,23 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:69 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:70 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:56 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:116 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:353 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:998 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:117 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:358 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1008 msgid "Title" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:346 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:57 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:117 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:358 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:999 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:118 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:363 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1009 msgid "Author(s)" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:347 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:59 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:122 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:123 msgid "Publisher" msgstr "" @@ -1173,27 +1174,26 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:178 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:71 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info_ui.py:64 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:489 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:517 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:361 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:314 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:319 #: /home/kovid/work/calibre/src/calibre/gui2/status.py:58 msgid "Comments" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:357 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:123 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:303 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:942 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1002 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:124 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:308 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:952 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1012 #: /home/kovid/work/calibre/src/calibre/gui2/status.py:60 #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80 msgid "Tags" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:359 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:124 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:319 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:125 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:324 #: /home/kovid/work/calibre/src/calibre/gui2/status.py:59 #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80 msgid "Series" @@ -1204,13 +1204,13 @@ msgid "Language" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:362 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:941 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:951 msgid "Timestamp" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:364 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:61 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:120 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:121 msgid "Published" msgstr "" @@ -1362,74 +1362,74 @@ msgstr "" msgid "Disable compression of the file contents." msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1254 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1239 msgid "Cover" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1255 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1240 msgid "Title Page" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1256 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1241 #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/transforms/htmltoc.py:15 #: /home/kovid/work/calibre/src/calibre/gui2/viewer/main.py:48 #: /home/kovid/work/calibre/src/calibre/gui2/viewer/main_ui.py:166 msgid "Table of Contents" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1257 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1242 msgid "Index" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1258 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1243 msgid "Glossary" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1259 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1244 msgid "Acknowledgements" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1260 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1245 msgid "Bibliography" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1261 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1246 msgid "Colophon" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1262 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1247 msgid "Copyright" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1263 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1248 msgid "Dedication" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1264 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1249 msgid "Epigraph" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1265 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1250 msgid "Foreword" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1266 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1251 msgid "List of Illustrations" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1267 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1252 msgid "List of Tables" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1268 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1253 msgid "Notes" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1269 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1254 msgid "Preface" msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1270 +#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1255 msgid "Main Text" msgstr "" @@ -1486,7 +1486,7 @@ msgid "OPF version to generate. Default is %default." msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/writer.py:37 -msgid "Generate an Adobe \"page-map\" file if pagination information is avaliable." +msgid "Generate an Adobe \"page-map\" file if pagination information is available." msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/pdb/ereader/reader132.py:112 @@ -1956,7 +1956,6 @@ msgid "output" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/epub_output_ui.py:39 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:513 msgid "Do not &split on page breaks" msgstr "" @@ -1977,7 +1976,6 @@ msgid "Control the look and feel of the output" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel_ui.py:86 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:491 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:518 msgid "Base &font size:" msgstr "" @@ -1991,11 +1989,6 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/page_setup_ui.py:118 #: /home/kovid/work/calibre/src/calibre/gui2/convert/page_setup_ui.py:120 #: /home/kovid/work/calibre/src/calibre/gui2/convert/page_setup_ui.py:122 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:492 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:506 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:508 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:510 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:512 msgid " pt" msgstr "" @@ -2004,17 +1997,14 @@ msgid "Line &height:" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel_ui.py:90 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:493 msgid "Remove &spacing between paragraphs" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel_ui.py:91 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:498 msgid "No text &justification" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel_ui.py:92 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:499 msgid "&Linearize tables" msgstr "" @@ -2101,63 +2091,54 @@ msgstr "" msgid "Set the metadata. The output file will contain as much of this metadata as possible." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:97 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:100 msgid "Choose cover for " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:104 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:107 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single.py:108 msgid "Cannot read" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:105 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:108 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single.py:109 msgid "You do not have permission to read the file: " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:113 -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:120 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:116 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:123 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single.py:117 msgid "Error reading file" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:114 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:117 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single.py:118 msgid "

There was an error reading from file:
" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:121 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:124 msgid " is not a valid picture" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:159 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:468 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:496 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:370 msgid "Book Cover" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:160 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:472 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:500 -msgid "Use cover from &source file" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:161 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:469 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:497 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:371 msgid "Change &cover image:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:162 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:470 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:161 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:498 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:372 msgid "Browse for an image to use as the cover of this book." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:163 +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:162 #: /home/kovid/work/calibre/src/calibre/gui2/convert/xpath_edit_ui.py:44 #: /home/kovid/work/calibre/src/calibre/gui2/device_drivers/configwidget_ui.py:55 #: /home/kovid/work/calibre/src/calibre/gui2/device_drivers/configwidget_ui.py:56 @@ -2167,7 +2148,6 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config_ui.py:493 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config_ui.py:494 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config_ui.py:525 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:471 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:499 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:337 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:342 @@ -2190,22 +2170,24 @@ msgstr "" msgid "..." msgstr "" +#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:163 +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:500 +msgid "Use cover from &source file" +msgstr "" + #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:164 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:473 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:501 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:334 msgid "&Title: " msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:165 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:474 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:502 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:335 msgid "Change the title of this book" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:166 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:475 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:503 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:128 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:338 @@ -2213,26 +2195,22 @@ msgid "&Author(s): " msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:167 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:476 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:504 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:129 msgid "Change the author(s) of this book. Multiple authors should be separated by an &. If the author name contains an &, use && to represent it." msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:168 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:477 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:505 msgid "Author So&rt:" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:169 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:478 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:506 msgid "Change the author(s) of this book. Multiple authors should be separated by a comma" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:170 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:479 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:507 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:136 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:347 @@ -2240,21 +2218,18 @@ msgid "&Publisher: " msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:171 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:480 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:508 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:137 msgid "Change the publisher of this book" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:172 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:481 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:509 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:348 msgid "Ta&gs: " msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:173 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:482 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:510 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:139 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:349 @@ -2262,7 +2237,6 @@ msgid "Tags categorize the book. This is particularly useful while searching. Cannot upload books to device there is no more free space available " msgstr "" #: #: /home/kovid/work/calibre/src/calibre/gui2/device_drivers/configwidget_ui.py:54 -msgid "Select avaliable formats and their order for this device" +msgid "Select available formats and their order for this device" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:84 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:85 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:86 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:310 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:937 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:315 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:947 #: /home/kovid/work/calibre/src/calibre/gui2/status.py:56 msgid "Path" msgstr "" @@ -2826,7 +2792,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:89 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:92 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config.py:212 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:309 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:314 #: /home/kovid/work/calibre/src/calibre/gui2/status.py:57 #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80 msgid "Formats" @@ -2861,7 +2827,6 @@ msgid "&Author(s):" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf_ui.py:95 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:502 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:540 msgid "&Profile:" msgstr "" @@ -2971,7 +2936,7 @@ msgid "Access log:" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config.py:607 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:543 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:548 msgid "Failed to start content server" msgstr "" @@ -3282,122 +3247,6 @@ msgstr "" msgid "ERROR" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:467 -msgid "Convert to EPUB" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:486 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:487 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:514 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:515 -msgid "Series index." -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:490 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:524 -msgid "Source en&coding:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:494 -msgid "Preserve &tag structure when splitting" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:495 -msgid "&Rescale images" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:496 -msgid "&Ignore tables" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:497 -msgid "&Use author sort to set author field in output" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:500 -msgid "Remove &first image from source file" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:501 -msgid "Override &CSS" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:503 -msgid "&Source profile:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:504 -msgid "&Destination profile:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:505 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:541 -msgid "&Left Margin:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:507 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:543 -msgid "&Right Margin:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:509 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:545 -msgid "&Top Margin:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:511 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:547 -msgid "&Bottom Margin:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:514 -msgid "&Page map" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:515 -msgid "

You can control how calibre detects page boundaries using a XPath expression. To learn how to use XPath expressions see the XPath tutorial. The page boundaries are useful only if you want a mapping from pages in a paper book, to locations in the e-book. This controls where Adobe Digital Editions displays the page numbers in the right margin.

" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:516 -msgid "&Boundary XPath:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:517 -msgid "&Name XPath:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:518 -msgid "Automatic &chapter detection" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:519 -msgid "

You can control how calibre detects chapters using a XPath expression. To learn how to use XPath expressions see the XPath tutorial

" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:520 -msgid "&XPath:" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:522 -msgid "Automatic &Table of Contents" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:527 -msgid "Level &1 TOC" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:528 -msgid "Level &2 TOC" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:529 -msgid "&Title for generated TOC" -msgstr "" - -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:530 -msgid "Level &3 TOC" -msgstr "" - #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:58 msgid "Author Sort" msgstr "" @@ -3482,6 +3331,11 @@ msgstr "" msgid "Category" msgstr "" +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:514 +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:515 +msgid "Series index." +msgstr "" + #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:519 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:526 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:528 @@ -3504,6 +3358,10 @@ msgstr "" msgid "&Monospace:" msgstr "" +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:524 +msgid "Source en&coding:" +msgstr "" + #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:525 msgid "Minimum &indent:" msgstr "" @@ -3558,6 +3416,22 @@ msgstr "" msgid "Override
CSS" msgstr "" +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:541 +msgid "&Left Margin:" +msgstr "" + +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:543 +msgid "&Right Margin:" +msgstr "" + +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:545 +msgid "&Top Margin:" +msgstr "" + +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:547 +msgid "&Bottom Margin:" +msgstr "" + #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:549 msgid "&Convert tables to images (good for large/complex tables)" msgstr "" @@ -4355,48 +4229,48 @@ msgstr "" msgid " - Jobs" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:118 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1000 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:119 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1010 msgid "Size (MB)" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:119 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1001 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:120 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1011 msgid "Date" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:121 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:122 msgid "Rating" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:302 -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:308 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:307 #: /home/kovid/work/calibre/src/calibre/gui2/library.py:313 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:318 #: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:374 msgid "None" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:319 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:324 msgid "Book %s of %s." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:773 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:778 msgid "Not allowed" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:774 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:779 msgid "Dropping onto a device is not supported. First add the book to the calibre library." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:936 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:946 msgid "Format" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:990 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1000 msgid "Double click to edit me

" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1039 +#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1049 msgid "Search (For Advanced Search click the button to the left)" msgstr "" @@ -4477,7 +4351,7 @@ msgid "Save single format to disk..." msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/main.py:137 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:942 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:957 #: /home/kovid/work/calibre/src/calibre/utils/ipc/job.py:49 msgid "Error" msgstr "" @@ -4538,75 +4412,79 @@ msgstr "" msgid "Add books from directories, including sub directories (Multiple books per directory, assumes every ebook file is a different book)" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:270 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:237 +msgid "Add Empty book. (Book entry with no formats)" +msgstr "" + +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:274 #: /home/kovid/work/calibre/src/calibre/gui2/main_ui.py:358 msgid "Save to disk" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:271 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:275 msgid "Save to disk in a single directory" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:272 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1431 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:276 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1444 msgid "Save only %s format to disk" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:280 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:284 #: /home/kovid/work/calibre/src/calibre/gui2/main_ui.py:364 msgid "View" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:281 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:285 msgid "View specific format" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:307 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:311 msgid "Convert individually" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:308 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:312 msgid "Bulk convert" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:321 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:325 msgid "Run welcome wizard" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:355 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:359 msgid "Similar books..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:412 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:416 msgid "Bad database location" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:415 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1559 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:419 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1572 msgid "Choose a location for your ebook library." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:586 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:591 msgid "Browse by covers" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:688 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:694 msgid "Device: " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:690 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:696 msgid " detected." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:712 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:718 msgid "Connected " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:724 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:730 msgid "Device database corrupted" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:725 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:731 msgid "" "\n" "

The database of books on the reader is corrupted. Try the following:\n" @@ -4617,286 +4495,286 @@ msgid "" " " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:792 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:835 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:807 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:850 msgid "Uploading books to device." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:800 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:815 msgid "Books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:801 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:816 msgid "EPUB Books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:802 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:817 msgid "LRF Books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:803 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:818 msgid "HTML Books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:804 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:819 msgid "LIT Books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:805 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:820 msgid "MOBI Books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:806 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:821 msgid "Text books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:807 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:822 msgid "PDF Books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:808 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:823 msgid "Comics" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:809 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:824 msgid "Archives" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:856 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:871 msgid "The selected books will be permanently deleted and the files removed from your computer. Are you sure?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:873 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:888 msgid "Deleting books from device." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:904 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:919 msgid "Cannot download metadata" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:905 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:955 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:985 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1010 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1141 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:920 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:968 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:998 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1023 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1154 msgid "No books selected" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:914 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:929 msgid "covers" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:914 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:929 msgid "metadata" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:916 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:931 msgid "Downloading %s for %d book(s)" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:937 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:952 msgid "Failed to download some metadata" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:938 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:953 msgid "Failed to download metadata for the following:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:941 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:956 msgid "Failed to download metadata:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:954 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:984 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:967 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:997 msgid "Cannot edit metadata" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1009 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1022 msgid "Cannot save to disk" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1012 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1025 msgid "Choose destination directory" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1035 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1048 msgid "Error while saving" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1036 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1049 msgid "There was an error while saving." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1040 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1041 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1053 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1054 msgid "Could not save some books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1042 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1055 msgid "as the %s format is not available for them." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1043 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1056 msgid "Click the show details button to see which ones." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1062 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1075 msgid "Fetching news from " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1075 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1088 msgid " fetched." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1140 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1153 msgid "Cannot convert" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1325 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1344 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1338 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1357 msgid "No book selected" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1325 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1374 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1338 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1387 msgid "Cannot view" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1331 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1379 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1344 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1392 msgid "Choose the format to view" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1343 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1356 msgid "Cannot open folder" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1375 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1388 msgid "%s has no available formats." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1416 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1429 msgid "Cannot configure" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1417 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1430 msgid "Cannot configure while there are running jobs." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1460 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1473 msgid "No detailed info available" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1461 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1474 msgid "No detailed information is available for books on the device." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1509 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1522 msgid "Error talking to device" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1510 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1523 msgid "There was a temporary error talking to the device. Please unplug and reconnect the device and or reboot." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1527 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1542 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1540 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1555 msgid "Conversion Error" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1528 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1541 msgid "

Could not convert: %s

It is a DRMed book. You must first remove the DRM using 3rd party tools." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1543 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1556 msgid "Failed" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1568 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1581 msgid "Invalid library location" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1569 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1582 msgid "Could not access %s. Using %s as the library." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1617 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1630 msgid "is the result of the efforts of many volunteers from all over the world. If you find it useful, please consider donating to support its development." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1641 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1654 msgid "There are active jobs. Are you sure you want to quit?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1644 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1657 msgid "" " is communicating with the device!
\n" " Quitting may cause corruption on the device.
\n" " Are you sure you want to quit?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1648 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1661 msgid "WARNING: Active jobs" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1699 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1712 msgid "will keep running in the system tray. To close it, choose Quit in the context menu of the system tray." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1718 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1731 msgid "Latest version: %s" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1726 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1739 msgid "Update available" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1727 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1740 msgid "%s has been updated to version %s. See the new features. Visit the download page?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1745 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1758 msgid "Use the library located at the specified path." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1747 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1760 msgid "Start minimized to system tray." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1749 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1762 msgid "Log debugging information to console" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1797 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1810 msgid "If you are sure it is not running" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1799 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1812 msgid "Cannot Start " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1800 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1813 msgid "%s is already running." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1803 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1816 msgid "may be running in the system tray, in the" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1805 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1818 msgid "upper right region of the screen." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1807 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1820 msgid "lower right region of the screen." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1810 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1823 msgid "try rebooting your computer." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1812 -#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1832 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1825 +#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1845 msgid "try deleting the file" msgstr "" @@ -5531,7 +5409,7 @@ msgid "WizardPage" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/wizard/finish_ui.py:48 -msgid "

Congratulations!

You have successfully setup calibre. Press the Finish button to apply your settings." +msgid "

Congratulations!

You have successfully setup calibre. Press the %s button to apply your settings." msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/wizard/finish_ui.py:49 @@ -6229,6 +6107,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_honoluluadvertiser.py:18 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_iht.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_indy_star.py:6 +#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_inquirer_net.py:24 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_irish_times.py:12 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_japan_times.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_joelonsoftware.py:15 @@ -6290,6 +6169,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_times_online.py:25 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_tomshardware.py:21 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_twitchfilms.py:22 +#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_uncrate.py:24 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_upi.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_usatoday.py:18 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_usnews.py:21 From 5cfe7571a45c2242a52b8320a4cc2cd3a7b2bfd5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Jun 2009 07:26:35 -0600 Subject: [PATCH 07/19] Fix #2735 (0.6.0b10 Conversion Error from Lit to ePub) --- src/calibre/ebooks/oeb/reader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/reader.py b/src/calibre/ebooks/oeb/reader.py index ab8d9976fd..0caa9533bd 100644 --- a/src/calibre/ebooks/oeb/reader.py +++ b/src/calibre/ebooks/oeb/reader.py @@ -129,6 +129,9 @@ class OEBReader(object): from calibre.ebooks.oeb.transforms.metadata import meta_info_to_oeb_metadata stream = cStringIO.StringIO(etree.tostring(opf)) mi = MetaInformation(OPF(stream)) + if not mi.language: + mi.language = get_lang() + self.oeb.metadata.add('language', mi.language) if not mi.title: mi.title = self.oeb.translate(__('Unknown')) if not mi.authors: @@ -136,8 +139,6 @@ class OEBReader(object): if not mi.book_producer: mi.book_producer = '%(a)s (%(v)s) [http://%(a)s.kovidgoyal.net]'%\ dict(a=__appname__, v=__version__) - if not mi.language: - mi.language = get_lang() meta_info_to_oeb_metadata(mi, self.oeb.metadata, self.logger) bookid = "urn:uuid:%s" % str(uuid.uuid4()) if mi.application_id is None \ else mi.application_id From b5b195b5f2c54e21f7f69d3c3c1af7c59a84ced9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Jun 2009 08:14:29 -0600 Subject: [PATCH 08/19] Improved recipe for the Time magazine --- .../web/feeds/recipes/recipe_time_magazine.py | 194 +++++++++--------- 1 file changed, 99 insertions(+), 95 deletions(-) diff --git a/src/calibre/web/feeds/recipes/recipe_time_magazine.py b/src/calibre/web/feeds/recipes/recipe_time_magazine.py index 4e247027a9..22660410d6 100644 --- a/src/calibre/web/feeds/recipes/recipe_time_magazine.py +++ b/src/calibre/web/feeds/recipes/recipe_time_magazine.py @@ -1,95 +1,99 @@ -#!/usr/bin/env python - -__license__ = 'GPL v3' -__copyright__ = '2008, Darko Miletic ' -''' -time.com -''' - -import re -from calibre.web.feeds.news import BasicNewsRecipe - -class Time(BasicNewsRecipe): - title = u'Time' - __author__ = 'Kovid Goyal' - description = 'Weekly magazine' - encoding = 'utf-8' - no_stylesheets = True - language = _('English') - - remove_tags_before = dict(id="artHd") - remove_tags_after = {'class':"ltCol"} - remove_tags = [ - {'class':['articleTools', 'enlarge', 'search']}, - {'id':['quigoArticle', 'contentTools', 'articleSideBar', 'header', 'navTop']}, - {'target':'_blank'}, - ] - recursions = 1 - match_regexps = [r'/[0-9,]+-(2|3|4|5|6|7|8|9)(,\d+){0,1}.html'] - - - def parse_index(self): - soup = self.index_to_soup('http://www.time.com/time/magazine') - img = soup.find('a', title="View Large Cover", href=True) - if img is not None: - cover_url = 'http://www.time.com'+img['href'] - try: - nsoup = self.index_to_soup(cover_url) - img = nsoup.find('img', src=re.compile('archive/covers')) - if img is not None: - self.cover_url = img['src'] - except: - self.log.exception('Failed to fetch cover') - - - feeds = [] - parent = soup.find(id='tocGuts') - for seched in parent.findAll(attrs={'class':'toc_seched'}): - section = self.tag_to_string(seched).capitalize() - articles = list(self.find_articles(seched)) - feeds.append((section, articles)) - - return feeds - - def find_articles(self, seched): - for a in seched.findNextSiblings('a', href=True, attrs={'class':'toc_hed'}): - yield { - 'title' : self.tag_to_string(a), - 'url' : 'http://www.time.com'+a['href'], - 'date' : '', - 'description' : self.article_description(a) - } - - def article_description(self, a): - ans = [] - while True: - t = a.nextSibling - if t is None: - break - a = t - if getattr(t, 'name', False): - if t.get('class', '') == 'toc_parens' or t.name == 'br': - continue - if t.name in ('div', 'a'): - break - ans.append(self.tag_to_string(t)) - else: - ans.append(unicode(t)) - return u' '.join(ans).replace(u'\xa0', u'').strip() - - def postprocess_html(self, soup, first_page): - div = soup.find(attrs={'class':'artPag'}) - if div is not None: - div.extract() - if not first_page: - for cls in ('photoBkt', 'artHd'): - div = soup.find(attrs={'class':cls}) - if div is not None: - div.extract() - div = soup.find(attrs={'class':'artTxt'}) - if div is not None: - p = div.find('p') - if p is not None: - p.extract() - - return soup +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2008, Kovid Goyal ' +''' +time.com +''' + +import re +from calibre.web.feeds.news import BasicNewsRecipe + +class Time(BasicNewsRecipe): + title = u'Time' + __author__ = 'Kovid Goyal and Sujata Raman' + description = 'Weekly magazine' + encoding = 'utf-8' + no_stylesheets = True + language = _('English') + extra_css = '''.headline {font-size: large;} + .fact { padding-top: 10pt } + h1 {font-family:Arial,Sans-serif} + .byline{font-family:Arial,Sans-serif; font-size:xx-small ;color:blue} + .timestamp{font-family:Arial,Sans-serif; font-size:x-small ;color:gray}''' + remove_tags_before = dict(id="artHd") + remove_tags_after = {'class':"ltCol"} + remove_tags = [ + {'class':['articleTools', 'enlarge', 'search','socialtools','blogtools','moretools','page','nextUp','next','subnav','RSS','line2','first','ybuzz','articlePagination','chiclets','imgcont','createListLink','rlinks','tabsWrap','pagination']}, + {'id':['quigoArticle', 'contentTools', 'articleSideBar', 'header', 'navTop','articleTools','feedmodule','feedmodule3','promos','footer','linksFooter','timeArchive','belt','relatedStories','packages','Features']}, + {'target':'_blank'}, + ] + recursions = 1 + match_regexps = [r'/[0-9,]+-(2|3|4|5|6|7|8|9)(,\d+){0,1}.html'] + + + def parse_index(self): + soup = self.index_to_soup('http://www.time.com/time/magazine') + img = soup.find('a', title="View Large Cover", href=True) + if img is not None: + cover_url = 'http://www.time.com'+img['href'] + try: + nsoup = self.index_to_soup(cover_url) + img = nsoup.find('img', src=re.compile('archive/covers')) + if img is not None: + self.cover_url = img['src'] + except: + self.log.exception('Failed to fetch cover') + + + feeds = [] + parent = soup.find(id='tocGuts') + for seched in parent.findAll(attrs={'class':'toc_seched'}): + section = self.tag_to_string(seched).capitalize() + articles = list(self.find_articles(seched)) + feeds.append((section, articles)) + + return feeds + + def find_articles(self, seched): + for a in seched.findNextSiblings('a', href=True, attrs={'class':'toc_hed'}): + yield { + 'title' : self.tag_to_string(a), + 'url' : 'http://www.time.com'+a['href'], + 'date' : '', + 'description' : self.article_description(a) + } + + def article_description(self, a): + ans = [] + while True: + t = a.nextSibling + if t is None: + break + a = t + if getattr(t, 'name', False): + if t.get('class', '') == 'toc_parens' or t.name == 'br': + continue + if t.name in ('div', 'a'): + break + ans.append(self.tag_to_string(t)) + else: + ans.append(unicode(t)) + return u' '.join(ans).replace(u'\xa0', u'').strip() + + def postprocess_html(self, soup, first_page): + div = soup.find(attrs={'class':'artPag'}) + if div is not None: + div.extract() + if not first_page: + for cls in ('photoBkt', 'artHd'): + div = soup.find(attrs={'class':cls}) + if div is not None: + div.extract() + div = soup.find(attrs={'class':'artTxt'}) + if div is not None: + p = div.find('p') + if p is not None: + p.extract() + + return soup From aca962fd37e0e7cceaa2b6261826afa3318c7a37 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Jul 2009 11:54:56 -0600 Subject: [PATCH 09/19] Set pubdate when setting metadata in MOBI files (needed for periodical indexing) --- src/calibre/ebooks/metadata/mobi.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/mobi.py b/src/calibre/ebooks/metadata/mobi.py index f49a57a7c6..535dddf2a7 100644 --- a/src/calibre/ebooks/metadata/mobi.py +++ b/src/calibre/ebooks/metadata/mobi.py @@ -11,11 +11,14 @@ __docformat__ = 'restructuredtext en' from struct import pack, unpack from cStringIO import StringIO +from datetime import datetime + from calibre.ebooks.mobi import MobiError from calibre.ebooks.mobi.writer import rescale_image, MAX_THUMB_DIMEN from calibre.ebooks.mobi.langcodes import iana2mobi class StreamSlicer(object): + def __init__(self, stream, start=0, stop=None): self._stream = stream self.start = start @@ -84,17 +87,22 @@ class MetadataUpdater(object): flags, = unpack('>I', record0[128:132]) have_exth = self.have_exth = (flags & 0x40) != 0 self.cover_record = self.thumbnail_record = None + self.timestamp = None if not have_exth: return exth_off = unpack('>I', record0[20:24])[0] + 16 + record0.start exth = self.exth = StreamSlicer(stream, exth_off, record0.stop) nitems, = unpack('>I', exth[8:12]) pos = 12 + # Store any EXTH fields not specifiable in GUI for i in xrange(nitems): id, size = unpack('>II', exth[pos:pos + 8]) content = exth[pos + 8: pos + size] pos += size - if id == 201: + + if id == 106: + self.timestamp = content + elif id == 201: rindex, = self.cover_rindex, = unpack('>I', content) self.cover_record = self.record(rindex + image_base) elif id == 202: @@ -134,6 +142,16 @@ class MetadataUpdater(object): if mi.tags: subjects = '; '.join(mi.tags) recs.append((105, subjects.encode(self.codec, 'replace'))) + + if mi.pubdate: + recs.append((106, str(mi.pubdate).encode(self.codec, 'replace'))) + elif mi.timestamp: + recs.append((106, str(mi.timestamp).encode(self.codec, 'replace'))) + elif self.timestamp: + recs.append(106, self.timestamp) + else: + recs.append((106, str(datetime.now()).encode(self.codec, 'replace'))) + if self.cover_record is not None: recs.append((201, pack('>I', self.cover_rindex))) recs.append((203, pack('>I', 0))) From f524685269ec670034d00d3eca68025322183173 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 4 Jul 2009 09:16:47 -0600 Subject: [PATCH 10/19] Fix 2774 --- src/calibre/ebooks/comic/input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/comic/input.py b/src/calibre/ebooks/comic/input.py index bf2aac1162..2eed12de0c 100755 --- a/src/calibre/ebooks/comic/input.py +++ b/src/calibre/ebooks/comic/input.py @@ -283,7 +283,7 @@ class ComicInput(InputFormatPlugin): OptionRecommendation(name='disable_trim', recommended_value=False, help=_('Disable trimming of comic pages. For some comics, ' 'trimming might remove content as well as borders.')), - OptionRecommendation(name='landspace', recommended_value=False, + OptionRecommendation(name='landscape', recommended_value=False, help=_("Don't split landscape images into two portrait images")), OptionRecommendation(name='wide', recommended_value=False, help=_("Keep aspect ratio and scale image using screen height as " From 98fc0ed2faebd2fd80e8589552eb8541da1b5f84 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 08:32:40 -0600 Subject: [PATCH 11/19] New recipes for fastcompany and accountancy age by Darko Miletic --- src/calibre/gui2/images/news/fastcompany.png | Bin 0 -> 5391 bytes src/calibre/web/feeds/recipes/__init__.py | 1 + .../feeds/recipes/recipe_accountancyage.py | 58 ++++++++++++++++++ .../web/feeds/recipes/recipe_fastcompany.py | 54 ++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 src/calibre/gui2/images/news/fastcompany.png create mode 100644 src/calibre/web/feeds/recipes/recipe_accountancyage.py create mode 100644 src/calibre/web/feeds/recipes/recipe_fastcompany.py diff --git a/src/calibre/gui2/images/news/fastcompany.png b/src/calibre/gui2/images/news/fastcompany.png new file mode 100644 index 0000000000000000000000000000000000000000..542b9f17265bc38cbf6e5a7afda9ee5431fbafd2 GIT binary patch literal 5391 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 Date: Sun, 5 Jul 2009 08:38:43 -0600 Subject: [PATCH 12/19] Keep masthead image when generating MOBI periodicals --- src/calibre/ebooks/oeb/transforms/trimmanifest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/ebooks/oeb/transforms/trimmanifest.py b/src/calibre/ebooks/oeb/transforms/trimmanifest.py index b3e9cd58e7..643ce47c4d 100644 --- a/src/calibre/ebooks/oeb/transforms/trimmanifest.py +++ b/src/calibre/ebooks/oeb/transforms/trimmanifest.py @@ -24,6 +24,7 @@ class ManifestTrimmer(object): def __call__(self, oeb, context): oeb.logger.info('Trimming unused files from manifest...') + self.opts = context used = set() for term in oeb.metadata: for item in oeb.metadata[term]: @@ -63,5 +64,8 @@ class ManifestTrimmer(object): unchecked = new for item in oeb.manifest.values(): if item not in used: + if getattr(self.opts, 'mobi_periodical', False) and \ + item.href == 'images/mastheadImage.gif': + continue oeb.logger.info('Trimming %r from manifest' % item.href) oeb.manifest.remove(item) From f45d67f3f0899d0aba461b33cb0370dc938262ce Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 09:44:23 -0600 Subject: [PATCH 13/19] Remove redundant declaration of OPF namespace --- src/calibre/ebooks/oeb/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 1e8aaa8b60..a9827d9150 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -693,7 +693,9 @@ class Metadata(object): def to_opf2(self, parent=None): nsmap = self._opf2_nsmap nsrmap = dict((value, key) for key, value in nsmap.items()) - elem = element(parent, OPF('metadata'), nsmap=nsmap) + nmap = dict(**nsmap) + nmap.pop('opf', '') + elem = element(parent, OPF('metadata'), nsmap=nmap) for term in self.items: for item in self.items[term]: item.to_opf2(elem, nsrmap=nsrmap) From 19a581fe575f7501e568bd36fb69f7cc9038d7eb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 09:47:52 -0600 Subject: [PATCH 14/19] ... --- src/calibre/ebooks/oeb/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index a9827d9150..3b38536e4f 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -693,9 +693,8 @@ class Metadata(object): def to_opf2(self, parent=None): nsmap = self._opf2_nsmap nsrmap = dict((value, key) for key, value in nsmap.items()) - nmap = dict(**nsmap) - nmap.pop('opf', '') - elem = element(parent, OPF('metadata'), nsmap=nmap) + nsmap.pop('opf', '') + elem = element(parent, OPF('metadata'), nsmap=nsmap) for term in self.items: for item in self.items[term]: item.to_opf2(elem, nsrmap=nsrmap) From 0c067c91511be1f607219c33942a1c1774c1c418 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 12:26:44 -0600 Subject: [PATCH 15/19] MOBI Input: Correctly link stylesheet and declare encoding when converting to HTML --- src/calibre/ebooks/mobi/reader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/reader.py b/src/calibre/ebooks/mobi/reader.py index fb01f665c0..8dc8d31150 100644 --- a/src/calibre/ebooks/mobi/reader.py +++ b/src/calibre/ebooks/mobi/reader.py @@ -345,10 +345,13 @@ class MobiReader(object): root.insert(0, head) head.text = '\n\t' link = head.makeelement('link', {'type':'text/css', - 'href':'styles.css'}) + 'href':'styles.css', 'rel':'stylesheet'}) head.insert(0, link) link.tail = '\n\t' title = head.xpath('descendant::title') + m = head.makeelement('meta', {'http-equiv':'Content-Type', + 'content':'text/html; charset=utf-8'}) + head.insert(0, m) if not title: title = head.makeelement('title', {}) title.text = self.book_header.title From 1323f26b83fead514e680dca515bf6cfb5e72438 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 12:27:16 -0600 Subject: [PATCH 16/19] Ebook viewer:Handle invalid bookmarks more gracefully --- src/calibre/gui2/viewer/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index ccf215210c..4182897ee0 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -313,6 +313,8 @@ class EbookViewer(MainWindow, Ui_EbookViewer): self.view.goto_bookmark(m) else: self.pending_bookmark = bm + if spine_index < 0 or spine_index >= len(self.iterator.spine): + spine_index = 0 self.load_path(self.iterator.spine[spine_index]) def toc_clicked(self, index): From c941abc6528a1439f1aec9f2f1dd1a551f5d18b1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 12:56:45 -0600 Subject: [PATCH 17/19] Delete mount dir after eject on linux if it is in /media. Also add eject command to ebook-device --- src/calibre/devices/prs500/cli/main.py | 5 ++++- src/calibre/devices/usbms/device.py | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/calibre/devices/prs500/cli/main.py b/src/calibre/devices/prs500/cli/main.py index 74529c6d58..7603acb98a 100755 --- a/src/calibre/devices/prs500/cli/main.py +++ b/src/calibre/devices/prs500/cli/main.py @@ -180,7 +180,8 @@ def main(): if not cols: # On windows terminal width is unknown cols = 80 - parser = OptionParser(usage="usage: %prog [options] command args\n\ncommand is one of: info, books, df, ls, cp, mkdir, touch, cat, rm\n\n"+ + parser = OptionParser(usage="usage: %prog [options] command args\n\ncommand "+ + "is one of: info, books, df, ls, cp, mkdir, touch, cat, rm, eject\n\n"+ "For help on a particular command: %prog command", version=__appname__+" version: " + __version__) parser.add_option("--log-packets", help="print out packet stream to stdout. "+\ "The numbers in the left column are byte offsets that allow the packet size to be read off easily.", @@ -222,6 +223,8 @@ def main(): for i in range(3): print "%-10s\t%s\t%s\t%s\t%s"%(where[i], human_readable(total[i]), human_readable(total[i]-free[i]), human_readable(free[i]),\ str(0 if total[i]==0 else int(100*(total[i]-free[i])/(total[i]*1.)))+"%") + elif command == 'eject': + dev.eject() elif command == "books": print "Books in main memory:" for book in dev.books(): diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index e1e8f3890c..c4819307a4 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -7,7 +7,7 @@ intended to be subclassed with the relevant parts implemented for a particular device. This class handles device detection. ''' -import os, subprocess, time, re, sys, glob +import os, subprocess, time, re, sys, glob, shutil from itertools import repeat from calibre.devices.interface import DevicePlugin @@ -548,13 +548,23 @@ class Device(DeviceConfig, DevicePlugin): drives = self.find_device_nodes() for drive in drives: if drive: - cmd = ['pumount'] + cmd = ['pumount', '-l'] try: p = subprocess.Popen(cmd + [drive]) except: pass while p.poll() is None: time.sleep(0.1) + if p.returncode == 0: + for x in ('_main_prefix', '_card_a_prefix', '_card_b_prefix'): + x = getattr(self, x, None) + if x is not None: + if x.startswith('/media/') and os.path.exists(x): + try: + shutil.rmtree(x) + except: + pass + def eject(self): if islinux: From 9788269337c3e07eb00be0745ff7427bca3a8ef8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 13:08:28 -0600 Subject: [PATCH 18/19] MOBI Output: Add option to suppress addition of Table of Contents to end of book, since there appear to be lots of people that think doing this is bad, and I am tired of respoding to them. --- src/calibre/ebooks/mobi/output.py | 12 +++++++----- src/calibre/gui2/convert/mobi_output.ui | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/calibre/ebooks/mobi/output.py b/src/calibre/ebooks/mobi/output.py index 84860d3d0f..4c272f75d1 100644 --- a/src/calibre/ebooks/mobi/output.py +++ b/src/calibre/ebooks/mobi/output.py @@ -24,6 +24,10 @@ class MOBIOutput(OutputFormatPlugin): recommended_value=False, level=OptionRecommendation.LOW, help=_('When present, use author sort field as author.') ), + OptionRecommendation(name='no_inline_toc', + recommended_value=False, level=OptionRecommendation.LOW, + help=_('Don\'t add Table of Contents to end of book. Useful if ' + 'the book has its own table of contents.')), OptionRecommendation(name='toc_title', recommended_value=None, help=_('Title for any generated in-line table of contents.') ), @@ -35,8 +39,6 @@ class MOBIOutput(OutputFormatPlugin): recommended_value=False, level=OptionRecommendation.LOW, help=_('Disable compression of the file contents.') ), - - ]) def convert(self, oeb, output_path, input_plugin, opts, log): @@ -49,8 +51,9 @@ class MOBIOutput(OutputFormatPlugin): from calibre.ebooks.oeb.transforms.htmltoc import HTMLTOCAdder from calibre.customize.ui import plugin_for_input_format imagemax = PALM_MAX_IMAGE_SIZE if opts.rescale_images else None - tocadder = HTMLTOCAdder(title=opts.toc_title) - tocadder(oeb, opts) + if not opts.no_inline_toc: + tocadder = HTMLTOCAdder(title=opts.toc_title) + tocadder(oeb, opts) mangler = CaseMangler() mangler(oeb, opts) rasterizer = SVGRasterizer() @@ -58,7 +61,6 @@ class MOBIOutput(OutputFormatPlugin): mobimlizer = MobiMLizer(ignore_tables=opts.linearize_tables) mobimlizer(oeb, opts) write_page_breaks_after_item = not input_plugin is plugin_for_input_format('cbz') - print 111111, write_page_breaks_after_item writer = MobiWriter(opts, imagemax=imagemax, compression=UNCOMPRESSED if opts.dont_compress else PALMDOC, prefer_author_sort=opts.prefer_author_sort, diff --git a/src/calibre/gui2/convert/mobi_output.ui b/src/calibre/gui2/convert/mobi_output.ui index bc1cd45714..8bd205e9dd 100644 --- a/src/calibre/gui2/convert/mobi_output.ui +++ b/src/calibre/gui2/convert/mobi_output.ui @@ -14,7 +14,7 @@ Form - + &Title for Table of Contents: @@ -24,24 +24,24 @@ - + - + Rescale images for &Palm devices - + Use author &sort for author - + Qt::Vertical @@ -54,20 +54,27 @@ - + Disable compression of the file contents - + Generate a periodical rather than a book + + + + Do not add Table of Contents to book + + +
From 6cafdb5cb8cc0471a7ba8357046885d99d09da63 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Jul 2009 13:09:54 -0600 Subject: [PATCH 19/19] ... --- src/calibre/ebooks/oeb/output.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/output.py b/src/calibre/ebooks/oeb/output.py index 2cb513293c..18c20f334d 100644 --- a/src/calibre/ebooks/oeb/output.py +++ b/src/calibre/ebooks/oeb/output.py @@ -28,9 +28,8 @@ class OEBOutput(OutputFormatPlugin): href, root = results.pop(key, [None, None]) if root is not None: raw = etree.tostring(root, pretty_print=True, - encoding='utf-8') + encoding='utf-8', xml_declaration=True) with open(href, 'wb') as f: - f.write('\n') f.write(raw) for item in oeb_book.manifest: