diff --git a/recipes/den_of_geek.recipe b/recipes/den_of_geek.recipe new file mode 100644 index 0000000000..7f44bcb259 --- /dev/null +++ b/recipes/den_of_geek.recipe @@ -0,0 +1,21 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1316944753(BasicNewsRecipe): + title = u'Den of Geek' + __author__ = 'Jaded' + language = 'en' + description = 'From science fiction enthusiasts through to gaming fanatics, Den of Geek has become the one-stop UK website for people genuinely passionate about their entertainment media. Den of Geek covers popular culture but always with an edgy, UK centric slant that sets it apart from the crowd.' + category = 'Movies, TV, Games, Comics, Cult, News, Reviews' + language = 'en' + + oldest_article = 7 + max_articles_per_feed = 100 + auto_cleanup = True + + no_stylesheets = True + use_embedded_content = True + publication_type = 'newsportal' + masthead_url ='http://www.denofgeek.com/siteimage/scale/0/0/logo.gif' + cover_url ='http://a5.sphotos.ak.fbcdn.net/hphotos-ak-snc6/166479_180131695357862_139191826118516_354818_4993703_n.jpg' + + feeds = [(u'Movies', u'http://www.denofgeek.com/movies/rss/'), (u'TV', u'http://www.denofgeek.com/television/rss/'), (u'Comics & Books', u'http://www.denofgeek.com/comics/rss/'), (u'Games', u'http://www.denofgeek.com/games/rss/'), (u'DVD/Blu-ray', u'http://www.denofgeek.com/Reviews/rss/')] diff --git a/recipes/icons/den_of_geek.png b/recipes/icons/den_of_geek.png new file mode 100644 index 0000000000..a3e285b540 Binary files /dev/null and b/recipes/icons/den_of_geek.png differ diff --git a/src/calibre/ebooks/metadata/worker.py b/src/calibre/ebooks/metadata/worker.py index cab582a264..660240571b 100644 --- a/src/calibre/ebooks/metadata/worker.py +++ b/src/calibre/ebooks/metadata/worker.py @@ -249,6 +249,7 @@ class SaveWorker(Thread): recs[pref.name] = getattr(self.opts, pref.name) plugboards = self.db.prefs.get('plugboards', {}) + template_functions = self.db.prefs.get('user_template_functions', []) for i, task in enumerate(tasks): tids = [x[-1] for x in task] @@ -260,7 +261,7 @@ class SaveWorker(Thread): job = ParallelJob('save_book', 'Save books (%d of %d)'%(i, len(tasks)), lambda x,y:x, - args=[tids, dpath, plugboards, self.path, recs]) + args=[tids, dpath, plugboards, template_functions, self.path, recs]) jobs.add(job) server.add_job(job) @@ -312,9 +313,12 @@ class SaveWorker(Thread): break -def save_book(ids, dpath, plugboards, path, recs, notification=lambda x,y:x): +def save_book(ids, dpath, plugboards, template_functions, path, recs, + notification=lambda x,y:x): from calibre.library.save_to_disk import config, save_serialized_to_disk from calibre.customize.ui import apply_null_metadata + from calibre.utils.formatter_functions import load_user_template_functions + load_user_template_functions(template_functions) opts = config().parse() for name in recs: setattr(opts, name, recs[name])