mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Press releases of the German government and EU COmmission by malfi
This commit is contained in:
parent
372c462ae7
commit
e8d4ec53ca
58
resources/recipes/eu_commission.recipe
Normal file
58
resources/recipes/eu_commission.recipe
Normal file
@ -0,0 +1,58 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
LANGUAGE = 'de'
|
||||
|
||||
def feedlink(num):
|
||||
return u'http://europa.eu/rapid/syndication/QuickRSSAction.do?id='+\
|
||||
str(num)+'&lang='+ LANGUAGE
|
||||
|
||||
class EUCommissionPress(BasicNewsRecipe):
|
||||
title = u'Pressemitteilungen der EU Kommission pro Politikbereich'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
cover_url = 'http://ec.europa.eu/wel/template_2007/images/banners/banner-background.jpg'
|
||||
__author__ = 'malfi'
|
||||
language = LANGUAGE
|
||||
keep_only_tags = []
|
||||
keep_only_tags.append(dict(name = 'div', attrs = {'class': 'pressReleaseContentMain'}))
|
||||
remove_tags = []
|
||||
|
||||
|
||||
feeds = [
|
||||
(u'Pressemitteilung des Tages',feedlink(64)),
|
||||
(u'Presidency',feedlink(137)),
|
||||
(u'Foreign affairs and security policy',feedlink(138)),
|
||||
(u'Agriculture and rural development',feedlink(139)),
|
||||
(u'Budget and financial programming ',feedlink(140)),
|
||||
(u'Climate action',feedlink(141)),
|
||||
(u'Competition',feedlink(142)),
|
||||
(u'Development',feedlink(143)),
|
||||
(u'Digital agenda',feedlink(144)),
|
||||
(u'Economic and monetary affairs',feedlink(145)),
|
||||
(u'Education, culture, multilingualism and youth ',feedlink(146)),
|
||||
(u'Employment, social Affairs and inclusion ',feedlink(147)),
|
||||
(u'Energy',feedlink(148)),
|
||||
(u'Enlargment and European neighbourhood policy ',feedlink(149)),
|
||||
(u'Environment',feedlink(150)),
|
||||
(u'Health and consumer policy',feedlink(151)),
|
||||
(u'Home affairs',feedlink(152)),
|
||||
(u'Industry and entrepreneurship',feedlink(153)),
|
||||
(u'Inter-Institutional relations and administration',feedlink(154)),
|
||||
(u'Internal market and services',feedlink(155)),
|
||||
(u'International cooperation, humanitarian aid and crisis response',feedlink(156)),
|
||||
(u'Justice, fundamental rights and citizenship',feedlink(157)),
|
||||
(u'Maritime affairs and fisheries',feedlink(158)),
|
||||
(u'Regional policy',feedlink(159)),
|
||||
(u'Research and innovation',feedlink(160)),
|
||||
(u'Taxation and customs union, audit and anti-fraud',feedlink(161)),
|
||||
(u'Trade',feedlink(162)),
|
||||
(u'Transport',feedlink(163))
|
||||
]
|
||||
extra_css = '''
|
||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
|
||||
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
||||
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
||||
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||
'''
|
||||
|
28
resources/recipes/german_gov.recipe
Normal file
28
resources/recipes/german_gov.recipe
Normal file
@ -0,0 +1,28 @@
|
||||
import re
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class GermanGovermentPress(BasicNewsRecipe):
|
||||
title = u'Pressemitteilungen der Bundesregierung'
|
||||
oldest_article = 14
|
||||
__author__ = 'malfi'
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
cover_url = 'http://www.bundesregierung.de/static/images/logoBR.gif'
|
||||
language = 'de'
|
||||
keep_only_tags = []
|
||||
keep_only_tags.append(dict(name = 'h2'))
|
||||
keep_only_tags.append(dict(name = 'div', attrs = {'class': 'textblack'}))
|
||||
keep_only_tags.append(dict(name = 'div', attrs = {'class': 'subtitle'}))
|
||||
keep_only_tags.append(dict(name = 'div', attrs = {'class': 'text'}))
|
||||
remove_tags = []
|
||||
feeds = [ (u'Pressemitteilungen',u'http://www.bundesregierung.de/Webs/Breg/DE/Service/RSS/Functions/bundesregierungPressemitteilungenRSS20,templateId=renderNewsfeed.rdf') ]
|
||||
extra_css = '''
|
||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
|
||||
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
||||
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
||||
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||
'''
|
||||
def print_version(self, url):
|
||||
m = re.search(r'^(.*).html$', url)
|
||||
return str(m.group(1)) + ',layoutVariant=Druckansicht.html'
|
Loading…
x
Reference in New Issue
Block a user