From 583685933d00d9f8d58f684f3315164d20a56f4e Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 8 May 2011 18:04:23 +0200 Subject: [PATCH 01/13] Fixed by ensuring the dates are in local time instead of UTC --- src/calibre/gui2/metadata/basic_widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/metadata/basic_widgets.py b/src/calibre/gui2/metadata/basic_widgets.py index 8858f9c986..d662256def 100644 --- a/src/calibre/gui2/metadata/basic_widgets.py +++ b/src/calibre/gui2/metadata/basic_widgets.py @@ -1126,7 +1126,7 @@ class DateEdit(QDateEdit): # {{{ @dynamic_property def current_val(self): def fget(self): - return qt_to_dt(self.date()) + return qt_to_dt(self.date(), as_utc=False) def fset(self, val): if val is None: val = UNDEFINED_DATE From cd6f43c13fd705a9f9a8f1689749f18bb05de59b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 8 May 2011 17:06:14 -0600 Subject: [PATCH 02/13] Fix #779560 (iPad2 device ID not supported by apple driver) --- src/calibre/devices/apple/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index cd0bbe2ace..922afc4338 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -205,7 +205,7 @@ class ITUNES(DriverBase): # 0x129a iPad # 0x12a2 iPad2 VENDOR_ID = [0x05ac] - PRODUCT_ID = [0x1292,0x1293,0x1294,0x1297,0x1299,0x129a,0x12a2] + PRODUCT_ID = [0x1292,0x1293,0x1294,0x1297,0x1299,0x129a,0x129f,0x12a2] BCD = [0x01] # Plugboard ID From a558cd0d2a5f88fe8a0e0c84896857a790c7ec8e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 8 May 2011 17:37:46 -0600 Subject: [PATCH 03/13] Ignore 'Unknown' author when downloading metadata. Fixes #779348 (metadata fails on unknown author) --- src/calibre/ebooks/metadata/sources/amazon.py | 2 +- src/calibre/ebooks/metadata/sources/base.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 8483698e28..31d815af63 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -338,7 +338,7 @@ class Amazon(Source): q['field-author'] = ' '.join(author_tokens) if not ('field-keywords' in q or 'field-isbn' in q or - ('field-title' in q and 'field-author' in q)): + ('field-title' in q)): # Insufficient metadata to make an identify query return None diff --git a/src/calibre/ebooks/metadata/sources/base.py b/src/calibre/ebooks/metadata/sources/base.py index e74e4f5042..c20cb1db83 100644 --- a/src/calibre/ebooks/metadata/sources/base.py +++ b/src/calibre/ebooks/metadata/sources/base.py @@ -291,10 +291,10 @@ class Source(Plugin): parts = parts[1:] + parts[:1] for tok in parts: tok = remove_pat.sub('', tok).strip() - if len(tok) > 2 and tok.lower() not in ('von', ): + if len(tok) > 2 and tok.lower() not in ('von', 'van', + _('Unknown').lower()): yield tok - def get_title_tokens(self, title, strip_joiners=True, strip_subtitle=False): ''' Take a title and return a list of tokens useful for an AND search query. From fce83cea050d2af17fa5f357e6cf52ad4d989391 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Mon, 9 May 2011 08:05:21 +0100 Subject: [PATCH 04/13] Visual improvements on the alternate metadata dialogs. 1) Use a pushbutton instead of a toolbutton for config metadata download in Alt1 and Alt2 2) Add a touch of space between the left and right borders of the dialog and the buttons. --- src/calibre/gui2/metadata/single.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/calibre/gui2/metadata/single.py b/src/calibre/gui2/metadata/single.py index 84f0405fc6..6b9d786951 100644 --- a/src/calibre/gui2/metadata/single.py +++ b/src/calibre/gui2/metadata/single.py @@ -31,6 +31,7 @@ class MetadataSingleDialogBase(ResizableDialog): view_format = pyqtSignal(object, object) cc_two_column = tweaks['metadata_single_use_2_cols_for_custom_fields'] one_line_comments_toolbar = False + use_toolbutton_for_config_metadata = True def __init__(self, db, parent=None): self.db = db @@ -71,7 +72,9 @@ class MetadataSingleDialogBase(ResizableDialog): self.l.addWidget(self.scroll_area) ll = self.button_box_layout = QHBoxLayout() self.l.addLayout(ll) + ll.addSpacing(10) ll.addWidget(self.button_box) + ll.addSpacing(10) self.setWindowIcon(QIcon(I('edit_input.png'))) self.setWindowTitle(_('Edit Metadata')) @@ -191,8 +194,12 @@ class MetadataSingleDialogBase(ResizableDialog): font.setBold(True) self.fetch_metadata_button.setFont(font) - self.config_metadata_button = QToolButton(self) - self.config_metadata_button.setIcon(QIcon(I('config.png'))) + if self.use_toolbutton_for_config_metadata: + self.config_metadata_button = QToolButton(self) + self.config_metadata_button.setIcon(QIcon(I('config.png'))) + else: + self.config_metadata_button = QPushButton(self) + self.config_metadata_button.setText(_('Configure metadata downloading')) self.config_metadata_button.clicked.connect(self.configure_metadata) self.config_metadata_button.setToolTip( _('Change how calibre downloads metadata')) @@ -614,6 +621,7 @@ class MetadataSingleDialogAlt1(MetadataSingleDialogBase): # {{{ cc_two_column = False one_line_comments_toolbar = True + use_toolbutton_for_config_metadata = False on_drag_enter = pyqtSignal() @@ -649,10 +657,8 @@ class MetadataSingleDialogAlt1(MetadataSingleDialogBase): # {{{ self.tabs[0].l.addWidget(gb, 0, 0, 1, 1) gb.setLayout(tl) - self.button_box_layout.insertWidget(0, self.fetch_metadata_button) - self.config_metadata_button.setToolButtonStyle(Qt.ToolButtonTextOnly) - self.config_metadata_button.setText(_('Configure metadata downloading')) - self.button_box_layout.insertWidget(1, self.config_metadata_button) + self.button_box_layout.insertWidget(1, self.fetch_metadata_button) + self.button_box_layout.insertWidget(2, self.config_metadata_button) sto(self.button_box, self.fetch_metadata_button) sto(self.fetch_metadata_button, self.config_metadata_button) sto(self.config_metadata_button, self.title) @@ -767,6 +773,7 @@ class MetadataSingleDialogAlt2(MetadataSingleDialogBase): # {{{ cc_two_column = False one_line_comments_toolbar = True + use_toolbutton_for_config_metadata = False def do_layout(self): self.central_widget.clear() @@ -785,10 +792,8 @@ class MetadataSingleDialogAlt2(MetadataSingleDialogBase): # {{{ l.addWidget(gb, 0, 0, 1, 1) gb.setLayout(tl) - self.button_box_layout.insertWidget(0, self.fetch_metadata_button) - self.config_metadata_button.setToolButtonStyle(Qt.ToolButtonTextOnly) - self.config_metadata_button.setText(_('Configure metadata downloading')) - self.button_box_layout.insertWidget(1, self.config_metadata_button) + self.button_box_layout.insertWidget(1, self.fetch_metadata_button) + self.button_box_layout.insertWidget(2, self.config_metadata_button) sto(self.button_box, self.fetch_metadata_button) sto(self.fetch_metadata_button, self.config_metadata_button) sto(self.config_metadata_button, self.title) From 518134c195a49c7aef3789f1fd6413fadf32df63 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Mon, 9 May 2011 11:03:13 +0100 Subject: [PATCH 05/13] ... --- src/calibre/gui2/metadata/single.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/metadata/single.py b/src/calibre/gui2/metadata/single.py index 6b9d786951..5c4e241bba 100644 --- a/src/calibre/gui2/metadata/single.py +++ b/src/calibre/gui2/metadata/single.py @@ -199,7 +199,8 @@ class MetadataSingleDialogBase(ResizableDialog): self.config_metadata_button.setIcon(QIcon(I('config.png'))) else: self.config_metadata_button = QPushButton(self) - self.config_metadata_button.setText(_('Configure metadata downloading')) + self.config_metadata_button.setText(_('Configure download metadata')) + self.config_metadata_button.setIcon(QIcon(I('config.png'))) self.config_metadata_button.clicked.connect(self.configure_metadata) self.config_metadata_button.setToolTip( _('Change how calibre downloads metadata')) From d995b59ce5b523f713f93d1ffc1960937ddec1d6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 9 May 2011 08:42:55 -0600 Subject: [PATCH 06/13] Updated Telepolis --- recipes/telepolis.recipe | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/recipes/telepolis.recipe b/recipes/telepolis.recipe index 8109e3e39a..3611ebc642 100644 --- a/recipes/telepolis.recipe +++ b/recipes/telepolis.recipe @@ -1,17 +1,12 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL v3' -__copyright__ = '2009, Gerhard Aigner ' - - -import re from calibre.web.feeds.news import BasicNewsRecipe class TelepolisNews(BasicNewsRecipe): title = u'Telepolis (News+Artikel)' - __author__ = 'Gerhard Aigner' + __author__ = 'syntaxis' publisher = 'Heise Zeitschriften Verlag GmbH & Co KG' - description = 'News from telepolis' + description = 'News from Telepolis' category = 'news' oldest_article = 7 max_articles_per_feed = 100 @@ -20,14 +15,19 @@ class TelepolisNews(BasicNewsRecipe): encoding = "utf-8" language = 'de' - use_embedded_content =False + remove_empty_feeds = True - preprocess_regexps = [(re.compile(r']*>', re.DOTALL|re.IGNORECASE), lambda match: ''), - (re.compile(r'', re.DOTALL|re.IGNORECASE), lambda match: ''),] - keep_only_tags = [dict(name = 'td',attrs={'class':'bloghead'}),dict(name = 'td',attrs={'class':'blogfliess'})] - remove_tags = [dict(name='img'), dict(name='td',attrs={'class':'blogbottom'}), dict(name='td',attrs={'class':'forum'})] + + keep_only_tags = [dict(name = 'div',attrs={'class':'head'}),dict(name = 'div',attrs={'class':'leftbox'}),dict(name='td',attrs={'class':'strict'})] + remove_tags = [ dict(name='td',attrs={'class':'blogbottom'}), + dict(name='div',attrs={'class':'forum'}), dict(name='div',attrs={'class':'social'}),dict(name='div',attrs={'class':'blog-letter p-news'}), + dict(name='div',attrs={'class':'blog-sub'}),dict(name='div',attrs={'class':'version-div'}),dict(name='div',attrs={'id':'breadcrumb'}) + ,dict(attrs={'class':'tp-url'}),dict(attrs={'class':'blog-name entry_'}) ] + + remove_tags_after = [dict(name='span', attrs={'class':['breadcrumb']})] + feeds = [(u'News', u'http://www.heise.de/tp/news-atom.xml')] @@ -39,15 +39,8 @@ class TelepolisNews(BasicNewsRecipe): html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"' - def get_article_url(self, article): - '''if the linked article is of kind artikel don't take it''' - if (article.link.count('artikel') > 1) : - return None - return article.link def preprocess_html(self, soup): mtag = '' soup.head.insert(0,mtag) return soup - - From 6610a6ae4abe3ff9ff37e4fce03885153cd207f6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 9 May 2011 09:03:50 -0600 Subject: [PATCH 07/13] Add Ziua Veche by Silviu Cotoara --- recipes/icons/ziuaveche.png | Bin 0 -> 554 bytes recipes/ziuaveche.recipe | 53 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 recipes/icons/ziuaveche.png create mode 100644 recipes/ziuaveche.recipe diff --git a/recipes/icons/ziuaveche.png b/recipes/icons/ziuaveche.png new file mode 100644 index 0000000000000000000000000000000000000000..91152b01eebb841025ddad4c88c68610d07f75fe GIT binary patch literal 554 zcmV+_0@eMAP) zUy?q%E32N!Yir2O&m({3DstDa0i{WIWDKG_$h1D$1We!>`rF$;BA8fQ1k4!t s>?sJqzW*?M6Vd1!`R8T+2Mhpz0Py&o=d{A2MF0Q*07*qoM6N<$g5NItGynhq literal 0 HcmV?d00001 diff --git a/recipes/ziuaveche.recipe b/recipes/ziuaveche.recipe new file mode 100644 index 0000000000..61df768e0a --- /dev/null +++ b/recipes/ziuaveche.recipe @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = u'2011, Silviu Cotoar\u0103' +''' +ziuaveche.ro +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class ZiuaVeche(BasicNewsRecipe): + title = u'Ziua Veche' + __author__ = u'Silviu Cotoar\u0103' + description = 'Cotidian online' + publisher = 'Ziua Veche' + oldest_article = 5 + language = 'ro' + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + category = 'Ziare,Cotidiane,Stiri' + encoding = 'utf-8' + cover_url = 'http://www.ziuaveche.ro/wp-content/themes/tema/images/zv-logo-alb-old.png' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + } + + + keep_only_tags = [ + dict(name='div', attrs={'id':'singlePost'}) + + ] + + remove_tags = [ + dict(name='div', attrs={'id':'LikePluginPagelet'}) + + ] + + remove_tags_after = [ + dict(name='div', attrs={'id':'LikePluginPagelet'}) + ] + + feeds = [ + (u'Feeds', u'http://www.ziuaveche.ro/feed/rss') + ] + + def preprocess_html(self, soup): + return self.adeify_images(soup) From 85e1100db35f9ddfaffcec619b67e6bd272c749b Mon Sep 17 00:00:00 2001 From: GRiker Date: Mon, 9 May 2011 17:44:33 -0600 Subject: [PATCH 08/13] Added support for custom icons in MessageBox --- src/calibre/gui2/dialogs/message_box.py | 27 +++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/calibre/gui2/dialogs/message_box.py b/src/calibre/gui2/dialogs/message_box.py index f9354a0cfc..fdec19dc69 100644 --- a/src/calibre/gui2/dialogs/message_box.py +++ b/src/calibre/gui2/dialogs/message_box.py @@ -19,17 +19,23 @@ class MessageBox(QDialog, Ui_Dialog): # {{{ INFO = 2 QUESTION = 3 - def __init__(self, type_, title, msg, det_msg='', show_copy_button=True, - parent=None): + def __init__(self, type_, title, msg, + det_msg='', + q_icon=None, + show_copy_button=True, + parent=None): QDialog.__init__(self, parent) - icon = { - self.ERROR : 'error', - self.WARNING: 'warning', - self.INFO: 'information', - self.QUESTION: 'question', - }[type_] - icon = 'dialog_%s.png'%icon - self.icon = QIcon(I(icon)) + if q_icon is None: + icon = { + self.ERROR : 'error', + self.WARNING: 'warning', + self.INFO: 'information', + self.QUESTION: 'question', + }[type_] + icon = 'dialog_%s.png'%icon + self.icon = QIcon(I(icon)) + else: + self.icon = q_icon self.setupUi(self) self.setWindowTitle(title) @@ -44,7 +50,6 @@ class MessageBox(QDialog, Ui_Dialog): # {{{ self.bb.ActionRole) self.ctc_button.clicked.connect(self.copy_to_clipboard) - self.show_det_msg = _('Show &details') self.hide_det_msg = _('Hide &details') self.det_msg_toggle = self.bb.addButton(self.show_det_msg, self.bb.ActionRole) From c11164f9820faef3a9eb235033e51daf7c0a6e60 Mon Sep 17 00:00:00 2001 From: GRiker Date: Mon, 9 May 2011 17:58:16 -0600 Subject: [PATCH 09/13] Added Product IDs for iPad2 (Wifi) and iPad2 (CDMA) --- src/calibre/devices/apple/driver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index 922afc4338..b7d5ac36d2 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -203,9 +203,11 @@ class ITUNES(DriverBase): # 0x1294 iPhone 3GS # 0x1297 iPhone 4 # 0x129a iPad - # 0x12a2 iPad2 + # 0x129f iPad2 (WiFi) + # 0x12a2 iPad2 (GSM) + # 0x12a3 iPad2 (CDMA) VENDOR_ID = [0x05ac] - PRODUCT_ID = [0x1292,0x1293,0x1294,0x1297,0x1299,0x129a,0x129f,0x12a2] + PRODUCT_ID = [0x1292,0x1293,0x1294,0x1297,0x1299,0x129a,0x129f,0x12a2,0x12a3] BCD = [0x01] # Plugboard ID From 778eaffa972123db37a2bba952442e94c07c296c Mon Sep 17 00:00:00 2001 From: John Schember Date: Mon, 9 May 2011 22:11:23 -0400 Subject: [PATCH 10/13] HTMLZ: Fix covers again... --- src/calibre/ebooks/htmlz/input.py | 16 ++++++++-------- src/calibre/ebooks/metadata/extz.py | 20 ++++++++------------ 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/calibre/ebooks/htmlz/input.py b/src/calibre/ebooks/htmlz/input.py index d083fcc4ab..743d8e53eb 100644 --- a/src/calibre/ebooks/htmlz/input.py +++ b/src/calibre/ebooks/htmlz/input.py @@ -7,7 +7,6 @@ __copyright__ = '2011, John Schember ' __docformat__ = 'restructuredtext en' import os -import posixpath from calibre import guess_type, walk from calibre.customize.conversion import InputFormatPlugin @@ -74,22 +73,23 @@ class HTMLZInput(InputFormatPlugin): meta_info_to_oeb_metadata(mi, oeb.metadata, log) # Get the cover path from the OPF. - cover_href = None + cover_path = None opf = None for x in walk('.'): if os.path.splitext(x)[1].lower() in ('.opf'): opf = x break if opf: - opf = OPF(opf) - cover_href = posixpath.relpath(opf.cover, os.path.dirname(stream.name)) + opf = OPF(opf, basedir=os.getcwd()) + cover_path = opf.raster_cover # Set the cover. - if cover_href: + if cover_path: cdata = None - with open(cover_href, 'rb') as cf: + with open(os.path.join(os.getcwd(), cover_path), 'rb') as cf: cdata = cf.read() - id, href = oeb.manifest.generate('cover', cover_href) - oeb.manifest.add(id, href, guess_type(cover_href)[0], data=cdata) + cover_name = os.path.basename(cover_path) + id, href = oeb.manifest.generate('cover', cover_name) + oeb.manifest.add(id, href, guess_type(cover_name)[0], data=cdata) oeb.guide.add('cover', 'Cover', href) return oeb diff --git a/src/calibre/ebooks/metadata/extz.py b/src/calibre/ebooks/metadata/extz.py index 021450fca5..f3725027a9 100644 --- a/src/calibre/ebooks/metadata/extz.py +++ b/src/calibre/ebooks/metadata/extz.py @@ -8,12 +8,11 @@ Read meta information from extZ (TXTZ, HTMLZ...) files. ''' import os -import posixpath from cStringIO import StringIO from calibre.ebooks.metadata import MetaInformation -from calibre.ebooks.metadata.opf2 import OPF, metadata_to_opf +from calibre.ebooks.metadata.opf2 import OPF from calibre.ptempfile import PersistentTemporaryFile from calibre.utils.zipfile import ZipFile, safe_replace @@ -31,9 +30,9 @@ def get_metadata(stream, extract_cover=True): opf = OPF(opf_stream) mi = opf.to_book_metadata() if extract_cover: - cover_href = posixpath.relpath(opf.cover, os.path.dirname(stream.name)) + cover_href = opf.raster_cover if cover_href: - mi.cover_data = ('jpg', zf.read(cover_href)) + mi.cover_data = (os.path.splitext(cover_href)[1], zf.read(cover_href)) except: return mi return mi @@ -59,18 +58,15 @@ def set_metadata(stream, mi): except: pass if new_cdata: - cover = opf.cover - if not cover: - cover = 'cover.jpg' - cpath = posixpath.join(posixpath.dirname(opf_path), cover) + cpath = opf.raster_cover + if not cpath: + cpath = 'cover.jpg' new_cover = _write_new_cover(new_cdata, cpath) replacements[cpath] = open(new_cover.name, 'rb') - mi.cover = cover + mi.cover = cpath # Update the metadata. - old_mi = opf.to_book_metadata() - old_mi.smart_update(mi) - opf.smart_update(metadata_to_opf(old_mi), replace_metadata=True) + opf.smart_update(mi, replace_metadata=True) newopf = StringIO(opf.render()) safe_replace(stream, opf_path, newopf, extra_replacements=replacements, add_missing=True) From 2e94faa700e44cf8abb02fdbd40920cc3484599c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 10 May 2011 08:37:27 -0600 Subject: [PATCH 11/13] Welt der Physik by schuster --- recipes/welt_der_physik.recipe | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 recipes/welt_der_physik.recipe diff --git a/recipes/welt_der_physik.recipe b/recipes/welt_der_physik.recipe new file mode 100644 index 0000000000..b3ce9cce1b --- /dev/null +++ b/recipes/welt_der_physik.recipe @@ -0,0 +1,20 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1303841067(BasicNewsRecipe): + + title = u'Welt der Physik' + __author__ = 'schuster' + remove_tags_befor = [dict(name='div', attrs={'class':'inhalt_bild_text_printonly'})] + remove_tags_after = [dict(name='span', attrs={'class':'clearinhalt_bild'})] + remove_tags = [dict(attrs={'class':['invisible', 'searchfld', 'searchbtn', 'topnavi', 'topsearch']}), + dict(id=['naservice', 'phservicemenu', '',]), + dict(name=['naservice'])] + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + language = 'de' + remove_javascript = True + + + feeds = [(u'Nachrichten und Neuigkeiten', u'http://www.weltderphysik.de/rss/alles.xml')] From 839c2e909a0f53cb43b60022c4a76a6f57b848c9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 10 May 2011 08:46:57 -0600 Subject: [PATCH 12/13] Replica Vedetelor by Silviu Cotoara --- recipes/icons/replicavedetelor.png | Bin 0 -> 709 bytes recipes/replicavedetelor.recipe | 53 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 recipes/icons/replicavedetelor.png create mode 100644 recipes/replicavedetelor.recipe diff --git a/recipes/icons/replicavedetelor.png b/recipes/icons/replicavedetelor.png new file mode 100644 index 0000000000000000000000000000000000000000..57ba42c64ca752ecd07d720f292f7adf44e92997 GIT binary patch literal 709 zcmWlWQAiqb9LF!Z2MMD|wvFX5;u;0k!;n1;8P&|KFjwY|brWgsIHH+BNQ6iXxtHQ# zO|B7k*fN*HnS&uc#1T^tqi|+*i>RAWyU8Zb29qA*&)D_w`~CR7e7~O`-|0TngX*dq zRS*PKcR$pdrF-RaWR=oxZmk)Bpo+OZqoqrd>5L%eixz?uPQ_xW2)3i;yZ|nWz>fpB z2C>tj4c_5rfnClfd7aq>VjfK=9{t3D5hW-Hni&?Luw#k_UL82%U?RkA^YmI85OP%y z3EtrNIK`%T#765d3YUCrFulTB#+mp=T8>iufuNj-f*u$TaL8S&#ZH2M0JycGq@cgd zBGVaO$cZj5BPST!!i-p>ZFQ=B5Y%{?hr7+WRNYN@=7~x zw0p|uWyC}RzZJL!^mQe zr;>uv&jAbu>ogsV8=Xviof9Qglp=j0t--B zp!WPBA&FeKzQb~T?)mWjO8Ld;``M-5&(rVLb_dmw_Qk|8wK~`_`}Jz`hq2`vi-Pd` zPD`cmZ&i`GxizqtYS@pyXbqx?Km&>fUNfsZ4T+os`LVOvA6VKyqIX9US@iL*z{)`y zIi{aQ3x$=fY+h5>Xj3fMma(v3tQ*?QrkJ*CjV+~3WvH&OY!zgd1lq4qG`7vxtA8p! zs=mA(Tg)`IV2Ae6C#`1-;S(-OV literal 0 HcmV?d00001 diff --git a/recipes/replicavedetelor.recipe b/recipes/replicavedetelor.recipe new file mode 100644 index 0000000000..b6f1a51d67 --- /dev/null +++ b/recipes/replicavedetelor.recipe @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = u'2011, ' +''' +replicavedetelor.ro +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class ReplicaVedetelor(BasicNewsRecipe): + title = u'Replica Vedetelor' + __author__ = u'Silviu Cotoara' + description = u'Ofer\u0103 vedetelor dreptul la replic\u0103' + publisher = 'Replica Vedetelor' + oldest_article = 5 + language = 'ro' + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + category = 'Ziare,Reviste,Vedete' + encoding = 'utf-8' + cover_url = 'http://www.webart-software.eu/_pics/lucrari_referinta/medium/84/1-Replica-Vedetelor.jpg' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + } + + keep_only_tags = [ + dict(name='div', attrs={'id':'zona-continut'}) + ] + + remove_tags = [ + dict(name='ul', attrs={'id':['lista-imagini']}) + , dict(name='form', attrs={'id':['f-trimite-unui-prieten']}) + + ] + + remove_tags_after = [ + dict(name='form', attrs={'id':['f-trimite-unui-prieten']}) + ] + + feeds = [ + (u'Feeds', u'http://www.replicavedetelor.ro/feed') + ] + + def preprocess_html(self, soup): + return self.adeify_images(soup) + From a325f9e8d6e1b0e6363823739b778fa611e393ba Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 10 May 2011 08:49:55 -0600 Subject: [PATCH 13/13] Fix #780459 (Kobo not recognized) --- src/calibre/devices/kobo/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 3a0254ef20..f5c9a74733 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -38,7 +38,7 @@ class KOBO(USBMS): VENDOR_ID = [0x2237] PRODUCT_ID = [0x4161] - BCD = [0x0110] + BCD = [0x0110, 0x0323] VENDOR_NAME = ['KOBO_INC', 'KOBO'] WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['.KOBOEREADER', 'EREADER']