/
editor_and_publisher.recipe
47 lines (37 loc) · 1.41 KB
/
editor_and_publisher.recipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2010 elsuave'
from calibre.web.feeds.news import BasicNewsRecipe
class EandP(BasicNewsRecipe):
title = u'Editor and Publisher'
__author__ = u'elsuave (modified from Xanthan Gum)'
description = 'News about newspapers and journalism.'
publisher = 'Editor and Publisher'
category = 'news, journalism, industry'
language = 'en'
max_articles_per_feed = 25
no_stylesheets = True
use_embedded_content = False
encoding = 'utf8'
cover_url = 'http://www.editorandpublisher.com/images/EP_main_logo.gif'
remove_javascript = True
auto_cleanup = True
html2lrf_options = [
'--comment', description,
'--category', category,
'--publisher', publisher
]
html2epub_options = 'publisher="' + publisher + \
'"\ncomments="' + description + '"\ntags="' + category + '"'
# Font formatting code borrowed from kwetal
extra_css = '''
body{font-family:verdana,arial,helvetica,geneva,sans-serif ;}
h1{font-size: xx-large;}
h2{font-size: large;}
'''
# Remove commenting/social media lins
remove_tags_after = [dict(name='div', attrs={'class': 'clear'})]
feeds = [
(u'Editor & Publisher', u'http://www.editorandpublisher.com/feed/'),
(u'Comments', u'http://www.editorandpublisher.com/comments/feed/'),
]