From a36bfaab26851f37ad69779c0b419466bcb283dd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 27 Aug 2009 15:15:31 -0600 Subject: [PATCH] IGN:Add description as comments to downloaded news --- src/calibre/customize/ui.py | 4 ++++ src/calibre/web/feeds/news.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/calibre/customize/ui.py b/src/calibre/customize/ui.py index 22885edf24..0c40e7c8da 100644 --- a/src/calibre/customize/ui.py +++ b/src/calibre/customize/ui.py @@ -351,6 +351,10 @@ def initialize_plugins(): initialize_plugins() +def intialized_plugins(): + for plugin in _initialized_plugins: + yield plugin + def option_parser(): parser = OptionParser(usage=_('''\ %prog options diff --git a/src/calibre/web/feeds/news.py b/src/calibre/web/feeds/news.py index 849a5be1ab..0aa2ac25f8 100644 --- a/src/calibre/web/feeds/news.py +++ b/src/calibre/web/feeds/news.py @@ -878,6 +878,9 @@ class BasicNewsRecipe(Recipe): mi.author_sort = __appname__ mi.publication_type = 'periodical:'+self.publication_type mi.timestamp = datetime.now() + mi.comments = self.description + if not isinstance(mi.comments, unicode): + mi.comments = mi.comments.decode('utf-8', 'replace') mi.pubdate = datetime.now() opf_path = os.path.join(dir, 'index.opf') ncx_path = os.path.join(dir, 'index.ncx')