mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
New recipes for Naked Capitalism and Daily Reckoning by Darko Miletic
This commit is contained in:
parent
31f933c236
commit
0cab0f4fd4
BIN
resources/images/news/dailyreckoning.png
Normal file
BIN
resources/images/news/dailyreckoning.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 996 B |
47
resources/recipes/dailyreckoning.recipe
Normal file
47
resources/recipes/dailyreckoning.recipe
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
dailyreckoning.com
|
||||||
|
'''
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class dailyreckoning_us(BasicNewsRecipe):
|
||||||
|
title = 'The Daily Reckoning - US edition'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Worldwide business and financial news and articles'
|
||||||
|
publisher = 'Agora Financial, LLC.'
|
||||||
|
category = 'news, business, finances, money, banking'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = False
|
||||||
|
encoding = 'utf-8'
|
||||||
|
language = 'en'
|
||||||
|
extra_css = ' #BlogTitle{font-size: x-large; font-weight: bold} #BlogDate{font-size: small} '
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
feeds = [(u'Articles', u'http://feeds.feedburner.com/dailyreckoning?format=xml')]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'id':'Outline'})]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name=['object','link','base'])
|
||||||
|
,dict(name='hr', attrs={'class':'Divider'})
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags_after = dict(name='hr', attrs={'class':'Divider'})
|
||||||
|
|
||||||
|
def get_article_url(self, article):
|
||||||
|
return article.get('feedburner_origlink', article.get('link'))
|
||||||
|
|
||||||
|
def print_version(self, url):
|
||||||
|
return url + 'print/'
|
||||||
|
|
39
resources/recipes/nakedcapitalism.recipe
Normal file
39
resources/recipes/nakedcapitalism.recipe
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
www.nakedcapitalism.com
|
||||||
|
'''
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class nakedcapitalism(BasicNewsRecipe):
|
||||||
|
title = 'Naked Capitalism'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Commentary on current economic and financial news.'
|
||||||
|
publisher = 'Aurora Advisors, Inc.'
|
||||||
|
category = 'news, business, finances, money, banking'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = False
|
||||||
|
encoding = 'utf-8'
|
||||||
|
language = 'en'
|
||||||
|
extra_css = ' #BlogTitle{font-size: x-large; font-weight: bold} #BlogDate{font-size: small} '
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
feeds = [(u'Articles', u'http://www.nakedcapitalism.com/feed')]
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name='h3', attrs={'class':'post-title entry-title'})
|
||||||
|
,dict(name='div', attrs={'class':'entry'})
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags = [dict(name=['object','link','base'])]
|
||||||
|
|
@ -172,8 +172,6 @@ class PostInstall:
|
|||||||
from calibre.ebooks.metadata.cli import option_parser as metaop, filetypes as meta_filetypes
|
from calibre.ebooks.metadata.cli import option_parser as metaop, filetypes as meta_filetypes
|
||||||
from calibre.ebooks.lrf.lrfparser import option_parser as lrf2lrsop
|
from calibre.ebooks.lrf.lrfparser import option_parser as lrf2lrsop
|
||||||
from calibre.gui2.lrf_renderer.main import option_parser as lrfviewerop
|
from calibre.gui2.lrf_renderer.main import option_parser as lrfviewerop
|
||||||
from calibre.web.fetch.simple import option_parser as web2disk
|
|
||||||
from calibre.web.feeds.recipes import titles as feed_titles
|
|
||||||
from calibre.ebooks.metadata.fetch import option_parser as fem_op
|
from calibre.ebooks.metadata.fetch import option_parser as fem_op
|
||||||
from calibre.gui2.main import option_parser as guiop
|
from calibre.gui2.main import option_parser as guiop
|
||||||
from calibre.utils.smtp import option_parser as smtp_op
|
from calibre.utils.smtp import option_parser as smtp_op
|
||||||
@ -195,7 +193,6 @@ class PostInstall:
|
|||||||
f.write(opts_and_exts('lrf2lrs', lrf2lrsop, ['lrf']))
|
f.write(opts_and_exts('lrf2lrs', lrf2lrsop, ['lrf']))
|
||||||
f.write(opts_and_exts('ebook-meta', metaop, list(meta_filetypes())))
|
f.write(opts_and_exts('ebook-meta', metaop, list(meta_filetypes())))
|
||||||
f.write(opts_and_exts('lrfviewer', lrfviewerop, ['lrf']))
|
f.write(opts_and_exts('lrfviewer', lrfviewerop, ['lrf']))
|
||||||
f.write(opts_and_words('web2disk', web2disk, feed_titles))
|
|
||||||
f.write(opts_and_words('fetch-ebook-metadata', fem_op, []))
|
f.write(opts_and_words('fetch-ebook-metadata', fem_op, []))
|
||||||
f.write(opts_and_words('calibre-smtp', smtp_op, []))
|
f.write(opts_and_words('calibre-smtp', smtp_op, []))
|
||||||
f.write(textwrap.dedent('''
|
f.write(textwrap.dedent('''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user