George R. R. Martin's Blog by DM. Fixes #787275 (New recipe for Grmm blog)

This commit is contained in:
Kovid Goyal 2011-05-23 18:33:07 -06:00
commit 044446b6c2
3 changed files with 82 additions and 4 deletions

36
recipes/grrm.recipe Normal file
View File

@ -0,0 +1,36 @@
__license__ = 'GPL v3'
__copyright__ = '2011, Darko Miletic <darko.miletic at gmail.com>'
'''
grrm.livejournal.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class NotABlog(BasicNewsRecipe):
title = 'Not A Blog - George R.R. Martin'
__author__ = 'Darko Miletic'
description = 'George R.R. Martin'
oldest_article = 15
max_articles_per_feed = 100
language = 'en'
encoding = 'utf-8'
no_stylesheets = True
use_embedded_content = True
publication_type = 'blog'
conversion_options = {
'comment' : description
, 'tags' : 'sf, fantasy, game of thrones'
, 'publisher': 'George R.R. Martin'
, 'language' : language
}
feeds = [(u'Posts', u'http://grrm.livejournal.com/data/rss')]
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
return self.adeify_images(soup)

View File

@ -208,8 +208,10 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
for i in range(1, self.column_color_count):
r('column_color_name_'+str(i), db.prefs, choices=choices)
r('column_color_template_'+str(i), db.prefs)
temp = getattr(self, 'opt_column_color_template_'+str(i))
temp.set_tags(tags)
tpl = getattr(self, 'opt_column_color_template_'+str(i))
tpl.set_tags(tags)
toolbutton = getattr(self, 'opt_column_color_wizard_'+str(i))
toolbutton.clicked.connect(tpl.tag_wizard)
all_colors = [unicode(s) for s in list(QColor.colorNames())]
self.colors_box.setText(', '.join(all_colors))

View File

@ -436,30 +436,70 @@ then the tags will be displayed each on their own line.</string>
<item row="2" column="1">
<widget class="TemplateLineEditor" name="opt_column_color_template_1"/>
</item>
<item row="2" column="2">
<widget class="QToolButton" name="opt_column_color_wizard_1">
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QComboBox" name="opt_column_color_name_2"/>
</item>
<item row="3" column="1">
<widget class="TemplateLineEditor" name="opt_column_color_template_2"/>
</item>
<item row="3" column="2">
<widget class="QToolButton" name="opt_column_color_wizard_2">
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QComboBox" name="opt_column_color_name_3"/>
</item>
<item row="4" column="1">
<widget class="TemplateLineEditor" name="opt_column_color_template_3"/>
</item>
<item row="4" column="2">
<widget class="QToolButton" name="opt_column_color_wizard_3">
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QComboBox" name="opt_column_color_name_4"/>
</item>
<item row="5" column="1">
<widget class="TemplateLineEditor" name="opt_column_color_template_4"/>
</item>
<item row="5" column="2">
<widget class="QToolButton" name="opt_column_color_wizard_4">
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QComboBox" name="opt_column_color_name_5"/>
</item>
<item row="6" column="1">
<widget class="TemplateLineEditor" name="opt_column_color_template_5"/>
</item>
<item row="6" column="2">
<widget class="QToolButton" name="opt_column_color_wizard_5">
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property>
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="label">
<property name="text">
@ -467,7 +507,7 @@ then the tags will be displayed each on their own line.</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<item row="0" column="0" colspan="3">
<widget class="QScrollArea" name="scrollArea">
<property name="minimumSize">
<size>
@ -505,7 +545,7 @@ then the tags will be displayed each on their own line.</string>
</widget>
</widget>
</item>
<item row="21" column="0" colspan="2">
<item row="21" column="0" colspan="3">
<widget class="QScrollArea" name="scrollArea_2">
<property name="maximumSize">
<size>