#!/usr/bin/env python
__license__ = 'GPL v3'
__author__ = 'Lorenzo Vigentini'
__copyright__ = '2009, Lorenzo Vigentini <l.vigentini at gmail.com>'
__version__ = 'v1.01'
__date__ = '14, January 2010'

'''
http://media.digitalartsonline.co.uk/
'''

from calibre.web.feeds.news import BasicNewsRecipe

temp_files = []
articles_are_obfuscated = True


class digiArts(BasicNewsRecipe):
    __author__ = 'Lorenzo Vigentini'
    description = ('Digital Arts - comprehensive coverage of the art of '
                   'graphic design, 3D, animation, video, effects, web and '
                   'interactive design, in print and online.')  # noqa
    cover_url = 'http://media.digitalartsonline.co.uk/graphics/logo_digital_arts.gif'

    title = 'Digital Arts Magazine  '
    publisher = 'IDG Communication'
    category = ('Multimedia, photo, video, computing, product reviews, '
                'editing, cameras, production')

    language = 'en'
    encoding = 'cp1252'
    timefmt = '[%a, %d %b, %Y]'

    oldest_article = 30
    max_articles_per_feed = 100
    use_embedded_content = False
    recursion = 10

    remove_javascript = True
    no_stylesheets = True
    auto_cleanup = False

    keep_only_tags = [
        dict(name='h1', attrs={'itemprop': 'headline'}),
        dict(name='span', attrs={'itemprop': 'author'}),
        dict(name='section', attrs={'class': 'articleBody'}),
    ]

    # Feed are found here: http://www.digitalartsonline.co.uk/rss/
    feeds = [
        ('Latest News Articles',
         'http://www.digitalartsonline.co.uk/rss/feeds/digitalarts-news.xml'),
        ('Latest Tutorials',
         'http://www.digitalartsonline.co.uk/rss/feeds/digitalarts-tutorials.xml'),
        ('Latest Reviews',
         'http://www.digitalartsonline.co.uk/rss/feeds/digitalarts-reviews.xml'),
        ('Latest Features',
         'http://www.digitalartsonline.co.uk/rss/feeds/digitalarts-features.xml'),
    ]
