From dd97daee8ea72d993f487356db18defe11690ba4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 16 Feb 2009 12:51:47 -0800 Subject: [PATCH] New recipe for Linux Devices by Oliver Neisner --- src/calibre/gui2/images/news/linuxdevices.png | Bin 0 -> 535 bytes src/calibre/web/feeds/recipes/__init__.py | 2 +- .../web/feeds/recipes/recipe_linuxdevices.py | 80 ++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 src/calibre/gui2/images/news/linuxdevices.png create mode 100644 src/calibre/web/feeds/recipes/recipe_linuxdevices.py diff --git a/src/calibre/gui2/images/news/linuxdevices.png b/src/calibre/gui2/images/news/linuxdevices.png new file mode 100644 index 0000000000000000000000000000000000000000..a6782b9e41acf282f55412a9032dc931aaf3c457 GIT binary patch literal 535 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87#JNqT^vI!PA{Fb+lx6+pl$!jcdN2h%r0u2 zh~iLs!QIlZfM38{al)m0>Ki`D>f}yg$q`w5#7Ua_U{nD2#04xa7X%)w?w*sp@%65q zI~+e9ZnQi+v%mga55p|G6s9R6wQn3`$Oq^0%?6 zbclwWdr%~tTrc?jrB;n7_lGkgy(?|bJh_;}z`3NXzkJudTTaVaF6`m=og8)ZvvE0l zK@7`*zpIkj^pa#ayj1qA^bwmohh=SmQbhjtLI&OyV%15vGOFKP|Ms~whTAUMm2p+4 zNw$4F*UOz2>`tevGFYz`udr`ZeRm>f4)gvS|5jYEh*7oV2+?=g%^9nN|tcV5$q&6Jls$WoTw)WDL=u%eYP$sDZ)L)z4*}Q$iB}&gjLx literal 0 HcmV?d00001 diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 761b5ab4de..dd2b81c3a8 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -28,7 +28,7 @@ recipe_modules = ['recipe_' + r for r in ( 'la_tercera', 'el_mercurio_chile', 'la_cuarta', 'lanacion_chile', 'la_segunda', 'jb_online', 'estadao', 'o_globo', 'vijesti', 'elmundo', 'the_oz', 'honoluluadvertiser', 'starbulletin', 'exiled', 'indy_star', 'dna', - 'pobjeda', 'chicago_breaking_news', 'glasgow_herald', + 'pobjeda', 'chicago_breaking_news', 'glasgow_herald', 'linuxdevices', )] import re, imp, inspect, time, os diff --git a/src/calibre/web/feeds/recipes/recipe_linuxdevices.py b/src/calibre/web/feeds/recipes/recipe_linuxdevices.py new file mode 100644 index 0000000000..04db6b02d5 --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_linuxdevices.py @@ -0,0 +1,80 @@ +__license__ = 'GPL v3' +__copyright__ = '2008, Kovid Goyal ' + +''' +Fetch Linuxdevices. +''' + +from calibre.web.feeds.news import BasicNewsRecipe + + +class Sueddeutsche(BasicNewsRecipe): + + title = u'Linuxdevices' + description = 'News about Linux driven Hardware' + __author__ = 'Oliver Niesner' + use_embedded_content = False + timefmt = ' [%a, %d %b %Y]' + language = _('English') + max_articles_per_feed = 50 + no_stylesheets = True + encoding = 'latin1' + + remove_tags_after = [dict(id='nointelliTXT')] + filter_regexps = [r'ad\.doubleclick\.net'] + + + remove_tags = [dict(name='div', attrs={'class':'bannerSuperBanner'}), + dict(name='div', attrs={'class':'bannerSky'}), + dict(name='div', attrs={'class':'footerLinks'}), + dict(name='div', attrs={'class':'seitenanfang'}), + dict(name='td', attrs={'class':'mar5'}), + dict(name='td', attrs={'class':'mar5'}), + dict(name='table', attrs={'class':'pageAktiv'}), + dict(name='table', attrs={'class':'xartable'}), + dict(name='table', attrs={'class':'wpnavi'}), + dict(name='table', attrs={'class':'bgcontent absatz'}), + dict(name='table', attrs={'class':'footer'}), + dict(name='table', attrs={'class':'artikelBox'}), + dict(name='table', attrs={'class':'kommentare'}), + dict(name='table', attrs={'class':'pageBoxBot'}), + #dict(name='table', attrs={'with':'100%'}), + dict(name='td', attrs={'nowrap':'nowrap'}), + dict(name='td', attrs={'valign':'middle'}), + dict(name='td', attrs={'align':'left'}), + dict(name='td', attrs={'align':'center'}), + dict(name='td', attrs={'height':'5'}), + dict(name='div', attrs={'class':'artikelBox navigatorBox'}), + dict(name='div', attrs={'class':'similar-article-box'}), + dict(name='div', attrs={'class':'videoBigHack'}), + dict(name='td', attrs={'class':'artikelDruckenRight'}), + dict(name='td', attrs={'class':'width="200"'}), + dict(name='a', attrs={'href':'/news'}), + dict(name='a', attrs={'href':'/'}), + dict(name='a', attrs={'href':'/articles'}), + dict(name='a', attrs={'href':'/cgi-bin/survey/survey.cgi'}), + dict(name='a', attrs={'href':'/cgi-bin/board/UltraBoard.pl'}), + dict(name='iframe'), + dict(name='form'), + #dict(name='tr', attrs={'td':'Click here to learn'}), + dict(name='span', attrs={'class':'hidePrint'}), + dict(id='headerLBox'), + dict(id='nointelliTXT'), + dict(id='rechteSpalte'), + dict(id='newsticker-list-small'), + dict(id='ntop5'), + dict(id='ntop5send'), + dict(id='ntop5commented'), + dict(id='nnav-bgheader'), + dict(id='nnav-headerteaser'), + dict(id='nnav-head'), + dict(id='nnav-top'), + dict(id='nnav-logodiv'), + dict(id='nnav-logo'), + dict(id='nnav-oly'), + dict(id='readcomment')] + + + + feeds = [ (u'Linuxdevices', u'http://www.linuxdevices.com/backend/headlines.rss') ] +