Merged from trnk

This commit is contained in:
JimmXinu 2013-03-14 17:16:59 -05:00
commit 594582a9d8
28 changed files with 1565 additions and 1270 deletions

View File

@ -1,7 +1,7 @@
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
class Archeowiesci(BasicNewsRecipe): class Archeowiesci(BasicNewsRecipe):
title = u'Archeowiesci' title = u'Archeowieści'
__author__ = 'fenuks' __author__ = 'fenuks'
category = 'archeology' category = 'archeology'
language = 'pl' language = 'pl'

View File

@ -0,0 +1,43 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = u'Łukasz Grąbczewski 2013'
__version__ = '1.0'
'''
bachormagazyn.pl
'''
from calibre.web.feeds.news import BasicNewsRecipe
class bachormagazyn(BasicNewsRecipe):
__author__ = u'Łukasz Grączewski'
title = u'Bachor Magazyn'
description = u'Alternatywny magazyn o alternatywach rodzicielstwa'
language = 'pl'
publisher = 'Bachor Mag.'
publication_type = 'magazine'
masthead_url = 'http://bachormagazyn.pl/wp-content/uploads/2011/10/bachor_header1.gif'
no_stylesheets = True
remove_javascript = True
use_embedded_content = False
remove_empty_feeds = True
oldest_article = 32 #monthly +1
max_articles_per_feed = 100
feeds = [
(u'Bezradnik dla nieudacznych rodziców', u'http://bachormagazyn.pl/feed/')
]
keep_only_tags = []
keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'content'}))
remove_tags = []
remove_tags.append(dict(attrs = {'id' : 'nav-above'}))
remove_tags.append(dict(attrs = {'id' : 'nav-below'}))
remove_tags.append(dict(attrs = {'id' : 'comments'}))
remove_tags.append(dict(attrs = {'class' : 'entry-info'}))
remove_tags.append(dict(attrs = {'class' : 'comments-link'}))
remove_tags.append(dict(attrs = {'class' : 'sharedaddy sd-sharing-enabled'}))

View File

@ -0,0 +1,66 @@
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
'''
Fetch Computerwoche.
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Computerwoche(BasicNewsRecipe):
title = 'Computerwoche'
description = 'german computer newspaper'
language = 'de'
__author__ = 'Maria Seliger'
use_embedded_content = False
timefmt = ' [%d %b %Y]'
max_articles_per_feed = 15
linearize_tables = True
no_stylesheets = True
remove_stylesheets = True
remove_javascript = True
encoding = 'utf-8'
html2epub_options = 'base_font_size=10'
summary_length = 100
auto_cleanup = True
extra_css = '''
h2{font-family:Arial,Helvetica,sans-serif; font-size: x-small; color: #003399;}
a{font-family:Arial,Helvetica,sans-serif; font-size: x-small; font-style:italic;}
.dachzeile p{font-family:Arial,Helvetica,sans-serif; font-size: x-small; }
h1{ font-family:Arial,Helvetica,sans-serif; font-size:x-large; font-weight:bold;}
.artikelTeaser{font-family:Arial,Helvetica,sans-serif; font-size: x-small; font-weight:bold; }
body{font-family:Arial,Helvetica,sans-serif; }
.photo {font-family:Arial,Helvetica,sans-serif; font-size: x-small; color: #666666;} '''
feeds = [ ('Computerwoche', 'http://rss.feedsportal.com/c/312/f/4414/index.rss'),
('IDG Events', 'http://rss.feedsportal.com/c/401/f/7544/index.rss'),
('Computerwoche Jobs und Karriere', 'http://rss.feedsportal.com/c/312/f/434082/index.rss'),
('Computerwoche BI und ECM', 'http://rss.feedsportal.com/c/312/f/434083/index.rss'),
('Computerwoche Cloud Computing', 'http://rss.feedsportal.com/c/312/f/534647/index.rss'),
('Computerwoche Compliance und Recht', 'http://rss.feedsportal.com/c/312/f/434084/index.rss'),
('Computerwoche CRM', 'http://rss.feedsportal.com/c/312/f/434085/index.rss'),
('Computerwoche Data Center und Server', 'http://rss.feedsportal.com/c/312/f/434086/index.rss'),
('Computerwoche ERP', 'http://rss.feedsportal.com/c/312/f/434087/index.rss'),
('Computerwoche IT Macher', 'http://rss.feedsportal.com/c/312/f/534646/index.rss'),
('Computerwoche IT-Services', 'http://rss.feedsportal.com/c/312/f/434089/index.rss'),
('Computerwoche IT-Strategie', 'http://rss.feedsportal.com/c/312/f/434090/index.rss'),
('Computerwoche Mittelstands-IT', 'http://rss.feedsportal.com/c/312/f/434091/index.rss'),
('Computerwoche Mobile und Wireless', 'http://rss.feedsportal.com/c/312/f/434092/index.rss'),
('Computerwoche Netzwerk', 'http://rss.feedsportal.com/c/312/f/434093/index.rss'),
('Computerwoche Notebook und PC', 'http://rss.feedsportal.com/c/312/f/434094/index.rss'),
('Computerwoche Office und Tools', 'http://rss.feedsportal.com/c/312/f/434095/index.rss'),
('Computerwoche Security', 'http://rss.feedsportal.com/c/312/f/434098/index.rss'),
('Computerwoche SOA und BPM', 'http://rss.feedsportal.com/c/312/f/434099/index.rss'),
('Computerwoche Software Infrastruktur', 'http://rss.feedsportal.com/c/312/f/434096/index.rss'),
('Computerwoche Storage', 'http://rss.feedsportal.com/c/312/f/534645/index.rss'),
('Computerwoche VoIP und TK', 'http://rss.feedsportal.com/c/312/f/434102/index.rss'),
('Computerwoche Web', 'http://rss.feedsportal.com/c/312/f/434103/index.rss'),
('Computerwoche Home-IT', 'http://rss.feedsportal.com/c/312/f/434104/index.rss')]
def print_version(self, url):
return url.replace ('/a/', '/a/print/')

View File

@ -18,6 +18,7 @@ class FrazPC(BasicNewsRecipe):
max_articles_per_feed = 100 max_articles_per_feed = 100
use_embedded_content = False use_embedded_content = False
no_stylesheets = True no_stylesheets = True
remove_empty_feeds = True
cover_url='http://www.frazpc.pl/images/logo.png' cover_url='http://www.frazpc.pl/images/logo.png'
feeds = [ feeds = [
(u'Aktualno\u015bci', u'http://www.frazpc.pl/feed/aktualnosci'), (u'Aktualno\u015bci', u'http://www.frazpc.pl/feed/aktualnosci'),

View File

@ -1,5 +1,5 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008-2012, Darko Miletic <darko.miletic at gmail.com>' __copyright__ = '2008-2013, Darko Miletic <darko.miletic at gmail.com>'
''' '''
harpers.org - paid subscription/ printed issue articles harpers.org - paid subscription/ printed issue articles
This recipe only get's article's published in text format This recipe only get's article's published in text format
@ -72,7 +72,8 @@ class Harpers_full(BasicNewsRecipe):
#go to the current issue #go to the current issue
soup1 = self.index_to_soup(currentIssue_url) soup1 = self.index_to_soup(currentIssue_url)
date = re.split('\s\|\s',self.tag_to_string(soup1.head.title.string))[0] currentIssue_title = self.tag_to_string(soup1.head.title.string)
date = re.split('\s\|\s',currentIssue_title)[0]
self.timefmt = u' [%s]'%date self.timefmt = u' [%s]'%date
#get cover #get cover
@ -84,12 +85,13 @@ class Harpers_full(BasicNewsRecipe):
count = 0 count = 0
for item in soup1.findAll('div', attrs={'class':'articleData'}): for item in soup1.findAll('div', attrs={'class':'articleData'}):
text_links = item.findAll('h2') text_links = item.findAll('h2')
if text_links:
for text_link in text_links: for text_link in text_links:
if count == 0: if count == 0:
count = 1 count = 1
else: else:
url = text_link.a['href'] url = text_link.a['href']
title = text_link.a.contents[0] title = self.tag_to_string(text_link.a)
date = strftime(' %B %Y') date = strftime(' %B %Y')
articles.append({ articles.append({
'title' :title 'title' :title
@ -97,14 +99,9 @@ class Harpers_full(BasicNewsRecipe):
,'url' :url ,'url' :url
,'description':'' ,'description':''
}) })
return [(soup1.head.title.string, articles)] return [(currentIssue_title, articles)]
def print_version(self, url): def print_version(self, url):
return url + '?single=1' return url + '?single=1'
def cleanup(self):
soup = self.index_to_soup('http://harpers.org/')
signouturl=self.tag_to_string(soup.find('li', attrs={'class':'subLogOut'}).findNext('li').a['href'])
self.log(signouturl)
self.browser.open(signouturl)

BIN
recipes/icons/gildia_pl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
recipes/icons/nowy_obywatel.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

View File

@ -7,6 +7,10 @@ class AdvancedUserRecipe1295262156(BasicNewsRecipe):
oldest_article = 7 oldest_article = 7
language = 'de' language = 'de'
max_articles_per_feed = 100 max_articles_per_feed = 100
no_stylesheets = True
auto_cleanup = True
encoding='iso-8859-1'
feeds = [(u'kath.net', u'http://www.kath.net/2005/xml/index.xml')] feeds = [(u'kath.net', u'http://www.kath.net/2005/xml/index.xml')]

View File

@ -16,6 +16,7 @@ class KopalniaWiedzy(BasicNewsRecipe):
max_articles_per_feed = 100 max_articles_per_feed = 100
INDEX = u'http://kopalniawiedzy.pl/' INDEX = u'http://kopalniawiedzy.pl/'
remove_javascript = True remove_javascript = True
remove_empty_feeds = True
no_stylesheets = True no_stylesheets = True
remove_tags = [{'name':'p', 'attrs': {'class': 'keywords'}}, {'name':'div', 'attrs': {'class':'sexy-bookmarks sexy-bookmarks-bg-caring'}}, {'name':'div', 'attrs': {'class':'article-time-and-cat'}}, {'name':'p', 'attrs': {'class':'tags'}}] remove_tags = [{'name':'p', 'attrs': {'class': 'keywords'}}, {'name':'div', 'attrs': {'class':'sexy-bookmarks sexy-bookmarks-bg-caring'}}, {'name':'div', 'attrs': {'class':'article-time-and-cat'}}, {'name':'p', 'attrs': {'class':'tags'}}]

View File

@ -3,7 +3,7 @@ from calibre.ebooks.BeautifulSoup import BeautifulSoup as bs
class KurierGalicyjski(BasicNewsRecipe): class KurierGalicyjski(BasicNewsRecipe):
title = u'Kurier Galicyjski' title = u'Kurier Galicyjski'
__author__ = 'fenuks' __author__ = 'fenuks'
#description = u'' description = u'Kurier Galicyjski - największa gazeta dla Polaków na Ukrainie. Bieżące wydarzenia z życia polskiej mniejszości, historia, kultura, polityka, reportaże.'
category = 'news' category = 'news'
language = 'pl' language = 'pl'
cover_url = 'http://www.duszki.pl/Kurier_galicyjski_bis2_small.gif' cover_url = 'http://www.duszki.pl/Kurier_galicyjski_bis2_small.gif'

View File

@ -3,7 +3,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
class KurierSzczecinski(BasicNewsRecipe): class KurierSzczecinski(BasicNewsRecipe):
title = u'Kurier Szczeci\u0144ski' title = u'Kurier Szczeci\u0144ski'
__author__ = 'fenuks' __author__ = 'fenuks'
description = u'24Kurier jest portalem Kuriera Szczecińskiego. Zawiera aktualności ze Szczecina oraz wiadomości regionalne z województwa zachodniopomorskiego. ' description = u'24Kurier jest portalem Kuriera Szczecińskiego. Zawiera aktualności ze Szczecina oraz wiadomości regionalne z województwa zachodniopomorskiego.'
category = 'newspaper' category = 'newspaper'
#publication_type = '' #publication_type = ''
language = 'pl' language = 'pl'

View File

@ -97,7 +97,7 @@ class ledevoir(BasicNewsRecipe):
.texte {font-size:1.15em;line-height:1.4em;margin-bottom:17px;} .texte {font-size:1.15em;line-height:1.4em;margin-bottom:17px;}
''' '''
def get_browser(self): def get_browser(self):
br = BasicNewsRecipe.get_browser() br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None: if self.username is not None and self.password is not None:
br.open('http://www.ledevoir.com') br.open('http://www.ledevoir.com')
br.select_form(nr=0) br.select_form(nr=0)

View File

@ -3,7 +3,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
class Niebezpiecznik_pl(BasicNewsRecipe): class Niebezpiecznik_pl(BasicNewsRecipe):
title = u'Niebezpiecznik.pl' title = u'Niebezpiecznik.pl'
__author__ = 'fenuks' __author__ = 'fenuks'
description = 'Niebezpiecznik.pl' description = u'Niebezpiecznik.pl o bezpieczeństwie i nie...'
category = 'hacking, IT' category = 'hacking, IT'
language = 'pl' language = 'pl'
oldest_article = 8 oldest_article = 8

View File

@ -0,0 +1,42 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = u'Łukasz Grąbczewski 2013'
__version__ = '1.0'
'''
nowyobywatel.pl
'''
from calibre.web.feeds.news import BasicNewsRecipe
class nowyobywatel(BasicNewsRecipe):
__author__ = u'Łukasz Grączewski'
title = u'Nowy Obywatel'
description = u'Pismo na rzecz sprawiedliwości społecznej'
language = 'pl'
publisher = 'Stowarzyszenie „Obywatele Obywatelom”'
publication_type = 'magazine'
masthead_url = 'http://lewicowo.pl/wp-content/uploads/2011/11/nowy-obywatel1.png'
no_stylesheets = True
remove_javascript = True
use_embedded_content = True
remove_empty_feeds = True
oldest_article = 32 #monthly +1
max_articles_per_feed = 100
simultaneous_downloads = 20
feeds = [
(u'Aktualności', u'http://nowyobywatel.pl/category/aktualnosci/feed/'),
(u'Opinie', u'http://nowyobywatel.pl/category/opinie/feed/'),
(u'Nasze rozmowy', u'http://nowyobywatel.pl/category/nasze-rozmowy/feed/'),
(u'Inspiracje', u'http://nowyobywatel.pl/category/inspiracje/feed/')
]
remove_tags = []
remove_tags.append(dict(attrs = {'class' : 'post-date'}))
remove_tags.append(dict(attrs = {'class' : 'printfriendly'}))
remove_tags.append(dict(attrs = {'class' : 'social4i'}))

View File

@ -1,7 +1,7 @@
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
class Swiat_Obrazu(BasicNewsRecipe): class Swiat_Obrazu(BasicNewsRecipe):
title = u'Swiat Obrazu' title = u'Świat Obrazu'
__author__ = 'fenuks' __author__ = 'fenuks'
description = u'Internetowy Dziennik o Fotografii i Wideo www.SwiatObrazu.pl to źródło informacji o technice fotografii i wideo, o sprzęcie najbardziej znanych i uznanych firm: Canon, Nikon, Sony, Hasselblad i wielu innych. Znajdziecie tu programy do obróbki zdjęć, forum foto i forum wideo i galerie zdjęć. Codziennie najświeższe informacje: aktualności, testy, poradniki, wywiady, felietony. Swiatobrazu.pl stale organizuje konkursy oraz warsztaty fotograficzne i wideo.' description = u'Internetowy Dziennik o Fotografii i Wideo www.SwiatObrazu.pl to źródło informacji o technice fotografii i wideo, o sprzęcie najbardziej znanych i uznanych firm: Canon, Nikon, Sony, Hasselblad i wielu innych. Znajdziecie tu programy do obróbki zdjęć, forum foto i forum wideo i galerie zdjęć. Codziennie najświeższe informacje: aktualności, testy, poradniki, wywiady, felietony. Swiatobrazu.pl stale organizuje konkursy oraz warsztaty fotograficzne i wideo.'
category = 'photography' category = 'photography'

View File

@ -19,6 +19,7 @@ class swiatczytnikow(BasicNewsRecipe):
feeds = [(u'Świat Czytników - wpisy', u'http://swiatczytnikow.pl/feed')] feeds = [(u'Świat Czytników - wpisy', u'http://swiatczytnikow.pl/feed')]
remove_tags = [dict(name = 'ul', attrs = {'class' : 'similar-posts'})] remove_tags = [dict(name = 'ul', attrs = {'class' : 'similar-posts'}),
dict(name = 'div', attrs = {'class' : 'feedflare'})]
preprocess_regexps = [(re.compile(u'<h3>Czytaj dalej:</h3>'), lambda match: '')] preprocess_regexps = [(re.compile(u'<h3>Czytaj dalej:</h3>'), lambda match: '')]

View File

@ -16,11 +16,31 @@ class telepolis(BasicNewsRecipe):
use_embedded_content = False use_embedded_content = False
feeds = [ feeds = [
(u'Wiadomości', u'http://www.telepolis.pl/rss/news.php')#, (u'Wiadomości', u'http://www.telepolis.pl/rss,2,5,0.html')
#(u'Artykuły', u'http://www.telepolis.pl/rss/artykuly.php')
] ]
keep_only_tags = [ keep_only_tags = [
dict(name='div', attrs={'class':'flol w510'}), dict(name='div', attrs={'class':'flol w510'}),
dict(name='div', attrs={'class':'main_tresc'}),
dict(name='div', attrs={'class':'main_tresc_news'}) dict(name='div', attrs={'class':'main_tresc_news'})
] ]
def append_page(self, soup, appendtag):
chpage= appendtag.find(attrs={'class':'str'})
if chpage:
for page in chpage.findAll('a'):
if page.renderContents() == 'Następna &rsaquo;':
break
soup2 = self.index_to_soup(page['href'])
pagetext = soup2.find(attrs={'class':'main_tresc'})
pos = len(appendtag.contents)
appendtag.insert(pos, pagetext)
for r in appendtag.findAll(attrs={'class':'str'}):
r.extract()
def preprocess_html(self, soup):
self.append_page(soup, soup.body)
for image in soup.findAll('img'):
if 'm.jpg' in image['src']:
image['src'] = image['src'].replace('m.jpg', '.jpg')
return soup

View File

@ -3,12 +3,13 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = u'Łukasz Grąbczewski 2012-2013' __copyright__ = u'Łukasz Grąbczewski 2012-2013'
__version__ = '1.1' __version__ = '1.2'
''' '''
zw.com.pl zw.com.pl
''' '''
import re
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
class zyciewarszawy(BasicNewsRecipe): class zyciewarszawy(BasicNewsRecipe):
@ -17,12 +18,14 @@ class zyciewarszawy(BasicNewsRecipe):
description = u'Wiadomości z Warszawy' description = u'Wiadomości z Warszawy'
language = 'pl' language = 'pl'
publisher = 'Presspublica' publisher = 'Presspublica'
publication_type = 'newspapper' publication_type = 'newspaper'
masthead_url = 'http://www.zw.com.pl/static/img/logo_zw.gif' masthead_url = 'http://www.zw.com.pl/static/img/logo_zw.gif'
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True
use_embedded_content = False
remove_empty_feeds = True
oldest_article = 1 #daily news only oldest_article = 1.5 #last 36h
max_articles_per_feed = 100 max_articles_per_feed = 100
feeds = [(u'Najnowsze', u'http://www.zw.com.pl/rss/1.html')] feeds = [(u'Najnowsze', u'http://www.zw.com.pl/rss/1.html')]
@ -31,15 +34,15 @@ class zyciewarszawy(BasicNewsRecipe):
keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'storyp'})) keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'storyp'}))
remove_tags = [] remove_tags = []
remove_tags.append(dict(name = 'div', attrs = {'class' : 'authordate'})) remove_tags.append(dict(attrs = {'class' : 'author'}))
remove_tags.append(dict(name = 'div', attrs = {'class' : 'author'})) remove_tags.append(dict(attrs = {'class' : 'more'}))
'''remove_tags.append(dict(name = 'div', attrs = {'class' : 'seealso'}))''' remove_tags.append(dict(attrs = {'class' : 'clr'}))
remove_tags.append(dict(name = 'div', attrs = {'class' : 'more'})) remove_tags.append(dict(attrs = {'id' : 'adk_0'}))
remove_tags.append(dict(name = 'div', attrs = {'class' : 'clr'})) remove_tags.append(dict(attrs = {'id' : 'adsense_0'}))
remove_tags.append(dict(name = 'div', attrs = {'id' : 'adk_0'})) remove_tags.append(dict(attrs = {'id' : 'share_bottom'}))
remove_tags.append(dict(name = 'div', attrs = {'id' : 'adsense_0'})) remove_tags.append(dict(attrs = {'id' : 'copyright_law'}))
remove_tags.append(dict(name = 'div', attrs = {'id' : 'share_bottom'}))
remove_tags.append(dict(name = 'div', attrs = {'id' : 'copyright_law'})) preprocess_regexps = [(re.compile(r',3.jpg'), lambda m: ',2.jpg')]
def print_version(self, url): def print_version(self, url):
url += "?print=tak" url += "?print=tak"

View File

@ -56,6 +56,8 @@ class TOLINO(EB600):
description = _('Communicate with the Tolino Shine reader.') description = _('Communicate with the Tolino Shine reader.')
FORMATS = ['epub', 'pdf', 'txt'] FORMATS = ['epub', 'pdf', 'txt']
BCD = [0x226] BCD = [0x226]
VENDOR_NAME = ['DEUTSCHE']
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['_TELEKOMTOLINO']
def linux_swap_drives(self, drives): def linux_swap_drives(self, drives):
if len(drives) < 2 or not drives[1] or not drives[2]: return drives if len(drives) < 2 or not drives[1] or not drives[2]: return drives

View File

@ -15,7 +15,7 @@ class ILIAD(USBMS):
name = 'IRex Iliad Device Interface' name = 'IRex Iliad Device Interface'
description = _('Communicate with the IRex Iliad eBook reader.') description = _('Communicate with the IRex Iliad eBook reader.')
author = 'John Schember' author = 'John Schember'
supported_platforms = ['windows', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
# Ordered list of supported formats # Ordered list of supported formats
# Be sure these have an entry in calibre.devices.mime # Be sure these have an entry in calibre.devices.mime

View File

@ -89,7 +89,7 @@ class KOBO(USBMS):
'Enable if you wish to see/delete them.'), 'Enable if you wish to see/delete them.'),
_('Attempt to support newer firmware') + _('Attempt to support newer firmware') +
':::'+_('Kobo routinely updates the firmware and the ' ':::'+_('Kobo routinely updates the firmware and the '
'database version. With this option Calibre will attempt ' 'database version. With this option calibre will attempt '
'to perform full read-write functionality - Here be Dragons!! ' 'to perform full read-write functionality - Here be Dragons!! '
'Enable only if you are comfortable with restoring your kobo ' 'Enable only if you are comfortable with restoring your kobo '
'to factory defaults and testing software'), 'to factory defaults and testing software'),

View File

@ -679,7 +679,7 @@ OptionRecommendation(name='search_replace',
self.archive_input_tdir = None self.archive_input_tdir = None
if input_fmt in ARCHIVE_FMTS: if input_fmt in ARCHIVE_FMTS:
self.log('Processing archive...') self.log('Processing archive...')
tdir = PersistentTemporaryDirectory('_plumber_archive') tdir = PersistentTemporaryDirectory('_pl_arc')
self.input, input_fmt = self.unarchive(self.input, tdir) self.input, input_fmt = self.unarchive(self.input, tdir)
self.archive_input_tdir = tdir self.archive_input_tdir = tdir
if os.access(self.input, os.R_OK): if os.access(self.input, os.R_OK):

View File

@ -104,8 +104,9 @@ def verify_toc_destinations(container, toc):
anchor_map[name] = frozenset(anchor_xpath(root)) anchor_map[name] = frozenset(anchor_xpath(root))
item.dest_exists = item.frag in anchor_map[name] item.dest_exists = item.frag in anchor_map[name]
if not item.dest_exists: if not item.dest_exists:
item.dest_error = _('The anchor %s does not exist in file %s')%( item.dest_error = _(
item.frag, name) 'The anchor %(a)s does not exist in file %(f)s')%dict(
a=item.frag, f=name)
def get_toc(container, verify_destinations=True): def get_toc(container, verify_destinations=True):
toc = container.opf_xpath('//opf:spine/@toc') toc = container.opf_xpath('//opf:spine/@toc')

View File

@ -232,11 +232,14 @@ class CopyToLibraryAction(InterfaceAction):
return error_dialog(self.gui, _('No library'), return error_dialog(self.gui, _('No library'),
_('No library found at %s')%loc, show=True) _('No library found at %s')%loc, show=True)
self.pd = ProgressDialog(_('Copying'), min=0, max=len(ids)-1, aname = _('Moving to') if delete_after else _('Copying to')
dtitle = '%s %s'%(aname, os.path.basename(loc))
self.pd = ProgressDialog(dtitle, min=0, max=len(ids)-1,
parent=self.gui, cancelable=False) parent=self.gui, cancelable=False)
def progress(idx, title): def progress(idx, title):
self.pd.set_msg(_('Copying') + ' ' + title) self.pd.set_msg(title)
self.pd.set_value(idx) self.pd.set_value(idx)
self.worker = Worker(ids, db, loc, Dispatcher(progress), self.worker = Worker(ids, db, loc, Dispatcher(progress),
@ -245,13 +248,16 @@ class CopyToLibraryAction(InterfaceAction):
self.pd.exec_() self.pd.exec_()
donemsg = _('Copied %(num)d books to %(loc)s')
if delete_after:
donemsg = _('Moved %(num)d books to %(loc)s')
if self.worker.error is not None: if self.worker.error is not None:
e, tb = self.worker.error e, tb = self.worker.error
error_dialog(self.gui, _('Failed'), _('Could not copy books: ') + e, error_dialog(self.gui, _('Failed'), _('Could not copy books: ') + e,
det_msg=tb, show=True) det_msg=tb, show=True)
else: else:
self.gui.status_bar.show_message( self.gui.status_bar.show_message(donemsg %
_('Copied %(num)d books to %(loc)s') %
dict(num=len(ids), loc=loc), 2000) dict(num=len(ids), loc=loc), 2000)
if self.worker.auto_merged_ids: if self.worker.auto_merged_ids:
books = '\n'.join(self.worker.auto_merged_ids.itervalues()) books = '\n'.join(self.worker.auto_merged_ids.itervalues())

View File

@ -328,6 +328,8 @@ class TagBrowserWidget(QWidget): # {{{
search_layout = QHBoxLayout() search_layout = QHBoxLayout()
self._layout.addLayout(search_layout) self._layout.addLayout(search_layout)
self.item_search = HistoryLineEdit(parent) self.item_search = HistoryLineEdit(parent)
self.item_search.setMinimumContentsLength(10)
self.item_search.setSizeAdjustPolicy(self.item_search.AdjustToMinimumContentsLengthWithIcon)
try: try:
self.item_search.lineEdit().setPlaceholderText( self.item_search.lineEdit().setPlaceholderText(
_('Find item in tag browser')) _('Find item in tag browser'))

View File

@ -30,6 +30,8 @@ def remove_dir(x):
pass pass
def app_prefix(prefix): def app_prefix(prefix):
if iswindows:
return '%s_'%__appname__
return '%s_%s_%s'%(__appname__, __version__, prefix) return '%s_%s_%s'%(__appname__, __version__, prefix)
def base_dir(): def base_dir():

View File

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: calibre 0.9.22\n" "Project-Id-Version: calibre 0.9.22\n"
"POT-Creation-Date: 2013-03-08 09:34+IST\n" "POT-Creation-Date: 2013-03-10 19:35+IST\n"
"PO-Revision-Date: 2013-03-08 09:34+IST\n" "PO-Revision-Date: 2013-03-10 19:35+IST\n"
"Last-Translator: Automatically generated\n" "Last-Translator: Automatically generated\n"
"Language-Team: LANGUAGE\n" "Language-Team: LANGUAGE\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -211,27 +211,27 @@ msgstr ""
msgid "Cannot configure" msgid "Cannot configure"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:322 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:331
msgid "File type" msgid "File type"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:368 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:377
msgid "Metadata reader" msgid "Metadata reader"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:398 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:407
msgid "Metadata writer" msgid "Metadata writer"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:428 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:437
msgid "Catalog generator" msgid "Catalog generator"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:551 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:560
msgid "User Interface Action" msgid "User Interface Action"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:585 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:594
#: /home/kovid/work/calibre/src/calibre/gui2/actions/preferences.py:20 #: /home/kovid/work/calibre/src/calibre/gui2/actions/preferences.py:20
#: /home/kovid/work/calibre/src/calibre/gui2/actions/preferences.py:28 #: /home/kovid/work/calibre/src/calibre/gui2/actions/preferences.py:28
#: /home/kovid/work/calibre/src/calibre/gui2/preferences/main.py:197 #: /home/kovid/work/calibre/src/calibre/gui2/preferences/main.py:197
@ -241,12 +241,12 @@ msgstr ""
msgid "Preferences" msgid "Preferences"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:637 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:646
#: /home/kovid/work/calibre/src/calibre/gui2/store/search/models.py:39 #: /home/kovid/work/calibre/src/calibre/gui2/store/search/models.py:39
msgid "Store" msgid "Store"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:641 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:650
msgid "An ebook store." msgid "An ebook store."
msgstr "" msgstr ""
@ -1021,10 +1021,22 @@ msgstr ""
msgid "Cause a running calibre instance, if any, to be shutdown. Note that if there are running jobs, they will be silently aborted, so use with care." msgid "Cause a running calibre instance, if any, to be shutdown. Note that if there are running jobs, they will be silently aborted, so use with care."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/debug.py:177 #: /home/kovid/work/calibre/src/calibre/debug.py:81
msgid ""
"Run a plugin that provides a command line interface. For example:\n"
"calibre-debug -r \"Add Books\" -- file1 --option1\n"
"Everything after the -- will be passed to the plugin as arguments."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/debug.py:180
msgid "Debug log" msgid "Debug log"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/debug.py:272
#, python-format
msgid "No plugin named %s found"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/android/driver.py:19 #: /home/kovid/work/calibre/src/calibre/devices/android/driver.py:19
msgid "Communicate with Android phones." msgid "Communicate with Android phones."
msgstr "" msgstr ""
@ -1266,7 +1278,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/blackberry/driver.py:14 #: /home/kovid/work/calibre/src/calibre/devices/blackberry/driver.py:14
#: /home/kovid/work/calibre/src/calibre/devices/blackberry/driver.py:37 #: /home/kovid/work/calibre/src/calibre/devices/blackberry/driver.py:37
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:288 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:296
#: /home/kovid/work/calibre/src/calibre/devices/nuut2/driver.py:18 #: /home/kovid/work/calibre/src/calibre/devices/nuut2/driver.py:18
msgid "Kovid Goyal" msgid "Kovid Goyal"
msgstr "" msgstr ""
@ -1299,31 +1311,31 @@ msgstr ""
msgid "Communicate with the Tolino Shine reader." msgid "Communicate with the Tolino Shine reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:204 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:212
msgid "Communicate with the Astak Mentor EB600" msgid "Communicate with the Astak Mentor EB600"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:227 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:235
msgid "Communicate with the PocketBook 301 reader." msgid "Communicate with the PocketBook 301 reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:244 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:252
msgid "Communicate with the PocketBook 602/603/902/903/Pro 912 reader." msgid "Communicate with the PocketBook 602/603/902/903/Pro 912 reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:264 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:272
msgid "Communicate with the PocketBook 622 reader." msgid "Communicate with the PocketBook 622 reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:277 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:285
msgid "Communicate with the PocketBook 360+ reader." msgid "Communicate with the PocketBook 360+ reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:287 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:295
msgid "Communicate with the PocketBook 701" msgid "Communicate with the PocketBook 701"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:318 #: /home/kovid/work/calibre/src/calibre/devices/eb600/driver.py:326
msgid "Communicate with the Infibeam Pi2 reader." msgid "Communicate with the Infibeam Pi2 reader."
msgstr "" msgstr ""
@ -1571,7 +1583,7 @@ msgid "Attempt to support newer firmware"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/kobo/driver.py:91 #: /home/kovid/work/calibre/src/calibre/devices/kobo/driver.py:91
msgid "Kobo routinely updates the firmware and the database version. With this option Calibre will attempt to perform full read-write functionality - Here be Dragons!! Enable only if you are comfortable with restoring your kobo to factory defaults and testing software" msgid "Kobo routinely updates the firmware and the database version. With this option calibre will attempt to perform full read-write functionality - Here be Dragons!! Enable only if you are comfortable with restoring your kobo to factory defaults and testing software"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/kobo/driver.py:619 #: /home/kovid/work/calibre/src/calibre/devices/kobo/driver.py:619
@ -4083,9 +4095,9 @@ msgstr ""
msgid "No HTML file named %s exists" msgid "No HTML file named %s exists"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/polish/toc.py:107 #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/polish/toc.py:108
#, python-format #, python-format
msgid "The anchor %s does not exist in file %s" msgid "The anchor %(a)s does not exist in file %(f)s"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/transforms/cover.py:98 #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/transforms/cover.py:98
@ -9497,7 +9509,7 @@ msgid "&Search for:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/edit_authors_dialog_ui.py:89 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/edit_authors_dialog_ui.py:89
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:349 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:351
msgid "F&ind" msgid "F&ind"
msgstr "" msgstr ""
@ -14660,12 +14672,12 @@ msgid "<b>Grouped search terms</b> are search names that permit a query to autom
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/preferences/search.py:77 #: /home/kovid/work/calibre/src/calibre/gui2/preferences/search.py:77
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:419 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:421
msgid "Match all" msgid "Match all"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/preferences/search.py:77 #: /home/kovid/work/calibre/src/calibre/gui2/preferences/search.py:77
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:419 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:421
msgid "Match any" msgid "Match any"
msgstr "" msgstr ""
@ -15800,11 +15812,11 @@ msgstr ""
msgid "%s will be deleted from all books. Are you sure?" msgid "%s will be deleted from all books. Are you sure?"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:333 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:335
msgid "Find item in tag browser" msgid "Find item in tag browser"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:337 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:339
msgid "" msgid ""
"Search for items. This is a \"contains\" search; items containing the\n" "Search for items. This is a \"contains\" search; items containing the\n"
"text anywhere in the name will be found. You can limit the search\n" "text anywhere in the name will be found. You can limit the search\n"
@ -15814,60 +15826,60 @@ msgid ""
"containing the text \"foo\"" "containing the text \"foo\""
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:345 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:347
msgid "ALT+f" msgid "ALT+f"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:350 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:352
msgid "Find the first/next matching item" msgid "Find the first/next matching item"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:355 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:357
msgid "Collapse all categories" msgid "Collapse all categories"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:379 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:381
msgid "No More Matches.</b><p> Click Find again to go to first match" msgid "No More Matches.</b><p> Click Find again to go to first match"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:391 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:393
msgid "Alter Tag Browser" msgid "Alter Tag Browser"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:397 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:399
#: /home/kovid/work/calibre/src/calibre/library/server/browse.py:281 #: /home/kovid/work/calibre/src/calibre/library/server/browse.py:281
msgid "Sort by" msgid "Sort by"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:403 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:405
msgid "Sort by name" msgid "Sort by name"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:403 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:405
msgid "Sort by popularity" msgid "Sort by popularity"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:404 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:406
msgid "Sort by average rating" msgid "Sort by average rating"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:410 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:412
msgid "Set the sort order for entries in the Tag Browser" msgid "Set the sort order for entries in the Tag Browser"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:413 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:415
msgid "Match type" msgid "Match type"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:425 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:427
msgid "When selecting multiple entries in the Tag Browser match any or all of them" msgid "When selecting multiple entries in the Tag Browser match any or all of them"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:429 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:431
msgid "Manage authors, tags, etc" msgid "Manage authors, tags, etc"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:430 #: /home/kovid/work/calibre/src/calibre/gui2/tag_browser/ui.py:432
msgid "All of these category_managers are available by right-clicking on items in the tag browser above" msgid "All of these category_managers are available by right-clicking on items in the tag browser above"
msgstr "" msgstr ""

File diff suppressed because it is too large Load Diff