
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
futurismic.com
'''

from calibre.web.feeds.news import BasicNewsRecipe


class Futurismic(BasicNewsRecipe):
    title = 'Futurismic'
    __author__ = 'Darko Miletic'
    description = 'Near-future science fiction and fact since 2001'
    oldest_article = 15
    max_articles_per_feed = 100
    language = 'en'
    encoding = 'utf-8'
    no_stylesheets = True
    use_embedded_content = False
    publication_type = 'blog'
    extra_css = ' body{font-family: Arial,Verdana,sans-serif} '

    conversion_options = {
        'comment': description, 'tags': 'blog, sf', 'publisher': 'Futurismic', 'language': language
    }

    remove_attributes = ['width', 'height']
    keep_only_tags = [dict(attrs={'class': ['post', 'commentlist']})]
    remove_tags = [dict(attrs={'class': ['sociable', 'feedback', 'tagwords']})]
    feeds = [(u'Posts', u'http://feeds2.feedburner.com/futurismic_feed')]

    def preprocess_html(self, soup):
        return self.adeify_images(soup)
