mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
IGN:...
This commit is contained in:
parent
5258911488
commit
6b73df3c43
@ -4,6 +4,7 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
''' Create an OSX installer '''
|
||||
|
||||
import sys, re, os, shutil, subprocess, stat, glob, zipfile, plistlib
|
||||
sys.path = sys.path[1:]
|
||||
l = {}
|
||||
exec open('setup.py').read() in l
|
||||
VERSION = l['VERSION']
|
||||
@ -210,7 +211,6 @@ os.execv(python, args)
|
||||
|stat.S_IWUSR|stat.S_IROTH|stat.S_IRGRP)
|
||||
|
||||
|
||||
self.add_plugins()
|
||||
print 'Adding fontconfig'
|
||||
for f in glob.glob(os.path.expanduser('~/fontconfig-bundled/*')):
|
||||
dest = os.path.join(frameworks_dir, os.path.basename(f))
|
||||
@ -222,6 +222,8 @@ os.execv(python, args)
|
||||
shutil.rmtree(dst)
|
||||
shutil.copytree('/usr/local/etc/fonts', dst, symlinks=False)
|
||||
|
||||
self.add_plugins()
|
||||
|
||||
print
|
||||
print 'Adding IPython'
|
||||
dst = os.path.join(resource_dir, 'lib', 'python2.6', 'IPython')
|
||||
|
@ -16,7 +16,7 @@ if iswindows:
|
||||
import win32process
|
||||
_windows_null_file = open(os.devnull, 'wb')
|
||||
|
||||
isnewosx = isosx and getattr(sys, 'new_app_bundle')
|
||||
isnewosx = isosx and getattr(sys, 'new_app_bundle', False)
|
||||
|
||||
class Worker(object):
|
||||
'''
|
||||
|
@ -9,8 +9,8 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class TelegraphUK(BasicNewsRecipe):
|
||||
title = u'Telegraph.co.uk'
|
||||
__author__ = 'Darko Miletic and Sujata Raman'
|
||||
description = 'News from United Kingdom'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'News from United Kingdom'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
@ -18,21 +18,21 @@ class TelegraphUK(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
|
||||
extra_css = '''
|
||||
h1{font-family :Arial,Helvetica,sans-serif; font-size:large; color:#666666}
|
||||
h2{font-family :Arial,Helvetica,sans-serif; font-size:small; color:#444444}
|
||||
.story{font-family :Arial,Helvetica,sans-serif; font-size: x-small; color:#444444 }
|
||||
h1{font-family :Arial,Helvetica,sans-serif; font-size:large; }
|
||||
h2{font-family :Arial,Helvetica,sans-serif; font-size:x-small; color:#444444}
|
||||
.story{font-family :Arial,Helvetica,sans-serif; font-size: x-small;}
|
||||
.byline{color:#666666; font-family :Arial,Helvetica,sans-serif; font-size: xx-small;}
|
||||
a{color:#234B7B; }
|
||||
.imageExtras{color:#666666; font-family :Arial,Helvetica,sans-serif; font-size: xx-small;}
|
||||
'''
|
||||
|
||||
keep_only_tags = [
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':'storyHead'})
|
||||
,dict(name='div', attrs={'class':'story' })
|
||||
#,dict(name='div', attrs={'class':['slideshowHD gutterUnder',"twoThirds gutter","caption" ] })
|
||||
#,dict(name='div', attrs={'class':['slideshowHD gutterUnder',"twoThirds gutter","caption" ] })
|
||||
]
|
||||
remove_tags = [dict(name='div', attrs={'class':['related_links_inline',"imgindex","next","prev","gutterUnder"]})]
|
||||
|
||||
|
||||
feeds = [
|
||||
(u'UK News' , u'http://www.telegraph.co.uk/news/uknews/rss' )
|
||||
,(u'World News' , u'http://www.telegraph.co.uk/news/worldnews/rss' )
|
||||
@ -47,12 +47,12 @@ class TelegraphUK(BasicNewsRecipe):
|
||||
]
|
||||
|
||||
def get_article_url(self, article):
|
||||
|
||||
|
||||
url = article.get('guid', None)
|
||||
|
||||
|
||||
if 'picture-galleries' in url or 'pictures' in url or 'picturegalleries' in url :
|
||||
url = None
|
||||
|
||||
|
||||
return url
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user