merge from trunk
BIN
resources/images/news/fronda.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
resources/images/news/gazeta_pomorska.png
Normal file
After Width: | Height: | Size: 323 B |
BIN
resources/images/news/legeartis.png
Normal file
After Width: | Height: | Size: 634 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1017 B |
BIN
resources/images/news/rmf24_ESKN.png
Normal file
After Width: | Height: | Size: 722 B |
BIN
resources/images/news/rmf24_fakty.png
Normal file
After Width: | Height: | Size: 722 B |
104
resources/recipes/gazeta_pomorska.recipe
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
# # Przed uzyciem przeczytaj komentarz w sekcji "feeds"
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = u'2010, Richard z forum.eksiazki.org'
|
||||||
|
'''pomorska.pl'''
|
||||||
|
|
||||||
|
import re
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class GazetaPomorska(BasicNewsRecipe):
|
||||||
|
title = u'Gazeta Pomorska'
|
||||||
|
publisher = u'Gazeta Pomorska'
|
||||||
|
description = u'Kujawy i Pomorze - wiadomo\u015bci'
|
||||||
|
language = 'pl'
|
||||||
|
__author__ = u'Richard z forum.eksiazki.org'
|
||||||
|
# # (dziekuje t3d z forum.eksiazki.org za testy)
|
||||||
|
oldest_article = 2
|
||||||
|
max_articles_per_feed = 20
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(r'<a href="http://maps.google[^>]*>[^<]*</a>\.*', re.DOTALL|re.IGNORECASE), lambda m: ''),
|
||||||
|
(re.compile(r'[<Bb >]*Poznaj opinie[^<]*[</Bb >]*[^<]*<a href[^>]*>[^<]*</a>\.*', re.DOTALL|re.IGNORECASE), lambda m: ''),
|
||||||
|
(re.compile(r'[<Bb >]*Przeczytaj[^<]*[</Bb >]*[^<]*<a href[^>]*>[^<]*</a>\.*', re.DOTALL|re.IGNORECASE), lambda m: ''),
|
||||||
|
(re.compile(r'[<Bb >]*Wi.cej informacji[^<]*[</Bb >]*[^<]*<a href[^>]*>[^<]*</a>\.*', re.DOTALL|re.IGNORECASE), lambda m: ''),
|
||||||
|
(re.compile(r'<a href[^>]*>[<Bb >]*Wideo[^<]*[</Bb >]*[^<]*</a>\.*', re.DOTALL|re.IGNORECASE), lambda m: ''),
|
||||||
|
(re.compile(r'<a href[^>]*>[<Bb >]*KLIKNIJ TUTAJ[^<]*[</Bb >]*[^<]*</a>\.*', re.DOTALL|re.IGNORECASE), lambda m: '')
|
||||||
|
]
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
# # Tutaj jest wymieniona lista kategorii jakie mozemy otrzymywac z Gazety
|
||||||
|
# # Pomorskiej, po jednej kategorii w wierszu. Jesli na poczatku danego wiersza
|
||||||
|
# # znajduje sie jeden znak "#", oznacza to ze kategoria jest zakomentowana
|
||||||
|
# # i nie bedziemy jej otrzymywac. Jesli chcemy ja otrzymywac nalezy usunac
|
||||||
|
# # znak # z jej wiersza.
|
||||||
|
# # Jesli subskrybujemy wiecej niz jedna kategorie, na koncu wiersza z kazda
|
||||||
|
# # kategoria musi sie znajdowac niezakomentowany przecinek, z wyjatkiem
|
||||||
|
# # ostatniego wiersza - ma byc bez przecinka na koncu.
|
||||||
|
# # Rekomendowane opcje wyboru kategorii:
|
||||||
|
# # 1. PomorskaRSS - wiadomosci kazdego typu, lub
|
||||||
|
# # 2. Region + wybrane miasta, lub
|
||||||
|
# # 3. Wiadomosci tematyczne.
|
||||||
|
# # Lista kategorii:
|
||||||
|
|
||||||
|
# # PomorskaRSS - wiadomosci kazdego typu, zakomentuj znakiem "#"
|
||||||
|
# # przed odkomentowaniem wiadomosci wybranego typu:
|
||||||
|
(u'PomorskaRSS', u'http://www.pomorska.pl/rss.xml')
|
||||||
|
|
||||||
|
# # wiadomosci z regionu nie przypisane do okreslonego miasta:
|
||||||
|
# (u'Region', u'http://www.pomorska.pl/region.xml'),
|
||||||
|
|
||||||
|
# # wiadomosci przypisane do miast:
|
||||||
|
# (u'Bydgoszcz', u'http://www.pomorska.pl/bydgoszcz.xml'),
|
||||||
|
# (u'Nak\u0142o', u'http://www.pomorska.pl/naklo.xml'),
|
||||||
|
# (u'Koronowo', u'http://www.pomorska.pl/koronowo.xml'),
|
||||||
|
# (u'Solec Kujawski', u'http://www.pomorska.pl/soleckujawski.xml'),
|
||||||
|
# (u'Grudzi\u0105dz', u'http://www.pomorska.pl/grudziadz.xml'),
|
||||||
|
# (u'Inowroc\u0142aw', u'http://www.pomorska.pl/inowroclaw.xml'),
|
||||||
|
# (u'Toru\u0144', u'http://www.pomorska.pl/torun.xml'),
|
||||||
|
# (u'W\u0142oc\u0142awek', u'http://www.pomorska.pl/wloclawek.xml'),
|
||||||
|
# (u'Aleksandr\u00f3w Kujawski', u'http://www.pomorska.pl/aleksandrow.xml'),
|
||||||
|
# (u'Brodnica', u'http://www.pomorska.pl/brodnica.xml'),
|
||||||
|
# (u'Che\u0142mno', u'http://www.pomorska.pl/chelmno.xml'),
|
||||||
|
# (u'Chojnice', u'http://www.pomorska.pl/chojnice.xml'),
|
||||||
|
# (u'Ciechocinek', u'http://www.pomorska.pl/ciechocinek.xml'),
|
||||||
|
# (u'Golub Dobrzy\u0144', u'http://www.pomorska.pl/golubdobrzyn.xml'),
|
||||||
|
# (u'Mogilno', u'http://www.pomorska.pl/mogilno.xml'),
|
||||||
|
# (u'Radziej\u00f3w', u'http://www.pomorska.pl/radziejow.xml'),
|
||||||
|
# (u'Rypin', u'http://www.pomorska.pl/rypin.xml'),
|
||||||
|
# (u'S\u0119p\u00f3lno', u'http://www.pomorska.pl/sepolno.xml'),
|
||||||
|
# (u'\u015awiecie', u'http://www.pomorska.pl/swiecie.xml'),
|
||||||
|
# (u'Tuchola', u'http://www.pomorska.pl/tuchola.xml'),
|
||||||
|
# (u'\u017bnin', u'http://www.pomorska.pl/znin.xml')
|
||||||
|
|
||||||
|
# # wiadomosci tematyczne (redundancja z region/miasta):
|
||||||
|
# (u'Sport', u'http://www.pomorska.pl/sport.xml'),
|
||||||
|
# (u'Zdrowie', u'http://www.pomorska.pl/zdrowie.xml'),
|
||||||
|
# (u'Auto', u'http://www.pomorska.pl/moto.xml'),
|
||||||
|
# (u'Dom', u'http://www.pomorska.pl/dom.xml'),
|
||||||
|
# (u'Reporta\u017c', u'http://www.pomorska.pl/reportaz.xml'),
|
||||||
|
# (u'Gospodarka', u'http://www.pomorska.pl/gospodarka.xml')
|
||||||
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'id':'article'})]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='p', attrs={'id':'articleTags'}),
|
||||||
|
dict(name='div', attrs={'id':'articleEpaper'}),
|
||||||
|
dict(name='div', attrs={'id':'articleConnections'}),
|
||||||
|
dict(name='div', attrs={'class':'articleFacts'}),
|
||||||
|
dict(name='div', attrs={'id':'articleExternalLink'}),
|
||||||
|
dict(name='div', attrs={'id':'articleMultimedia'}),
|
||||||
|
dict(name='div', attrs={'id':'articleGalleries'}),
|
||||||
|
dict(name='div', attrs={'id':'articleAlarm'}),
|
||||||
|
dict(name='div', attrs={'id':'adholder_srodek1'}),
|
||||||
|
dict(name='div', attrs={'id':'articleVideo'}),
|
||||||
|
dict(name='a', attrs={'name':'fb_share'})]
|
||||||
|
|
||||||
|
extra_css = '''h1 { font-size: 1.4em; }
|
||||||
|
h2 { font-size: 1.0em; }'''
|
||||||
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
#!/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!'
|
|
||||||
description = 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
|
|
46
resources/recipes/rmf24_ESKN.recipe
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
rmf24.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
import re
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class RMF24_ESKN(BasicNewsRecipe):
|
||||||
|
title = u'Rmf24.pl - Ekonomia Sport Kultura Nauka'
|
||||||
|
description = u'Ekonomia, sport, kultura i nauka ze strony rmf24.pl'
|
||||||
|
language = 'pl'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
|
||||||
|
feeds = [(u'Ekonomia', u'http://www.rmf24.pl/ekonomia/feed'),
|
||||||
|
(u'Sport', u'http://www.rmf24.pl/sport/feed'),
|
||||||
|
(u'Kultura', u'http://www.rmf24.pl/kultura/feed'),
|
||||||
|
(u'Nauka', u'http://www.rmf24.pl/nauka/feed')]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'box articleSingle print'})]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='div', attrs={'class':'toTop'}),
|
||||||
|
dict(name='div', attrs={'class':'category'}),
|
||||||
|
dict(name='div', attrs={'class':'REMOVE'}),
|
||||||
|
dict(name='div', attrs={'class':'embed embedAd'})]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
h1 { font-size: 1.2em; }
|
||||||
|
'''
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
|
||||||
|
[
|
||||||
|
(r'<h2>Zdj.cie</h2>', lambda match: ''),
|
||||||
|
(r'embed embed(Left|Right|Center) articleEmbed(Audio|Wideo articleEmbedVideo|ArticleFull|ArticleTitle|ArticleListTitle|AlbumHorizontal)">', lambda match: 'REMOVE">'),
|
||||||
|
(r'<a href="http://www.facebook.com/pages/RMF24pl/.*?>RMF24.pl</a> on Facebook</div>', lambda match: '</div>')
|
||||||
|
]
|
||||||
|
]
|
44
resources/recipes/rmf24_fakty.recipe
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = u'2010, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
rmf24.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
import re
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class RMF24(BasicNewsRecipe):
|
||||||
|
title = u'Rmf24.pl - Fakty'
|
||||||
|
description = u'Fakty ze strony rmf24.pl'
|
||||||
|
language = 'pl'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
|
||||||
|
feeds = [(u'Kraj', u'http://www.rmf24.pl/fakty/polska/feed'),
|
||||||
|
(u'\u015awiat', u'http://www.rmf24.pl/fakty/swiat/feed')]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'box articleSingle print'})]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='div', attrs={'id':'adBox625'}),
|
||||||
|
dict(name='div', attrs={'class':'toTop'}),
|
||||||
|
dict(name='div', attrs={'class':'category'}),
|
||||||
|
dict(name='div', attrs={'class':'REMOVE'}),
|
||||||
|
dict(name='div', attrs={'class':'embed embedAd'})]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
h1 { font-size: 1.2em; }
|
||||||
|
'''
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
|
||||||
|
[
|
||||||
|
(r'<h2>Zdj.cie</h2>', lambda match: ''),
|
||||||
|
(r'embed embed(Left|Right|Center) articleEmbed(Audio|Wideo articleEmbedVideo|ArticleFull|ArticleTitle|ArticleListTitle|AlbumHorizontal)">', lambda match: 'REMOVE">'),
|
||||||
|
(r'<a href="http://www.facebook.com/pages/RMF24pl/.*?>RMF24.pl</a> on Facebook</div>', lambda match: '</div>')
|
||||||
|
]
|
||||||
|
]
|
@ -863,11 +863,11 @@ class SplitterHandle(QSplitterHandle):
|
|||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def paintEvent(self, ev):
|
def paintEvent(self, ev):
|
||||||
|
QSplitterHandle.paintEvent(self, ev)
|
||||||
if self.highlight:
|
if self.highlight:
|
||||||
painter = QPainter(self)
|
painter = QPainter(self)
|
||||||
painter.setClipRect(ev.rect())
|
painter.setClipRect(ev.rect())
|
||||||
painter.fillRect(self.rect(), Qt.yellow)
|
painter.fillRect(self.rect(), Qt.yellow)
|
||||||
QSplitterHandle.paintEvent(self, ev)
|
|
||||||
|
|
||||||
def mouseDoubleClickEvent(self, ev):
|
def mouseDoubleClickEvent(self, ev):
|
||||||
self.double_clicked.emit(self)
|
self.double_clicked.emit(self)
|
||||||
|