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

from calibre.web.feeds.news import BasicNewsRecipe


class PeterSchiff(BasicNewsRecipe):
    title = "Peter Schiff's Economic Commentary"
    __author__ = 'Darko Miletic'
    description = 'Economic commentary'
    publisher = 'Euro Pacific capital'
    category = 'news, politics, economy, USA'
    oldest_article = 25
    max_articles_per_feed = 200
    no_stylesheets = True
    encoding = 'utf8'
    use_embedded_content = False
    language = 'en'
    remove_empty_feeds = True
    extra_css             = """
                                body{font-family: Verdana,Times,serif }
                                .field-field-commentary-writer-name{font-weight: bold}
                                .field-items{display: inline}
                            """

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

    keep_only_tags = [
        dict(name='h2', attrs={'id': 'page-title'}
             ), dict(name='div', attrs={'class': 'node'})
    ]
    remove_tags = [
        dict(name=['meta', 'link', 'base', 'iframe', 'embed']), dict(
            attrs={'id': 'text-zoom'})
    ]
    remove_attributes = ['track', 'linktype', 'lang']

    feeds = [
        (u'Articles', u'http://feeds.feedburner.com/PeterSchiffsEconomicCommentary')]
