From 2c20e69d63d1981049e9b7a3a38de87dc102bfa4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 13 Mar 2010 13:52:50 -0700 Subject: [PATCH] Update various Polish recipes. And new ones for fronda and runa by Tomasz Dugosz and Mori, resp. --- resources/images/news/di.png | Bin 0 -> 733 bytes resources/images/news/eclicto.png | Bin 0 -> 401 bytes resources/images/news/eksiazki.png | Bin 0 -> 475 bytes resources/images/news/interia_fakty.png | Bin 0 -> 626 bytes resources/images/news/interia_sport.png | Bin 0 -> 626 bytes resources/images/news/legitymizm.png | Bin 0 -> 808 bytes resources/images/news/michalkiewicz.png | Bin 0 -> 1406 bytes resources/recipes/di.recipe | 20 +++---- resources/recipes/eclicto.recipe | 70 ++++++++++++------------ resources/recipes/eksiazki.recipe | 2 +- resources/recipes/fronda.recipe | 34 ++++++++++++ resources/recipes/interia_fakty.recipe | 1 + resources/recipes/interia_sport.recipe | 4 +- resources/recipes/legeartis.recipe | 60 ++++++++++---------- resources/recipes/legitymizm.recipe | 1 + resources/recipes/michalkiewicz.recipe | 2 +- resources/recipes/nczas.recipe | 2 +- resources/recipes/runa.recipe | 52 ++++++++++++++++++ 18 files changed, 169 insertions(+), 79 deletions(-) create mode 100644 resources/images/news/di.png create mode 100644 resources/images/news/eclicto.png create mode 100644 resources/images/news/eksiazki.png create mode 100644 resources/images/news/interia_fakty.png create mode 100644 resources/images/news/interia_sport.png create mode 100644 resources/images/news/legitymizm.png create mode 100644 resources/images/news/michalkiewicz.png create mode 100644 resources/recipes/fronda.recipe create mode 100644 resources/recipes/runa.recipe diff --git a/resources/images/news/di.png b/resources/images/news/di.png new file mode 100644 index 0000000000000000000000000000000000000000..07c15554b1afde6b9d0349046a1ea1915d18a885 GIT binary patch literal 733 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87?{{RT^vI!PS2g}?GX|vbFBWk-LuluCp<-h z3@-b+I(K+%(LB+VF~g}#X^ENJTBXi~Vu9UaU7}mG?tYEh87O`+S!2Q>2Pb6}ZLZ{w zNtsT|t&P7Me!nL+snYrQi{{N1_bvb5|NmibaZC0S*}vZ+*KAbOi2O5o3d6x^%o)em zFMje~)iC(4wg?NS{2qtG4bnNx49Zv8ySh^P_}1JonB%cXc2`Tx?vu}FFJ{)5w@`l* zOHnP))|H}xfvnRSKfhJZGxPoTuX4`ILiq#6B~$KCKJe{ui?C;l&;jiy0;?CFxGF8! z)s;SbhH|-JlHafU@4xhK=>>VY&K^eZ?)04J zK7M}U>%PY|Gqv~w%yO6&_PpoGO4h!#%W6%h`;)3i-v2~hTTE~dF zmwa5({_4i%|06yvbMbKg^Tz(Egn!;gd#<;Zy^Bg?j%v@0NIqQAeMwh+Aq(dgl?zr? zKUsqh?Ae+1wXq$TJXA|uBT7;dOH!?pi&B9UgOP!ufv$nEuAy;=p|O>rrImq&u7SCg zfq_t+*D@3hx%nxXX_Y_?2Ijg3mb!+fA%mdKI;Vst E0N!gg7ytkO literal 0 HcmV?d00001 diff --git a/resources/images/news/eclicto.png b/resources/images/news/eclicto.png new file mode 100644 index 0000000000000000000000000000000000000000..06d7fe65edff4aea7516e843e1b40db4d94655e1 GIT binary patch literal 401 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*VRoL!zSjv*GOlM^IZdEW2Z{eS-@!yo@^kFWcm zBK>JjzX~6Is%OjOY^$HY z-{{ZY>iG|^e_qb>U*0z9N9{|l!~cKtOGZ3iB;iuLS#sm*vP&tDj-jTeIE( z2=>f2oo>YJ#`uwe!T4s#!%bh6CIEe*TH+c}l9E`GYL#4+3Zxi}3=9o)4UBaSjYABL zt&9w;Oo3c;D+2?bHupRf4Y~O#nQ4_k4F;CFhDN%ErXdE#Rt6SUMkWvqjW0Kp0yQvr My85}Sb4q9e0Ax~|GXMYp literal 0 HcmV?d00001 diff --git a/resources/images/news/eksiazki.png b/resources/images/news/eksiazki.png new file mode 100644 index 0000000000000000000000000000000000000000..6f4f18d9911808064b0cc7c3136dc3e836675b15 GIT binary patch literal 475 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI zAngIhZYQ(tK!Rljj_E*J0gT&!&6&%YAu1zPCizZ`zvf=q{q;<0)!I>#>o=*UXA8V!C8<`)MX5lF!N|bSK-a)n*U&h`(Adhz$jZP>*TCG$z(Cn~4KIp@-29Zxv`U}` n0}EZCA|s0s0}CrtV=DtAAQz}%yQbR@paup{S3j3^P6vnZ@b*FK(qJ&daUXN;#VpI`~`#lB=}u3WY7x3wGoU zE<77A>!SHW;q`^*zdro?P$wt%uiPo%+^eIybDXZ~?a177Y-@n!YF1VkErA{K4~kk1 zmK@G#ls{cpsnZA+ly}j$pALpIAlC$+|?*x$0=H5kDvtKP*Jv&jRp)uyr#b>Uk zwG)$rP0y9petvklZt48cB-7P;b2X(TyBoD%7K;1Tx3bsg;3=u7SCgfk7CbP0l+XkKoap@t literal 0 HcmV?d00001 diff --git a/resources/images/news/interia_sport.png b/resources/images/news/interia_sport.png new file mode 100644 index 0000000000000000000000000000000000000000..06b315847ce48b7a55023c826daa615aeb049088 GIT binary patch literal 626 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87#L@Jx;TbdoIZN#y!T~BiQ^xy?^`$3B0Wd= z@`VK)EH5W{d$)KvnZ@b*FK(qJ&daUXN;#VpI`~`#lB=}u3WY7x3wGoU zE<77A>!SHW;q`^*zdro?P$wt%uiPo%+^eIybDXZ~?a177Y-@n!YF1VkErA{K4~kk1 zmK@G#ls{cpsnZA+ly}j$pALpIAlC$+|?*x$0=H5kDvtKP*Jv&jRp)uyr#b>Uk zwG)$rP0y9petvklZt48cB-7P;b2X(TyBoD%7K;1Tx3bsg;3=u7SCgfk7CbP0l+XkKoap@t literal 0 HcmV?d00001 diff --git a/resources/images/news/legitymizm.png b/resources/images/news/legitymizm.png new file mode 100644 index 0000000000000000000000000000000000000000..027ce91aaa8d6983d6aa1a6d1f8b27d4c088f4eb GIT binary patch literal 808 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87?=V*T^vI!PEVcW?=iVh=9vBd>$yg(#an&C zW~}7Ne{|H#m$N0{!vukl5Qz*8$2hC2i7b^KA#1u7f+n>eIAFtha>0WAJT|V6mTXg# z+T1C2n)m+O+WoR;wwsy0XuSXQd+k2{n)%NIl@2w1?^x)d%zbWGFoVkdJ*VUp6RO0g z73I8P5_}l&pZQakAJYVmJ;_g>@lFY{-XT?;P@5xSys>fS4IraL|JFOEQx6sPuVb9O zn`8Fwjz7EDrX2p5&$xTLP;{mwlL$ZW#n8(%bZTdVrbqPv7((RbL;;AKrKOz4;USkJap| zN;)CaB-)S9%aGRplQ84S)oY)V{|LUjUCt2k_Up#?pF)N5@ zQoXAnc6Z<6JxmPlk(L+d=}qByd11Nk_q*)LVO*8Rv*Xi5PWo&#Gj+0gpf2}evzckr zjFmkp~kMZt_6&qLYO}-#h5Egn~tgP&Nq-zkD zsBc15(2RK^TC+~9C`?Q*pTBuk)wQm|-)q18VrvqW;|!}%xpPhFQI67CC)+s(Nwy^b{b=sn>Mjk259NX7QaT`s$=-&+hxN zd3pGk6Vvk;eqX%wuxayix#v%wy}EfP{_f2{w@ceDz5}K-)e_f;l9a@fRIB8oR3OD* zWMF8ZYhbKvXdGf_Y-MaHJ(Uc*lcu%8R3_pM3cuji&{zXT4nhew?lS0-d9aGd~ErFA9oX=ZSOnVorAw zmfS+)iRTcRP4TWP)ExXBTb@$i^_bn4ynJ?BFmPWGGyeb;Jx^)=NT4zXi&!Ef%y7`qY3iE(Qt)A*AtpLpYoN*OQzjM z>oq~=DZ!K(cB))AG3cXkRJ1el^CR3ljw^l6Vb5_ThAAFf92qX3Bt3=aW;>z>r+8x z-y=%)++_Ws2bi3#)P4AvlW&L~ZwShFUckNgB=rX_arK$t**y=V zL)RI;^&Lk)zD|4J2!jIyWR#r8So8@SYL3yT%%@=geG-ipGSW=w6H}O*WW!?1B-Xiu z&LKf=`(2v$kFm1hD5ZNnba%9I>!Cmh@!|&l_W!tw|HJ>-1UC9dH>8^9o0C%$n`BqT zmgWA@Zzm_Gnk{nTD!Fm#YH23Z%jHyyMSgW<{X1@lw19b`7Fm{4{0yb9xhtix+WbvA zSx#6R_0o#XZ@H~AHxz{GWP41IVOe0{!c5ca>c}Y5lxenv(zGm9+F~jAm9UIxYk18J z=hVe7&x??xLcKmO!FQb@Z%ge*nRV6N>-< literal 0 HcmV?d00001 diff --git a/resources/recipes/di.recipe b/resources/recipes/di.recipe index 3b3f6e5c7c..932d8e5f08 100644 --- a/resources/recipes/di.recipe +++ b/resources/recipes/di.recipe @@ -15,42 +15,42 @@ class DziennikInternautowRecipe(BasicNewsRecipe): 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.' + publisher = u'Dziennik Internaut\u00f3w Sp. z o.o.' + description = u'Internet w \u017cyciu i biznesie. Porady, wywiady, interwencje, bezpiecze\u0144stwo 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') + (u'Dziennik Internaut\u00f3w', 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 + (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in [ (r', ', lambda match: '
'), diff --git a/resources/recipes/eclicto.recipe b/resources/recipes/eclicto.recipe index a1c625b21c..8ef9b8467c 100644 --- a/resources/recipes/eclicto.recipe +++ b/resources/recipes/eclicto.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python -__license__ = 'GPL v3' +__license__ = 'GPL v3' __author__ = 'Mori' __version__ = 'v. 0.1' ''' @@ -11,39 +11,39 @@ from calibre.web.feeds.news import BasicNewsRecipe import re class BlogeClictoRecipe(BasicNewsRecipe): - __author__ = 'Mori' - language = 'pl' + __author__ = 'Mori' + language = 'pl' - title = u'Blog eClicto' - publisher = u'Blog eClicto' - description = u'Blog o e-papierze i e-bookach' + 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*' +''' +fronda.pl +''' + +from calibre.web.feeds.news import BasicNewsRecipe +import re + +class Fronda(BasicNewsRecipe): + title = u'Fronda.pl' + publisher = u'Fronda.pl' + description = u'Portal po\u015bwi\u0119cony - Infformacje' + language = 'pl' + __author__ = u'Tomasz D\u0142ugosz' + oldest_article = 7 + max_articles_per_feed = 100 + use_embedded_content = False + + feeds = [(u'Infformacje', u'http://fronda.pl/news/feed')] + + keep_only_tags = [dict(name='h1', attrs={'class':'big'}), + dict(name='ul', attrs={'class':'about clear'}), + dict(name='div', attrs={'class':'content'})] + preprocess_regexps = [ + (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in + [ (r'Drukuj', lambda match: ''), + (r'

.*

', lambda match: ''), + (r'

.*

', lambda match: ''), + (r'

W.* lektury.*

', lambda match: ''), + (r'

Zobacz t.*?', lambda match: '') ] + ] diff --git a/resources/recipes/interia_fakty.recipe b/resources/recipes/interia_fakty.recipe index cdd245fdd7..63f95f3382 100644 --- a/resources/recipes/interia_fakty.recipe +++ b/resources/recipes/interia_fakty.recipe @@ -10,6 +10,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class InteriaFakty(BasicNewsRecipe): title = u'Interia.pl - Fakty' + description = u'Fakty ze strony interia.pl' language = 'pl' oldest_article = 7 __author__ = u'Tomasz D\u0142ugosz' diff --git a/resources/recipes/interia_sport.recipe b/resources/recipes/interia_sport.recipe index 9c72ee28a7..995dd114a8 100644 --- a/resources/recipes/interia_sport.recipe +++ b/resources/recipes/interia_sport.recipe @@ -11,6 +11,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class InteriaSport(BasicNewsRecipe): title = u'Interia.pl - Sport' + description = u'Sport ze strony interia.pl' language = 'pl' oldest_article = 7 __author__ = u'Tomasz D\u0142ugosz' @@ -30,7 +31,8 @@ class InteriaSport(BasicNewsRecipe): keep_only_tags = [dict(name='div', attrs={'id':'article'})] - remove_tags = [dict(name='div', attrs={'class':'object gallery'})] + remove_tags = [dict(name='div', attrs={'class':'object gallery'}), + dict(name='div', attrs={'class':'box fontSizeSwitch'})] extra_css = ''' .articleDate { diff --git a/resources/recipes/legeartis.recipe b/resources/recipes/legeartis.recipe index 7d5de45035..8365d3639d 100644 --- a/resources/recipes/legeartis.recipe +++ b/resources/recipes/legeartis.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python -__license__ = 'GPL v3' +__license__ = 'GPL v3' __author__ = 'Mori' __version__ = 'v. 0.1' ''' @@ -10,34 +10,34 @@ olgierd.bblog.pl from calibre.web.feeds.news import BasicNewsRecipe class LegeArtisRecipe(BasicNewsRecipe): - __author__ = 'Mori' - language = 'pl' + __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' + title = u'Lege Artis' + publisher = u'Olgierd Rudak' + description = u'Wszystko, co chcieliby\u015bcie wiedzie\u0107 o prawie, ale wstydzicie si\u0119 zapyta\u0107' - 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 = {}) - ] + 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 = {}) + ] diff --git a/resources/recipes/legitymizm.recipe b/resources/recipes/legitymizm.recipe index 468f1b1d6b..e54d2beefd 100644 --- a/resources/recipes/legitymizm.recipe +++ b/resources/recipes/legitymizm.recipe @@ -10,6 +10,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class Legitymizm(BasicNewsRecipe): title = u'Organizacja Monarchist\xf3w Polskich' + description = u'Portal legitymistyczny' language = 'pl' oldest_article = 7 __author__ = u'Tomasz D\u0142ugosz' diff --git a/resources/recipes/michalkiewicz.recipe b/resources/recipes/michalkiewicz.recipe index ba58ba432b..7a1e424f0b 100644 --- a/resources/recipes/michalkiewicz.recipe +++ b/resources/recipes/michalkiewicz.recipe @@ -12,7 +12,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class michalkiewicz(BasicNewsRecipe): title = u'Stanis\u0142aw Michalkiewicz' - desciption = u'Strona autorska * felietony * artyku\u0142y * komentarze' + description = u'Strona autorska * felietony * artyku\u0142y * komentarze' __author__ = u'Tomasz D\u0142ugosz' language = 'pl' oldest_article = 7 diff --git a/resources/recipes/nczas.recipe b/resources/recipes/nczas.recipe index ccf963e43a..6ca6657765 100644 --- a/resources/recipes/nczas.recipe +++ b/resources/recipes/nczas.recipe @@ -12,7 +12,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class NCzas(BasicNewsRecipe): title = u'Najwy\u017cszy Czas!' - desciption = u'Najwy\u017cszy Czas!\nwydanie internetowe' + description = u'Najwy\u017cszy Czas!\nwydanie internetowe' __author__ = u'Tomasz D\u0142ugosz' language = 'pl' oldest_article = 7 diff --git a/resources/recipes/runa.recipe b/resources/recipes/runa.recipe new file mode 100644 index 0000000000..fe30041581 --- /dev/null +++ b/resources/recipes/runa.recipe @@ -0,0 +1,52 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__author__ = 'Mori' +__version__ = 'v. 0.1' +''' +www.runa.pl/blog +''' + +from calibre.web.feeds.news import BasicNewsRecipe +import re + +class FantazmatyRecipe(BasicNewsRecipe): + __author__ = 'Mori' + language = 'pl' + + title = u'Fantazmaty' + publisher = u'Agencja Wydawnicza Runa' + description = u'Blog Agencji Wydawniczej Runa' + + no_stylesheets = True + remove_javascript = True + encoding = 'utf-8' + + oldest_article = 100 + max_articles_per_feed = 100 + + extra_css = ''' + img{float: left; padding-right: 10px; padding-bottom: 5px;} + ''' + + feeds = [ + (u'Fantazmaty', u'http://www.runa.pl/blog/rss.xml') + ] + + remove_tags = [ + dict(name = 'div', attrs = {'class' : 'path'}), + dict(name = 'div', attrs = {'class' : 'drdot'}), + dict(name = 'div', attrs = {'class' : 'picture'}) + ] + + remove_tags_after = [ + dict(name = 'div', attrs = {'class' : 'content'}) + ] + + preprocess_regexps = [ + (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in + [ + (r'.*?
', lambda match: '') + ] + ] \ No newline at end of file