mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Update Credit Slips
This commit is contained in:
parent
0a05ba617a
commit
a4fe0095df
BIN
resources/images/news/credit_slips.png
Normal file
BIN
resources/images/news/credit_slips.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
@ -1,35 +1,44 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
__license__ = 'GPL 3'
|
__license__ = 'GPL 3'
|
||||||
__copyright__ = 'zotzot'
|
__copyright__ = 'zotzo'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class CreditSlips(BasicNewsRecipe):
|
class CreditSlips(BasicNewsRecipe):
|
||||||
__license__ = 'GPL v3'
|
|
||||||
__author__ = 'zotzot'
|
|
||||||
language = 'en'
|
language = 'en'
|
||||||
version = 1
|
__author__ = 'zotzot'
|
||||||
|
version = 2
|
||||||
title = u'Credit Slips.org'
|
title = u'Credit Slips.org'
|
||||||
publisher = u'Bankr-L'
|
publisher = u'Bankr-L'
|
||||||
category = u'Economic blog'
|
category = u'Economic blog'
|
||||||
description = u'All things about credit.'
|
description = u'A discussion on credit and bankruptcy'
|
||||||
cover_url = 'http://bit.ly/hyZSTr'
|
cover_url = 'http://bit.ly/eAKNCB'
|
||||||
oldest_article = 50
|
oldest_article = 15
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
use_embedded_content = True
|
use_embedded_content = True
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comments': description,
|
||||||
|
'tags': category,
|
||||||
|
'language': 'en',
|
||||||
|
'publisher': publisher,
|
||||||
|
}
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Credit Slips', u'http://www.creditslips.org/creditslips/atom.xml')
|
(u'Credit Slips', u'http://www.creditslips.org/creditslips/atom.xml')
|
||||||
]
|
]
|
||||||
conversion_options = {
|
|
||||||
'comments': description,
|
extra_css = '''
|
||||||
'tags': category,
|
.author {font-family:Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
||||||
'language': 'en',
|
h1 {font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
|
||||||
'publisher': publisher
|
p {font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||||
}
|
body {font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||||
extra_css = '''
|
'''
|
||||||
body{font-family:verdana,arial,helvetica,geneva,sans-serif;}
|
|
||||||
img {float: left; margin-right: 0.5em;}
|
def populate_article_metadata(self, article, soup, first):
|
||||||
'''
|
h2 = soup.find('h2')
|
||||||
|
h2.replaceWith(h2.prettify() + '<p><em>Posted by ' + article.author + '</em></p>')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user