#!/usr/bin/env  python2
__license__ = 'GPL 3'
__copyright__ = 'zotzo'
__docformat__ = 'restructuredtext en'
'''
http://wvhooligan.com/
'''
from calibre.web.feeds.news import BasicNewsRecipe


class wvHooligan(BasicNewsRecipe):
    authors = u'Drew Epperley'
    __author__ = 'rylsfan'
    language = 'en'
    version = 2

    title = u'WV Hooligan'
    publisher = u'Drew Epperley'
    publication_type = 'Blog'
    category = u'Soccer'
    description = u'A look at Major League Soccer (MLS) through the eyes of a MLS writer and fan.'

    cover_url = 'http://wvhooligan.com/wp-content/themes/urbanelements/images/logo3.png'

    oldest_article = 15
    max_articles_per_feed = 150
    use_embedded_content = True
    no_stylesheets = True
    remove_javascript = True
    encoding = 'utf8'

    conversion_options = {
        'comment': description, 'tags': category, 'publisher': publisher, 'language': language
    }

    remove_tags = [
        {'class': 'feedflare'},
        {'class': 'tweetmeme_button'},
    ]

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

    feeds = [
        (u'Stories', u'http://feeds2.feedburner.com/wvhooligan'),
        (u'MLS', u'http://wvhooligan.com/category/mls/feed/'),
        (u'MLS Power Rankings',
         u'http://wvhooligan.com/category/power-rankings/feed/'),
        (u'MLS Expansion',
         u'http://wvhooligan.com/category/mls/expansion-talk/feed/'),
        (u'US National Team',
         u'http://wvhooligan.com/category/us-national-team/feed/'),
        (u'College', u'http://wvhooligan.com/category/college-soccer/feed/'),
    ]

    extra_css = '''
               h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
               h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
               p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
               body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
               '''
