mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Sync to trunk
This commit is contained in:
commit
46911ad711
5
setup.py
5
setup.py
@ -415,8 +415,9 @@ if __name__ == '__main__':
|
||||
ext_modules.append(Extension('calibre.plugins.winutil',
|
||||
sources=['src/calibre/utils/windows/winutil.c'],
|
||||
libraries=['shell32', 'setupapi'],
|
||||
include_dirs=['C:/WinDDK/6001.18001/inc/api/',
|
||||
'C:/WinDDK/6001.18001/inc/crt/'],
|
||||
include_dirs=os.environ.get('INCLUDE',
|
||||
'C:/WinDDK/6001.18001/inc/api/;'
|
||||
'C:/WinDDK/6001.18001/inc/crt/').split(';'),
|
||||
extra_compile_args=['/X']
|
||||
))
|
||||
if isosx:
|
||||
|
@ -267,6 +267,12 @@ class MobiReader(object):
|
||||
'xx-large' : '6',
|
||||
}
|
||||
for tag in root.iter(etree.Element):
|
||||
if tag.tag in ('country-region', 'place', 'placetype', 'placename',
|
||||
'state', 'city'):
|
||||
tag.tag = 'span'
|
||||
for key in tag.attrib.keys():
|
||||
tag.attrib.pop(key)
|
||||
continue
|
||||
styles, attrib = [], tag.attrib
|
||||
if attrib.has_key('style'):
|
||||
style = attrib.pop('style').strip()
|
||||
|
BIN
src/calibre/gui2/images/news/infobae.png
Normal file
BIN
src/calibre/gui2/images/news/infobae.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 425 B |
BIN
src/calibre/gui2/images/news/pagina12.png
Normal file
BIN
src/calibre/gui2/images/news/pagina12.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 414 B |
@ -22,7 +22,7 @@ recipe_modules = ['recipe_' + r for r in (
|
||||
'time_magazine', 'endgadget', 'fudzilla', 'nspm_int', 'nspm', 'pescanik',
|
||||
'spiegel_int', 'themarketticker', 'tomshardware', 'xkcd', 'ftd', 'zdnet',
|
||||
'joelonsoftware', 'telepolis', 'common_dreams', 'nin', 'tomshardware_de',
|
||||
|
||||
'pagina12', 'infobae',
|
||||
)]
|
||||
|
||||
import re, imp, inspect, time, os
|
||||
|
@ -6,7 +6,7 @@ __copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
||||
clarin.com
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
from calibre import strftime
|
||||
|
||||
class Clarin(BasicNewsRecipe):
|
||||
title = 'Clarin'
|
||||
@ -15,7 +15,9 @@ class Clarin(BasicNewsRecipe):
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 100
|
||||
use_embedded_content = False
|
||||
cover_url = 'http://www.clarin.com/shared/v10/img/Hd/lg_Clarin.gif'
|
||||
no_stylesheets = True
|
||||
cover_url = strftime('http://www.clarin.com/diario/%Y/%m/%d/portada.jpg')
|
||||
|
||||
html2lrf_options = [
|
||||
'--comment', description
|
||||
, '--base-font-size', '10'
|
||||
@ -44,4 +46,5 @@ class Clarin(BasicNewsRecipe):
|
||||
artl = article.get('link', None)
|
||||
rest = artl.partition('-0')[-1]
|
||||
lmain = rest.partition('.')[0]
|
||||
return 'http://www.servicios.clarin.com/notas/jsp/clarin/v9/notas/imprimir.jsp?pagid=' + lmain
|
||||
return 'http://www.servicios.clarin.com/notas/jsp/clarin/v9/notas/imprimir.jsp?pagid=' + lmain
|
||||
|
40
src/calibre/web/feeds/recipes/recipe_infobae.py
Normal file
40
src/calibre/web/feeds/recipes/recipe_infobae.py
Normal file
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
infobae.com
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Infobae(BasicNewsRecipe):
|
||||
title = 'Infobae.com'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Informacion Libre las 24 horas'
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
encoding = 'iso-8859-1'
|
||||
cover_url = 'http://www.infobae.com/imgs/header/header.gif'
|
||||
|
||||
html2lrf_options = [
|
||||
'--comment' , description
|
||||
, '--category' , 'news, Argentina'
|
||||
, '--publisher' , 'Infobae.com'
|
||||
]
|
||||
|
||||
|
||||
|
||||
feeds = [
|
||||
(u'Noticias' , u'http://www.infobae.com/adjuntos/html/RSS/hoy.xml' )
|
||||
,(u'Salud' , u'http://www.infobae.com/adjuntos/html/RSS/salud.xml' )
|
||||
,(u'Tecnologia', u'http://www.infobae.com/adjuntos/html/RSS/tecnologia.xml')
|
||||
,(u'Deportes' , u'http://www.infobae.com/adjuntos/html/RSS/deportes.xml' )
|
||||
]
|
||||
|
||||
def print_version(self, url):
|
||||
main, sep, article_part = url.partition('contenidos/')
|
||||
article_id, rsep, rrest = article_part.partition('-')
|
||||
return u'http://www.infobae.com/notas/nota_imprimir.php?Idx=' + article_id
|
39
src/calibre/web/feeds/recipes/recipe_pagina12.py
Normal file
39
src/calibre/web/feeds/recipes/recipe_pagina12.py
Normal file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
pagina12.com.ar
|
||||
'''
|
||||
|
||||
from calibre import strftime
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Pagina12(BasicNewsRecipe):
|
||||
title = u'Pagina/12'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Noticias de Argentina y el resto del mundo'
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
encoding = 'cp1252'
|
||||
cover_url = strftime('http://www.pagina12.com.ar/fotos/%Y%m%d/diario/TAPAN.jpg')
|
||||
|
||||
html2lrf_options = [
|
||||
'--comment' , description
|
||||
, '--category' , 'news, Argentina'
|
||||
, '--publisher' , 'La Pagina S.A.'
|
||||
]
|
||||
|
||||
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'id':'volver'})
|
||||
,dict(name='div', attrs={'id':'logo' })
|
||||
]
|
||||
|
||||
|
||||
feeds = [(u'Pagina/12', u'http://www.pagina12.com.ar/diario/rss/principal.xml')]
|
||||
|
||||
def print_version(self, url):
|
||||
return url.replace('http://www.pagina12.com.ar/','http://www.pagina12.com.ar/imprimir/')
|
Loading…
x
Reference in New Issue
Block a user