forked from kovidgoyal/calibre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchowk.recipe
46 lines (35 loc) · 1.38 KB
/
chowk.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
from calibre.web.feeds.news import BasicNewsRecipe
class ChowkRecipe(BasicNewsRecipe):
__license__ = 'GPL v3'
__author__ = 'kwetal'
language = 'en_IN'
version = 1
title = u'Chowk'
publisher = u'chowk.com'
category = u'Opinion, South Asia'
description = u'Ideas & Identities of South Asia'
use_embedded_content = False
remove_empty_feeds = True
oldest_article = 30
max_articles_per_feed = 100
#no_stylesheets = True
remove_javascript = True
encoding = 'utf-8'
feeds = []
feeds.append(('Chowk Articles', 'http://www.chowk.com/rss'))
keep_only_tags = []
keep_only_tags.append(dict(name = 'div', attrs = {'id': 'content'}))
conversion_options = {'comments': description, 'tags': category, 'language': 'en',
'publisher': publisher}
extra_css = '''
body{font-family:verdana,arial,helvetica,geneva,sans-serif;}
a {text-decoration: none; color: blue;}
div.pgtitle {font-size: x-large; font-weight: bold;}
div.wname, div.date {font-size: x-small; color: #696969;}
div.wname {margin-top: 1em;}
div.date {margin-bottom: 1em;}
div.title {font-weight: bold;}
'''
def print_version(self, url):
main, sep, id = url.rpartition('/')
return main + '/print/' + id