mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Various Polish reciped by Tomasz Dlugosz
This commit is contained in:
parent
e2a5496ead
commit
1ba09aedec
60
resources/recipes/di.recipe
Normal file
60
resources/recipes/di.recipe
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__author__ = 'Mori'
|
||||||
|
__version__ = 'v. 0.5'
|
||||||
|
'''
|
||||||
|
di.com.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
import re
|
||||||
|
|
||||||
|
class DziennikInternautowRecipe(BasicNewsRecipe):
|
||||||
|
__author__ = 'Mori'
|
||||||
|
language = 'pl'
|
||||||
|
|
||||||
|
title = u'Dziennik Internautow'
|
||||||
|
publisher = u'Dziennik Internaut\xc3\xb3w Sp. z o.o.'
|
||||||
|
description =u'Internet w \xc5\xbcyciu i biznesie. Porady, wywiady, interwencje, bezpiecze\xc5\x84stwo w Sieci, technologia.'
|
||||||
|
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
oldest_article = 7
|
||||||
|
cover_url = 'http://di.com.pl/pic/logo_di_norm.gif'
|
||||||
|
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
encoding = 'utf-8'
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
.fotodesc{font-size: 75%;}
|
||||||
|
.pub_data{font-size: 75%;}
|
||||||
|
.fotonews{clear: both; padding-top: 10px; padding-bottom: 10px;}
|
||||||
|
#pub_foto{font-size: 75%; float: left; padding-right: 10px;}
|
||||||
|
'''
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Dziennik Internautów', u'http://feeds.feedburner.com/glowny-di')
|
||||||
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name = 'div', attrs = {'id' : 'pub_head'}),
|
||||||
|
dict(name = 'div', attrs = {'id' : 'pub_content'})
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name = 'div', attrs = {'class' : 'poradniki_context'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'uniBox'}),
|
||||||
|
dict(name = 'object', attrs = {}),
|
||||||
|
dict(name = 'h3', attrs = {})
|
||||||
|
]
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
|
||||||
|
[
|
||||||
|
(r', <a href="http://di.com.pl/komentarze,.*?</div>', lambda match: '</div>'),
|
||||||
|
(r'<div class="fotonews".*?">', lambda match: '<div class="fotonews">'),
|
||||||
|
(r'http://di.com.pl/pic/photo/mini/', lambda match: 'http://di.com.pl/pic/photo/oryginal/'),
|
||||||
|
(r'\s*</', lambda match: '</'),
|
||||||
|
]
|
||||||
|
]
|
49
resources/recipes/eclicto.recipe
Normal file
49
resources/recipes/eclicto.recipe
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__author__ = 'Mori'
|
||||||
|
__version__ = 'v. 0.1'
|
||||||
|
'''
|
||||||
|
blog.eclicto.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
import re
|
||||||
|
|
||||||
|
class BlogeClictoRecipe(BasicNewsRecipe):
|
||||||
|
__author__ = 'Mori'
|
||||||
|
language = 'pl'
|
||||||
|
|
||||||
|
title = u'Blog eClicto'
|
||||||
|
publisher = u'Blog eClicto'
|
||||||
|
description = u'Blog o e-papierze i e-bookach'
|
||||||
|
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
cover_url = 'http://blog.eclicto.pl/wordpress/wp-content/themes/blog_eclicto/g/logo.gif'
|
||||||
|
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
encoding = 'utf-8'
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
img{float: left; padding-right: 10px; padding-bottom: 5px;}
|
||||||
|
'''
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Blog eClicto', u'http://blog.eclicto.pl/feed/')
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name = 'span', attrs = {'id' : 'tags'})
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags_after = [
|
||||||
|
dict(name = 'div', attrs = {'class' : 'post'})
|
||||||
|
]
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
|
||||||
|
[
|
||||||
|
(r'\s*</', lambda match: '</'),
|
||||||
|
]
|
||||||
|
]
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
__license__ = 'GPL v2'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
__copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
'''
|
'''
|
||||||
eksiazki.org
|
eksiazki.org
|
||||||
@ -10,17 +10,17 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
|
|
||||||
class eksiazki(BasicNewsRecipe):
|
class eksiazki(BasicNewsRecipe):
|
||||||
|
|
||||||
title = u'eksiazki.org'
|
title = u'eKsiazki.org'
|
||||||
desciption = u'Twoje centrum wiedzy o epapierze i ebookach'
|
desciption = u'Twoje centrum wiedzy o ePapierze i eBookach'
|
||||||
language = 'pl'
|
language = 'pl'
|
||||||
__author__ = u'Tomasz D\u0142ugosz'
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
|
|
||||||
feeds = [(u'wpisy', u'http://www.eksiazki.org/feed/')]
|
feeds = [(u'eKsiazki.org', u'http://www.eksiazki.org/feed/')]
|
||||||
|
|
||||||
keep_only_tags = [dict(name='div', attrs={'id':'content-body'})]
|
keep_only_tags = [dict(name='div', attrs={'id':'content-body'})]
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name='span', attrs={'class':'nr_comm'}),
|
dict(name='span', attrs={'class':'nr_comm'}),
|
||||||
dict(name='div', attrs={'id':'tabsContainer'}),
|
dict(name='div', attrs={'id':'tabsContainer'}),
|
||||||
dict(name='div', attrs={'class':'next_previous_links'})]
|
dict(name='div', attrs={'class':'next_previous_links'})]
|
||||||
|
38
resources/recipes/interia_fakty.recipe
Normal file
38
resources/recipes/interia_fakty.recipe
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
fakty.interia.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class InteriaFakty(BasicNewsRecipe):
|
||||||
|
title = u'Interia.pl - Fakty'
|
||||||
|
language = 'pl'
|
||||||
|
oldest_article = 7
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
simultaneous_downloads = 2
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
|
||||||
|
feeds = [(u'Kraj', u'http://kanaly.rss.interia.pl/kraj.xml'),
|
||||||
|
(u'\u015awiat', u'http://kanaly.rss.interia.pl/swiat.xml'),
|
||||||
|
(u'Wiadomo\u015bci dnia', u'http://kanaly.rss.interia.pl/fakty.xml'),
|
||||||
|
(u'Przegl\u0105d prasy', u'http://kanaly.rss.interia.pl/przeglad_prasy.xml'),
|
||||||
|
(u'Wywiady', u'http://kanaly.rss.interia.pl/wywiady.xml'),
|
||||||
|
(u'Ciekawostki', u'http://kanaly.rss.interia.pl/ciekawostki.xml')]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'id':'article'})]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='div', attrs={'class':'box fontSizeSwitch'}),
|
||||||
|
dict(name='div', attrs={'class':'clear'}),
|
||||||
|
dict(name='div', attrs={'class':'embed embedLeft articleEmbedArticleList articleEmbedArticleListTitle'}),
|
||||||
|
dict(name='span', attrs={'class':'keywords'})]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
h2 { font-size: 1.2em; }
|
||||||
|
'''
|
71
resources/recipes/interia_sport.recipe
Normal file
71
resources/recipes/interia_sport.recipe
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
sport.interia.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
import re
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class InteriaSport(BasicNewsRecipe):
|
||||||
|
title = u'Interia.pl - Sport'
|
||||||
|
language = 'pl'
|
||||||
|
oldest_article = 7
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
simultaneous_downloads = 3
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
|
||||||
|
feeds = [(u'Wydarzenia sportowe', u'http://kanaly.rss.interia.pl/sport.xml'),
|
||||||
|
(u'Pi\u0142ka no\u017cna', u'http://kanaly.rss.interia.pl/pilka_nozna.xml'),
|
||||||
|
(u'Siatk\xf3wka', u'http://kanaly.rss.interia.pl/siatkowka.xml'),
|
||||||
|
(u'Koszyk\xf3wka', u'http://kanaly.rss.interia.pl/koszykowka.xml'),
|
||||||
|
(u'NBA', u'http://kanaly.rss.interia.pl/nba.xml'),
|
||||||
|
(u'Kolarstwo', u'http://kanaly.rss.interia.pl/kolarstwo.xml'),
|
||||||
|
(u'\u017bu\u017cel', u'http://kanaly.rss.interia.pl/zuzel.xml'),
|
||||||
|
(u'Tenis', u'http://kanaly.rss.interia.pl/tenis.xml')]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'id':'article'})]
|
||||||
|
|
||||||
|
remove_tags = [dict(name='div', attrs={'class':'object gallery'})]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
.articleDate {
|
||||||
|
font-size: 0.5em;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.articleFoto {
|
||||||
|
display: block;
|
||||||
|
font-family: sans;
|
||||||
|
font-size: 0.5em;
|
||||||
|
text-indent: 0
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.articleText {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-top: 1em
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.articleLead {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
|
||||||
|
[
|
||||||
|
(r'<p><a href.*?</a></p>', lambda match: ''),
|
||||||
|
# FIXME
|
||||||
|
#(r'(<div id="newsAddContent">)(.*?)(<a href=".*">)(.*?)(</a>)', lambda match: '\1\2\4'),
|
||||||
|
(r'<p>(<i>)?<b>(ZOBACZ|CZYTAJ) T.*?</div>', lambda match: '</div>')
|
||||||
|
]
|
||||||
|
]
|
43
resources/recipes/legeartis.recipe
Normal file
43
resources/recipes/legeartis.recipe
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__author__ = 'Mori'
|
||||||
|
__version__ = 'v. 0.1'
|
||||||
|
'''
|
||||||
|
olgierd.bblog.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class LegeArtisRecipe(BasicNewsRecipe):
|
||||||
|
__author__ = 'Mori'
|
||||||
|
language = 'pl'
|
||||||
|
|
||||||
|
title = u'Lege Artis'
|
||||||
|
publisher = u'Olgierd Rudak'
|
||||||
|
description = u'Wszystko, co chcieliby\xc5\x9bcie wiedzie\xc4\x87 o prawie, ale wstydzicie si\xc4\x99 zapyta\xc4\x87'
|
||||||
|
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
img{clear: both;}
|
||||||
|
'''
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Lege Artis', u'http://olgierd.bblog.pl/rss/rss20.xml')
|
||||||
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name = 'div', attrs = {'class' : 'post_title'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'post_date'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'post_content'})
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name = 'div', attrs = {'id' : 'bb_tools'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'post_comments'}),
|
||||||
|
dict(name = 'object', attrs = {})
|
||||||
|
]
|
49
resources/recipes/legitymizm.recipe
Normal file
49
resources/recipes/legitymizm.recipe
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
legitymizm.org
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class Legitymizm(BasicNewsRecipe):
|
||||||
|
title = u'Organizacja Monarchist\xf3w Polskich'
|
||||||
|
language = 'pl'
|
||||||
|
oldest_article = 7
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
cover_url = 'http://www.legitymizm.org/img_omp/logo.gif'
|
||||||
|
no_stylesheets = True
|
||||||
|
|
||||||
|
feeds = [(u'Aktualno\u015bci i publicystyka', u'http://www.legitymizm.org/rss.php')]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'id':'szeroka_kolumna'})]
|
||||||
|
remove_tags = [dict(name = 'div', attrs = {'class' : 'koniec_tresci_wlasciwej'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'return'})]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
body { font-family: Georgia, 'Times New Roman', Times, serif; }
|
||||||
|
h1 { color: #898981; font-weight: normal; font-size: 26px; letter-spacing: -1px; line-height: 23px; text-align: left; }
|
||||||
|
h2, h3 { font-weight: normal; font-size: 20px; line-height: 23px; letter-spacing: -1px; margin: 0 0 3px 0; text-align: left; }
|
||||||
|
#szeroka_kolumna { float: left; line-height: 20px; }
|
||||||
|
#szeroka_kolumna ul.wykaz { list-style-type: none; margin: 0 0 1.2em 0; padding: 0; }
|
||||||
|
#szeroka_kolumna ul.wykaz li.wykaz_2 { font-weight: bold; margin: 0.6em 0 0 0; }
|
||||||
|
#szeroka_kolumna ul.wykaz a { text-decoration: none; }
|
||||||
|
#szeroka_kolumna ul.wykaz li.wykaz_1, #szeroka_kolumna ul.wykaz li.wykaz_2 ul li { list-style-type: square; color: #898981; text-transform: none; font-weight: normal; padding: 0; }
|
||||||
|
#szeroka_kolumna ul.wykaz li.wykaz_1 { margin: 0 0 0 1.3em; }
|
||||||
|
#szeroka_kolumna ul.wykaz li.wykaz_2 ul { margin: 0; padding: 0 0 0 1.3em; }
|
||||||
|
#szeroka_kolumna h3.autor { background-color: #898981; color: #f9f9f8; margin: -25px 0px 30px 0; text-align: left; padding: 0 0 0 2px; }
|
||||||
|
.tresc_wlasciwa { border-top: 1px solid #898981; padding: 30px 0px 0px 0px; position: relative; }
|
||||||
|
#cytat { font-size: 11px; line-height: 19px; font-style: italic; text-align: justify; }
|
||||||
|
#cytat img { width: 100px; height: 105px; float: right; margin: 3px 0 0 10px; }
|
||||||
|
.duzy_cytat { padding: 20px 20px 10px 20px; margin: 0 0 1.2em 0; }
|
||||||
|
#szeroka_kolumna img, #szeroka_kolumna object { padding: 3px; border: 1px solid #898981; }
|
||||||
|
#szeroka_kolumna img.ilustracja { margin: 0px 10px 0 0; float: left; }
|
||||||
|
p { margin: 0 0 1.2em 0; }
|
||||||
|
#cytat p.sentencja { margin: 0; }
|
||||||
|
#cytat p.sentencja:first-letter { font-size: 44px; line-height: 33px; margin: 0 2px 0 0; font-style: normal; float: left; display: block; }
|
||||||
|
p.autor { text-transform: uppercase; color: #898981; font-style: normal; text-align: left; }
|
||||||
|
'''
|
||||||
|
|
26
resources/recipes/michalkiewicz.recipe
Normal file
26
resources/recipes/michalkiewicz.recipe
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
michalkiewicz.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
class michalkiewicz(BasicNewsRecipe):
|
||||||
|
title = u'Stanis\u0142aw Michalkiewicz'
|
||||||
|
desciption = u'Strona autorska * felietony * artyku\u0142y * komentarze'
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
language = 'pl'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'modul_srodek'})]
|
||||||
|
remove_tags = [dict(name='ul', attrs={'class':'menu'})]
|
||||||
|
|
||||||
|
feeds = [(u'Teksty', u'http://www.michalkiewicz.pl/rss.xml')]
|
||||||
|
|
35
resources/recipes/nczas.recipe
Normal file
35
resources/recipes/nczas.recipe
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
nczas.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
class NCzas(BasicNewsRecipe):
|
||||||
|
title = u'Najwy\u017cszy Czas!'
|
||||||
|
desciption = u'Najwy\u017cszy Czas!\nwydanie internetowe'
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
language = 'pl'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
cover_url = 'http://nczas.com/wp-content/themes/default/grafika/logo.png'
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'trescartykulu'})]
|
||||||
|
|
||||||
|
feeds = [(u'Najwy\u017cszy Czas!', u'http://nczas.com/feed/')]
|
||||||
|
|
||||||
|
def postprocess_html(self, soup, first):
|
||||||
|
|
||||||
|
for tag in soup.findAll(name= 'img', alt=""):
|
||||||
|
tag.extract()
|
||||||
|
|
||||||
|
for item in soup.findAll(align = "right"):
|
||||||
|
del item['align']
|
||||||
|
|
||||||
|
return soup
|
Loading…
x
Reference in New Issue
Block a user