mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
5999d4a017
@ -5,7 +5,6 @@ www.diariobae.com
|
|||||||
'''
|
'''
|
||||||
from calibre import strftime
|
from calibre import strftime
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
from calibre.ebooks.BeautifulSoup import Tag
|
|
||||||
|
|
||||||
class BsAsEconomico(BasicNewsRecipe):
|
class BsAsEconomico(BasicNewsRecipe):
|
||||||
title = 'Buenos Aires Economico'
|
title = 'Buenos Aires Economico'
|
||||||
|
@ -1,20 +1,55 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class ZamanRecipe(BasicNewsRecipe):
|
class Zaman (BasicNewsRecipe):
|
||||||
title = u'Zaman'
|
|
||||||
__author__ = u'Deniz Og\xfcz'
|
title = u'ZAMAN Gazetesi'
|
||||||
|
__author__ = u'thomass'
|
||||||
|
oldest_article = 2
|
||||||
|
max_articles_per_feed =100
|
||||||
|
# no_stylesheets = True
|
||||||
|
#delay = 1
|
||||||
|
#use_embedded_content = False
|
||||||
|
encoding = 'ISO 8859-9'
|
||||||
|
publisher = 'Zaman'
|
||||||
|
category = 'news, haberler,TR,gazete'
|
||||||
language = 'tr'
|
language = 'tr'
|
||||||
oldest_article = 1
|
publication_type = 'newspaper '
|
||||||
max_articles_per_feed = 10
|
extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
|
||||||
|
conversion_options = {
|
||||||
|
'tags' : category
|
||||||
|
,'language' : language
|
||||||
|
,'publisher' : publisher
|
||||||
|
,'linearize_tables': False
|
||||||
|
}
|
||||||
|
cover_img_url = 'https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/188140_81722291869_2111820_n.jpg'
|
||||||
|
masthead_url = 'http://medya.zaman.com.tr/extentions/zaman.com.tr/img/section/logo-section.png'
|
||||||
|
|
||||||
cover_url = 'http://medya.zaman.com.tr/zamantryeni/pics/zamanonline.gif'
|
|
||||||
feeds = [(u'Gundem', u'http://www.zaman.com.tr/gundem.rss'),
|
|
||||||
(u'Son Dakika', u'http://www.zaman.com.tr/sondakika.rss'),
|
|
||||||
(u'Spor', u'http://www.zaman.com.tr/spor.rss'),
|
|
||||||
(u'Ekonomi', u'http://www.zaman.com.tr/ekonomi.rss'),
|
|
||||||
(u'Politika', u'http://www.zaman.com.tr/politika.rss'),
|
|
||||||
(u'D\u0131\u015f Haberler', u'http://www.zaman.com.tr/dishaberler.rss'),
|
|
||||||
(u'Yazarlar', u'http://www.zaman.com.tr/yazarlar.rss'),]
|
|
||||||
|
|
||||||
def print_version(self, url):
|
keep_only_tags = [dict(name='div', attrs={'id':[ 'news-detail-content']}), dict(name='td', attrs={'class':['columnist-detail','columnist_head']}) ]
|
||||||
return url.replace('www.zaman.com.tr/haber.do?', 'www.zaman.com.tr/yazdir.do?')
|
remove_tags = [ dict(name='div', attrs={'id':['news-detail-news-text-font-size','news-detail-gallery','news-detail-news-bottom-social']}),dict(name='div', attrs={'class':['radioEmbedBg','radyoProgramAdi']}),dict(name='a', attrs={'class':['webkit-html-attribute-value webkit-html-external-link']}),dict(name='table', attrs={'id':['yaziYorumTablosu']}),dict(name='img', attrs={'src':['http://medya.zaman.com.tr/pics/paylas.gif','http://medya.zaman.com.tr/extentions/zaman.com.tr/img/columnist/ma-16.png']})]
|
||||||
|
|
||||||
|
|
||||||
|
#remove_attributes = ['width','height']
|
||||||
|
remove_empty_feeds= True
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
( u'Anasayfa', u'http://www.zaman.com.tr/anasayfa.rss'),
|
||||||
|
( u'Son Dakika', u'http://www.zaman.com.tr/sondakika.rss'),
|
||||||
|
( u'En çok Okunanlar', u'http://www.zaman.com.tr/max_all.rss'),
|
||||||
|
( u'Gündem', u'http://www.zaman.com.tr/gundem.rss'),
|
||||||
|
( u'Yazarlar', u'http://www.zaman.com.tr/yazarlar.rss'),
|
||||||
|
( u'Politika', u'http://www.zaman.com.tr/politika.rss'),
|
||||||
|
( u'Ekonomi', u'http://www.zaman.com.tr/ekonomi.rss'),
|
||||||
|
( u'Dış Haberler', u'http://www.zaman.com.tr/dishaberler.rss'),
|
||||||
|
( u'Yorumlar', u'http://www.zaman.com.tr/yorumlar.rss'),
|
||||||
|
( u'Röportaj', u'http://www.zaman.com.tr/roportaj.rss'),
|
||||||
|
( u'Spor', u'http://www.zaman.com.tr/spor.rss'),
|
||||||
|
( u'Kürsü', u'http://www.zaman.com.tr/kursu.rss'),
|
||||||
|
( u'Kültür Sanat', u'http://www.zaman.com.tr/kultursanat.rss'),
|
||||||
|
( u'Televizyon', u'http://www.zaman.com.tr/televizyon.rss'),
|
||||||
|
( u'Manşet', u'http://www.zaman.com.tr/manset.rss'),
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
@ -101,6 +101,9 @@ class ANDROID(USBMS):
|
|||||||
# ZTE
|
# ZTE
|
||||||
0x19d2 : { 0x1353 : [0x226] },
|
0x19d2 : { 0x1353 : [0x226] },
|
||||||
|
|
||||||
|
# Advent
|
||||||
|
0x0955 : { 0x7100 : [0x9999] }, # This is the same as the Notion Ink Adam
|
||||||
|
|
||||||
}
|
}
|
||||||
EBOOK_DIR_MAIN = ['eBooks/import', 'wordplayer/calibretransfer', 'Books']
|
EBOOK_DIR_MAIN = ['eBooks/import', 'wordplayer/calibretransfer', 'Books']
|
||||||
EXTRA_CUSTOMIZATION_MESSAGE = _('Comma separated list of directories to '
|
EXTRA_CUSTOMIZATION_MESSAGE = _('Comma separated list of directories to '
|
||||||
|
@ -5,8 +5,6 @@ __license__ = 'GPL v3'
|
|||||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import urllib2
|
|
||||||
|
|
||||||
from PyQt4.Qt import (QPixmap, QSize, QWidget, Qt, pyqtSignal, QUrl,
|
from PyQt4.Qt import (QPixmap, QSize, QWidget, Qt, pyqtSignal, QUrl,
|
||||||
QPropertyAnimation, QEasingCurve, QApplication, QFontInfo,
|
QPropertyAnimation, QEasingCurve, QApplication, QFontInfo,
|
||||||
QSizePolicy, QPainter, QRect, pyqtProperty, QLayout, QPalette, QMenu)
|
QSizePolicy, QPainter, QRect, pyqtProperty, QLayout, QPalette, QMenu)
|
||||||
|
@ -30,6 +30,9 @@ class ArchiveOrgStore(BasicStoreConfig, OpenSearchStore):
|
|||||||
The opensearch feed only returns a subset of formats that are available.
|
The opensearch feed only returns a subset of formats that are available.
|
||||||
We want to get a list of all formats that the user can get.
|
We want to get a list of all formats that the user can get.
|
||||||
'''
|
'''
|
||||||
|
from calibre import browser
|
||||||
|
from contextlib import closing
|
||||||
|
from lxml import html
|
||||||
br = browser()
|
br = browser()
|
||||||
with closing(br.open(search_result.detail_item, timeout=timeout)) as nf:
|
with closing(br.open(search_result.detail_item, timeout=timeout)) as nf:
|
||||||
idata = html.fromstring(nf.read())
|
idata = html.fromstring(nf.read())
|
||||||
|
@ -7,7 +7,6 @@ __copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
|||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import random
|
import random
|
||||||
import re
|
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
from lxml import html
|
from lxml import html
|
||||||
|
@ -575,8 +575,9 @@ class TagsView(QTreeView): # {{{
|
|||||||
expanded_categories, state_map = self.get_state()
|
expanded_categories, state_map = self.get_state()
|
||||||
self._model.rebuild_node_tree(state_map=state_map)
|
self._model.rebuild_node_tree(state_map=state_map)
|
||||||
for category in expanded_categories:
|
for category in expanded_categories:
|
||||||
if self._model.index_for_category(category) is not None:
|
idx = self._model.index_for_category(category)
|
||||||
self.expand(self._model.index_for_category(category))
|
if idx is not None and idx.isValid():
|
||||||
|
self.expand(idx)
|
||||||
self.show_item_at_path(path)
|
self.show_item_at_path(path)
|
||||||
|
|
||||||
def show_item_at_path(self, path, box=False,
|
def show_item_at_path(self, path, box=False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user