mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Pull from trunk
This commit is contained in:
commit
9ee1ca9d3c
40
resources/recipes/agrogerila.recipe
Normal file
40
resources/recipes/agrogerila.recipe
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
boljevac.blogspot.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
import re
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class AgroGerila(BasicNewsRecipe):
|
||||||
|
title = 'Agro Gerila'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Politicki nekorektan blog.'
|
||||||
|
oldest_article = 45
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
language = 'sr'
|
||||||
|
encoding = 'utf-8'
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = True
|
||||||
|
publication_type = 'blog'
|
||||||
|
extra_css = ' @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: "Trebuchet MS",Trebuchet,Verdana,sans1,sans-serif} .article_description{font-family: sans1, sans-serif} img{margin-bottom: 0.8em; border: 1px solid #333333; padding: 4px } '
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : 'film, blog, srbija'
|
||||||
|
, 'publisher': 'Dry-Na-Nord'
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||||
|
|
||||||
|
feeds = [(u'Posts', u'http://boljevac.blogspot.com/feeds/posts/default')]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for item in soup.findAll(style=True):
|
||||||
|
del item['style']
|
||||||
|
return self.adeify_images(soup)
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ class LiberoNews(BasicNewsRecipe):
|
|||||||
(u'Tecnologia', u'http://www.libero-news.it/rss.jsp?sezione=20'),
|
(u'Tecnologia', u'http://www.libero-news.it/rss.jsp?sezione=20'),
|
||||||
(u'LifeStyle', u'http://www.libero-news.it/rss.jsp?sezione=22'),
|
(u'LifeStyle', u'http://www.libero-news.it/rss.jsp?sezione=22'),
|
||||||
(u'Sport', u'http://www.libero-news.it/rss.jsp?sezione=23'),
|
(u'Sport', u'http://www.libero-news.it/rss.jsp?sezione=23'),
|
||||||
(u'Costume e Società', u' http://www.libero-news.it/rss.jsp?sezione=24'),
|
(u'Costume e Societ\xc3\xa0', u' http://www.libero-news.it/rss.jsp?sezione=24'),
|
||||||
(u'Milano', u'http://www.libero-news.it/rss.jsp?sezione=26'),
|
(u'Milano', u'http://www.libero-news.it/rss.jsp?sezione=26'),
|
||||||
(u'Roma', u'http://www.libero-news.it/rss.jsp?sezione=27'),
|
(u'Roma', u'http://www.libero-news.it/rss.jsp?sezione=27'),
|
||||||
(u'Alimentazione', u'http://www.libero-news.it/rss.jsp?sezione=29')
|
(u'Alimentazione', u'http://www.libero-news.it/rss.jsp?sezione=29')
|
||||||
|
@ -5,7 +5,7 @@ __copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
|
|||||||
www.nin.co.rs
|
www.nin.co.rs
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import re, urllib
|
import re
|
||||||
from calibre import strftime
|
from calibre import strftime
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
@ -16,13 +16,13 @@ class Nin(BasicNewsRecipe):
|
|||||||
publisher = 'NIN d.o.o.'
|
publisher = 'NIN d.o.o.'
|
||||||
category = 'news, politics, Serbia'
|
category = 'news, politics, Serbia'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
|
delay = 1
|
||||||
oldest_article = 15
|
oldest_article = 15
|
||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
needs_subscription = True
|
needs_subscription = True
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
PREFIX = 'http://www.nin.co.rs'
|
PREFIX = 'http://www.nin.co.rs'
|
||||||
INDEX = PREFIX + '/?change_lang=ls'
|
INDEX = PREFIX + '/?change_lang=ls'
|
||||||
LOGIN = PREFIX + '/?logout=true'
|
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
language = 'sr'
|
language = 'sr'
|
||||||
publication_type = 'magazine'
|
publication_type = 'magazine'
|
||||||
@ -41,14 +41,12 @@ class Nin(BasicNewsRecipe):
|
|||||||
|
|
||||||
def get_browser(self):
|
def get_browser(self):
|
||||||
br = BasicNewsRecipe.get_browser()
|
br = BasicNewsRecipe.get_browser()
|
||||||
br.open(self.INDEX)
|
|
||||||
if self.username is not None and self.password is not None:
|
if self.username is not None and self.password is not None:
|
||||||
data = urllib.urlencode({ 'login_name':self.username
|
br.open(self.INDEX)
|
||||||
,'login_password':self.password
|
br.select_form(name='form1')
|
||||||
,'imageField.x':'32'
|
br['login_name' ] = self.username
|
||||||
,'imageField.y':'15'
|
br['login_password'] = self.password
|
||||||
})
|
br.submit()
|
||||||
br.open(self.LOGIN,data)
|
|
||||||
return br
|
return br
|
||||||
|
|
||||||
keep_only_tags =[dict(name='td', attrs={'width':'520'})]
|
keep_only_tags =[dict(name='td', attrs={'width':'520'})]
|
||||||
|
@ -48,6 +48,7 @@ class KOBO(USBMS):
|
|||||||
WINDOWS_MAIN_MEM = '.KOBOEREADER'
|
WINDOWS_MAIN_MEM = '.KOBOEREADER'
|
||||||
|
|
||||||
EBOOK_DIR_MAIN = ''
|
EBOOK_DIR_MAIN = ''
|
||||||
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
class AVANT(USBMS):
|
class AVANT(USBMS):
|
||||||
name = 'Booq Avant Device Interface'
|
name = 'Booq Avant Device Interface'
|
||||||
|
@ -973,8 +973,8 @@ class BooksModel(QAbstractTableModel):
|
|||||||
self.db.set(row, column, val)
|
self.db.set(row, column, val)
|
||||||
self.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), \
|
self.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), \
|
||||||
index, index)
|
index, index)
|
||||||
if column == self.sorted_on[0]:
|
#if column == self.sorted_on[0]:
|
||||||
self.resort()
|
# self.resort()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def set_search_restriction(self, s):
|
def set_search_restriction(self, s):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user