Sync to trunk.

This commit is contained in:
John Schember 2009-08-14 19:33:29 -04:00
commit 46cf9f4762
28 changed files with 410 additions and 197 deletions

View File

@ -88,7 +88,8 @@ def sanitize_file_name(name, substitute='_', as_unicode=False):
one = re.sub(r'^\.+$', '_', one) one = re.sub(r'^\.+$', '_', one)
if as_unicode: if as_unicode:
one = one.decode(filesystem_encoding) one = one.decode(filesystem_encoding)
return one.replace('..', '_') one = one.replace('..', substitute)
return one
def prints(*args, **kwargs): def prints(*args, **kwargs):

View File

@ -270,7 +270,7 @@ class CybookG3Output(OutputProfile):
fbase = 16 fbase = 16
fsizes = [12, 12, 14, 16, 18, 20, 22, 24] fsizes = [12, 12, 14, 16, 18, 20, 22, 24]
class CybookOpusOutput(OutputProfile): class CybookOpusOutput(SonyReaderOutput):
author = 'John Schember' author = 'John Schember'
name = 'Cybook Opus' name = 'Cybook Opus'
@ -278,7 +278,6 @@ class CybookOpusOutput(OutputProfile):
description = _('This profile is intended for the Cybook Opus.') description = _('This profile is intended for the Cybook Opus.')
# Screen size is a best guess # Screen size is a best guess
screen_size = (600, 800)
dpi = 200 dpi = 200
fbase = 16 fbase = 16
fsizes = [12, 12, 14, 16, 18, 20, 22, 24] fsizes = [12, 12, 14, 16, 18, 20, 22, 24]

View File

@ -20,7 +20,7 @@ class BEBOOK(USBMS):
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
# Ordered list of supported formats # Ordered list of supported formats
FORMATS = ['mobi', 'epub', 'pdf', 'rtf', 'txt'] FORMATS = ['mobi', 'epub', 'fb2', 'lit', 'prc', 'pdf', 'rtf', 'txt']
VENDOR_ID = [0x0525] VENDOR_ID = [0x0525]
PRODUCT_ID = [0x8803, 0x6803] PRODUCT_ID = [0x8803, 0x6803]

View File

@ -794,10 +794,16 @@ class PRS500(DeviceConfig, DevicePlugin):
def card(self, end_session=True): def card(self, end_session=True):
""" Return path prefix to installed card or None """ """ Return path prefix to installed card or None """
card = None card = None
if self._exists("a:/")[0]: try:
card = "a:" if self._exists("a:/")[0]:
if self._exists("b:/")[0]: card = "a:"
card = "b:" except:
pass
try:
if self._exists("b:/")[0]:
card = "b:"
except:
pass
return card return card
@safe @safe

View File

@ -9,6 +9,7 @@ Device driver for the SONY PRS-700
''' '''
from calibre.devices.prs505.driver import PRS505 from calibre.devices.prs505.driver import PRS505
import re
class PRS700(PRS505): class PRS700(PRS505):
@ -20,9 +21,10 @@ class PRS700(PRS505):
BCD = [0x31a] BCD = [0x31a]
WINDOWS_MAIN_MEM = 'PRS-700' WINDOWS_MAIN_MEM = 'PRS-700'
WINDOWS_CARD_A_MEM = 'PRS-700/UC:MS' WINDOWS_CARD_A_MEM = re.compile(r'PRS-700/\S+:MS')
WINDOWS_CARD_B_MEM = 'PRS-700/UC:SD' WINDOWS_CARD_B_MEM = re.compile(r'PRS-700/\S+:SD')
OSX_MAIN_MEM = re.compile(r'Sony PRS-700/[^:]+ Media')
OSX_CARD_A_MEM = re.compile(r'Sony PRS-700/[^:]+:MS Media')
OSX_CARD_B_MEM = re.compile(r'Sony PRS-700/[^:]+:SD Media')
OSX_MAIN_MEM = 'Sony PRS-700/UC Media'
OSX_CARD_A_MEM = 'Sony PRS-700/UC:MS Media'
OSX_CARD_B_MEM = 'Sony PRS-700/UC:SD'

View File

@ -24,6 +24,12 @@ class File(object):
self.name = os.path.basename(path) self.name = os.path.basename(path)
def check_transfer(infile, dest):
infile.seek(0)
dest.seek(0)
return infile.read() == dest.read()
class CLI(object): class CLI(object):
def get_file(self, path, outfile, end_session=True): def get_file(self, path, outfile, end_session=True):
@ -45,7 +51,15 @@ class CLI(object):
if not os.path.exists(d): if not os.path.exists(d):
os.makedirs(d) os.makedirs(d)
with open(path, 'wb') as dest: with open(path, 'wb') as dest:
shutil.copyfileobj(infile, dest) try:
shutil.copyfileobj(infile, dest)
except IOError:
print 'WARNING: First attempt to send file to device failed'
infile.seek(0)
dest.seek(0)
dest.truncate()
shutil.copyfileobj(infile, dest)
#if not check_transfer(infile, dest): raise Exception('Transfer failed')
if close: if close:
infile.close() infile.close()

View File

@ -42,6 +42,7 @@ class Device(DeviceConfig, DevicePlugin):
WINDOWS_MAIN_MEM = None WINDOWS_MAIN_MEM = None
WINDOWS_CARD_A_MEM = None WINDOWS_CARD_A_MEM = None
WINDOWS_CARD_B_MEM = None WINDOWS_CARD_B_MEM = None
ALLOW_NO_MAIN_MEMORY = False
# The following are used by the check_ioreg_line method and can be either: # The following are used by the check_ioreg_line method and can be either:
# None, a string, a list of strings or a compiled regular expression # None, a string, a list of strings or a compiled regular expression
@ -266,6 +267,9 @@ class Device(DeviceConfig, DevicePlugin):
drives['cardb'] = self.windows_get_drive_prefix(drive) drives['cardb'] = self.windows_get_drive_prefix(drive)
elif self.windows_match_device(drive, 'WINDOWS_MAIN_MEM') and not drives.get('main', None): elif self.windows_match_device(drive, 'WINDOWS_MAIN_MEM') and not drives.get('main', None):
drives['main'] = self.windows_get_drive_prefix(drive) drives['main'] = self.windows_get_drive_prefix(drive)
if not self.ALLOW_NO_MAIN_MEMORY:
raise DeviceError('Failed to find the drive corresponding'
' to the main memory')
if 'main' in drives.keys() and 'carda' in drives.keys() and \ if 'main' in drives.keys() and 'carda' in drives.keys() and \
'cardb' in drives.keys(): 'cardb' in drives.keys():

View File

@ -161,10 +161,8 @@ class EPUBOutput(OutputFormatPlugin):
) )
split(self.oeb, self.opts) split(self.oeb, self.opts)
self.workaround_ade_quirks() self.workaround_ade_quirks()
self.workaround_webkit_quirks() self.workaround_webkit_quirks()
from calibre.ebooks.oeb.transforms.rescale import RescaleImages from calibre.ebooks.oeb.transforms.rescale import RescaleImages
RescaleImages()(oeb, opts) RescaleImages()(oeb, opts)
self.insert_cover() self.insert_cover()
@ -194,6 +192,7 @@ class EPUBOutput(OutputFormatPlugin):
''' '''
if self.opts.no_default_epub_cover: if self.opts.no_default_epub_cover:
return None return None
self.log('Generating default cover')
try: try:
from calibre.gui2 import images_rc, is_ok_to_use_qt # Needed for access to logo from calibre.gui2 import images_rc, is_ok_to_use_qt # Needed for access to logo
from PyQt4.Qt import QFile, QIODevice from PyQt4.Qt import QFile, QIODevice

View File

@ -110,7 +110,7 @@ class HTMLFile(object):
raise IOError(msg) raise IOError(msg)
raise IgnoreFile(msg, err.errno) raise IgnoreFile(msg, err.errno)
self.is_binary = not bool(self.HTML_PAT.search(src[:1024])) self.is_binary = not bool(self.HTML_PAT.search(src[:4096]))
if not self.is_binary: if not self.is_binary:
if encoding is None: if encoding is None:
encoding = xml_to_unicode(src[:4096], verbose=verbose)[-1] encoding = xml_to_unicode(src[:4096], verbose=verbose)[-1]

View File

@ -5,50 +5,82 @@ __copyright__ = '2008, Anatoly Shipitsin <norguhtar at gmail.com>'
'''Read meta information from fb2 files''' '''Read meta information from fb2 files'''
import mimetypes import mimetypes, os
from base64 import b64decode from base64 import b64decode
from lxml import etree
from calibre.ebooks.BeautifulSoup import BeautifulStoneSoup
from calibre.ebooks.metadata import MetaInformation from calibre.ebooks.metadata import MetaInformation
XLINK_NS = 'http://www.w3.org/1999/xlink'
def XLINK(name):
return '{%s}%s' % (XLINK_NS, name)
def get_metadata(stream): def get_metadata(stream):
""" Return metadata as a L{MetaInfo} object """ """ Return metadata as a L{MetaInfo} object """
soup = BeautifulStoneSoup(stream.read()) XPath = lambda x : etree.XPath(x,
firstname = soup.find("first-name").contents[0] namespaces={'fb2':'http://www.gribuser.ru/xml/fictionbook/2.0',
lastname = soup.find("last-name").contents[0] 'xlink':XLINK_NS})
author= [firstname+" "+lastname] tostring = lambda x : etree.tostring(x, method='text',
title = soup.find("book-title").string encoding=unicode).strip()
comments = soup.find("annotation") root = etree.fromstring(stream.read())
tags = soup.findAll('genre') authors, author_sort = [], None
tags = [t.contents[0] for t in tags] for au in XPath('//fb2:author')(root):
cp = soup.find('coverpage') fname = lname = author = None
fe = XPath('descendant::fb2:first-name')(au)
if fe:
fname = tostring(fe[0])
author = fname
le = XPath('descendant::fb2:last-name')(au)
if le:
lname = tostring(le[0])
author += ' '+lname
if author:
authors.append(author)
if len(authors) == 1 and author is not None:
if lname:
author_sort = lname
if fname:
if author_sort: author_sort += ', '+fname
else: author_sort = fname
title = os.path.splitext(os.path.basename(getattr(stream, 'name',
_('Unknown'))))[0]
for x in XPath('//fb2:book-title')(root):
title = tostring(x)
comments = ''
for x in XPath('//fb2:annotation')(root):
comments += tostring(x)
if not comments:
comments = None
tags = list(map(tostring, XPath('//fb2:genre')(root)))
cp = XPath('//fb2:coverpage')(root)
cdata = None cdata = None
if cp: if cp:
cimage = cp.find('image', attrs={'l:href':True}) cimage = XPath('descendant::fb2:image[@xlink:href]')(cp[0])
if cimage: if cimage:
id = cimage['l:href'].replace('#', '') id = cimage[0].get(XLINK('href')).replace('#', '')
binary = soup.find('binary', id=id, attrs={'content-type':True}) binary = XPath('//fb2:binary[@id="%s"]'%id)(root)
if binary: if binary:
mt = binary['content-type'] mt = binary[0].get('content-type', 'image/jpeg')
exts = mimetypes.guess_all_extensions(mt) exts = mimetypes.guess_all_extensions(mt)
if not exts: if not exts:
exts = ['.jpg'] exts = ['.jpg']
cdata = (exts[0][1:], b64decode(binary.string.strip())) cdata = (exts[0][1:], b64decode(tostring(binary[0])))
if comments: series = None
comments = u''.join(comments.findAll(text=True)) series_index = 1.0
series = soup.find("sequence") for x in XPath('//fb2:sequence')(root):
mi = MetaInformation(title, author) series = x.get('name', None)
if series is not None:
series_index = x.get('number', 1.0)
break
mi = MetaInformation(title, authors)
mi.comments = comments mi.comments = comments
mi.author_sort = lastname+'; '+firstname mi.author_sort = author_sort
if tags: if tags:
mi.tags = tags mi.tags = tags
if series: mi.series = series
mi.series = series.get('name', None) mi.series_index = series_index
try:
mi.series_index = float(series.get('number', None))
except (TypeError, ValueError):
pass
if cdata: if cdata:
mi.cover_data = cdata mi.cover_data = cdata
return mi return mi

View File

@ -31,7 +31,7 @@ def metadata_from_formats(formats):
try: try:
return _metadata_from_formats(formats) return _metadata_from_formats(formats)
except: except:
mi = metadata_from_filename(list(formats)[0]) mi = metadata_from_filename(list(iter(formats))[0])
if not mi.authors: if not mi.authors:
mi.authors = [_('Unknown')] mi.authors = [_('Unknown')]

View File

@ -1016,7 +1016,7 @@ class Manifest(object):
if isinstance(data, etree._Element): if isinstance(data, etree._Element):
ans = xml2str(data, pretty_print=self.oeb.pretty_print) ans = xml2str(data, pretty_print=self.oeb.pretty_print)
if self.media_type in OEB_DOCS: if self.media_type in OEB_DOCS:
ans = re.sub(r'<(div|a)([^>]*)/>', r'<\1\2></\1>', ans) ans = re.sub(r'<(div|a|span)([^>]*)/>', r'<\1\2></\1>', ans)
return ans return ans
if isinstance(data, unicode): if isinstance(data, unicode):
return data.encode('utf-8') return data.encode('utf-8')
@ -1543,7 +1543,10 @@ class TOC(object):
attrib['class'] = node.klass attrib['class'] = node.klass
point = element(parent, NCX('navPoint'), attrib=attrib) point = element(parent, NCX('navPoint'), attrib=attrib)
label = etree.SubElement(point, NCX('navLabel')) label = etree.SubElement(point, NCX('navLabel'))
element(label, NCX('text')).text = node.title title = node.title
if title:
title = re.sub(r'\s', ' ', title)
element(label, NCX('text')).text = title
element(point, NCX('content'), src=urlunquote(node.href)) element(point, NCX('content'), src=urlunquote(node.href))
node.to_ncx(point) node.to_ncx(point)
return parent return parent

View File

@ -181,7 +181,7 @@ def question_dialog(parent, title, msg, det_msg=''):
return d.exec_() == QMessageBox.Yes return d.exec_() == QMessageBox.Yes
def info_dialog(parent, title, msg, det_msg='', show=False): def info_dialog(parent, title, msg, det_msg='', show=False):
d = MessageBox(QMessageBox.Information, title, msg, QMessageBox.NoButton, d = MessageBox(QMessageBox.Information, title, msg, QMessageBox.Ok,
parent, det_msg) parent, det_msg)
d.setIconPixmap(QPixmap(':/images/dialog_information.svg')) d.setIconPixmap(QPixmap(':/images/dialog_information.svg'))
if show: if show:
@ -538,7 +538,7 @@ class Application(QApplication):
def is_ok_to_use_qt(): def is_ok_to_use_qt():
global gui_thread global gui_thread
if islinux and os.environ.get('DISPLAY', None) is None: if islinux and ':' not in os.environ.get('DISPLAY', ''):
return False return False
if QApplication.instance() is None: if QApplication.instance() is None:
QApplication([]) QApplication([])

View File

@ -381,7 +381,7 @@
<item> <item>
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
<string>Comments</string> <string>&amp;Comments</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0"> <item row="0" column="0">

View File

@ -1,7 +1,7 @@
from __future__ import with_statement from __future__ import with_statement
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
import traceback, os, sys, functools, collections import traceback, os, sys, functools, collections, re
from functools import partial from functools import partial
from threading import Thread from threading import Thread
@ -28,7 +28,10 @@ from calibre.customize.ui import available_input_formats
class TOCItem(QStandardItem): class TOCItem(QStandardItem):
def __init__(self, toc): def __init__(self, toc):
QStandardItem.__init__(self, toc.text if toc.text else '') text = toc.text
if text:
text = re.sub(r'\s', ' ', text)
QStandardItem.__init__(self, text if text else '')
self.abspath = toc.abspath self.abspath = toc.abspath
self.fragment = toc.fragment self.fragment = toc.fragment
for t in toc: for t in toc:

View File

@ -104,6 +104,7 @@ class CybookOpus(CybookG3):
name = 'Cybook Opus' name = 'Cybook Opus'
output_format = 'EPUB' output_format = 'EPUB'
output_profile = 'cybook_opus'
id = 'cybook_opus' id = 'cybook_opus'
class BeBook(Device): class BeBook(Device):

View File

@ -126,7 +126,8 @@ def do_list(db, fields, sort_by, ascending, search_text, line_width, separator,
fields = ['id'] + fields fields = ['id'] + fields
if output_format == 'text': if output_format == 'text':
for f in data: for f in data:
f['formats'] = u'[%s]'%u','.join(f['formats']) fmts = [x for x in f['formats'] if x is not None]
f['formats'] = u'[%s]'%u','.join(fmts)
widths = list(map(lambda x : 0, fields)) widths = list(map(lambda x : 0, fields))
for record in data: for record in data:
for f in record.keys(): for f in record.keys():

View File

@ -1525,6 +1525,8 @@ class LibraryDatabase2(LibraryDatabase):
if formats: if formats:
for fmt in formats.split(','): for fmt in formats.split(','):
path = self.format_abspath(x['id'], fmt, index_is_id=True) path = self.format_abspath(x['id'], fmt, index_is_id=True)
if path is None:
continue
if prefix != self.library_path: if prefix != self.library_path:
path = os.path.relpath(path, self.library_path) path = os.path.relpath(path, self.library_path)
path = os.path.join(prefix, path) path = os.path.join(prefix, path)
@ -1762,7 +1764,7 @@ books_series_link feeds
formats = self.find_books_in_directory(dirpath, True) formats = self.find_books_in_directory(dirpath, True)
if not formats: if not formats:
return return
formats = list(formats) formats = list(iter(formats))
mi = metadata_from_formats(formats) mi = metadata_from_formats(formats)
if mi.title is None: if mi.title is None:
return return

View File

@ -103,6 +103,15 @@ First install the Stanza reader on your iPhone from http://www.lexcycle.com . Th
Now you should be able to access your books on your iPhone. Now you should be able to access your books on your iPhone.
Why is my device not detected in linux?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|app| uses something called SYSFS to detect devices in linux. The linux kernel can export two version of SYSFS, one of which is deprecated. Some linux distributions still ship with kernels that support the deprecated version of SYSFS, even though it was deprecated a long time ago. In this case, device detection in |app| will not work. You can check what version of SYSFS is exported by your kernel with the following command::
grep SYSFS_DEPRECATED /boot/config-`uname -r`
You should see something like ``CONFIG_SYSFS_DEPRECATED_V2 is not set``.
Library Management Library Management
------------------ ------------------

View File

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: calibre 0.6.6\n" "Project-Id-Version: calibre 0.6.6\n"
"POT-Creation-Date: 2009-08-11 11:45+MDT\n" "POT-Creation-Date: 2009-08-13 12:30+MDT\n"
"PO-Revision-Date: 2009-08-11 11:45+MDT\n" "PO-Revision-Date: 2009-08-13 12:30+MDT\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"
@ -24,8 +24,8 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:52 #: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:52
#: /home/kovid/work/calibre/src/calibre/devices/prs505/books.py:58 #: /home/kovid/work/calibre/src/calibre/devices/prs505/books.py:58
#: /home/kovid/work/calibre/src/calibre/devices/prs505/books.py:199 #: /home/kovid/work/calibre/src/calibre/devices/prs505/books.py:199
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:697
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:701 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:701
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:705
#: /home/kovid/work/calibre/src/calibre/ebooks/comic/input.py:403 #: /home/kovid/work/calibre/src/calibre/ebooks/comic/input.py:403
#: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:66 #: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:66
#: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:68 #: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:68
@ -40,6 +40,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:350 #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/__init__.py:350
#: /home/kovid/work/calibre/src/calibre/ebooks/metadata/ereader.py:23 #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/ereader.py:23
#: /home/kovid/work/calibre/src/calibre/ebooks/metadata/ereader.py:45 #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/ereader.py:45
#: /home/kovid/work/calibre/src/calibre/ebooks/metadata/fb2.py:46
#: /home/kovid/work/calibre/src/calibre/ebooks/metadata/meta.py:36 #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/meta.py:36
#: /home/kovid/work/calibre/src/calibre/ebooks/metadata/meta.py:61 #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/meta.py:61
#: /home/kovid/work/calibre/src/calibre/ebooks/metadata/meta.py:63 #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/meta.py:63
@ -266,17 +267,17 @@ msgid "This profile is intended for the Cybook Opus."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:130 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:130
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:290 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:289
msgid "This profile is intended for the Amazon Kindle." msgid "This profile is intended for the Amazon Kindle."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:142 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:142
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:323 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:322
msgid "This profile is intended for the Irex Illiad." msgid "This profile is intended for the Irex Illiad."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:154 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:154
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:336 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:335
msgid "This profile is intended for the IRex Digital Reader 1000." msgid "This profile is intended for the IRex Digital Reader 1000."
msgstr "" msgstr ""
@ -296,7 +297,7 @@ msgstr ""
msgid "This profile is intended for the SONY PRS line. The 500/505/700 etc, in landscape mode. Mainly useful for comics." msgid "This profile is intended for the SONY PRS line. The 500/505/700 etc, in landscape mode. Mainly useful for comics."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:307 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:306
msgid "This profile is intended for the Amazon Kindle DX." msgid "This profile is intended for the Amazon Kindle DX."
msgstr "" msgstr ""
@ -465,7 +466,7 @@ msgid "Communicate with the Sony PRS-505 eBook reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:26 #: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:26
#: /home/kovid/work/calibre/src/calibre/devices/prs700/driver.py:17 #: /home/kovid/work/calibre/src/calibre/devices/prs700/driver.py:18
msgid "Kovid Goyal and John Schember" msgid "Kovid Goyal and John Schember"
msgstr "" msgstr ""
@ -481,47 +482,47 @@ msgstr ""
msgid "Sending metadata to device..." msgid "Sending metadata to device..."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs700/driver.py:16 #: /home/kovid/work/calibre/src/calibre/devices/prs700/driver.py:17
msgid "Communicate with the Sony PRS-700 eBook reader." msgid "Communicate with the Sony PRS-700 eBook reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:278 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:282
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:350 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:354
msgid "Unable to detect the %s disk drive. Try rebooting." msgid "Unable to detect the %s disk drive. Try rebooting."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:418 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:422
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:523 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:527
msgid "Unable to detect the %s disk drive." msgid "Unable to detect the %s disk drive."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:511 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:515
msgid "Could not find mount helper: %s." msgid "Could not find mount helper: %s."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:530 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:534
msgid "Unable to mount main memory (Error code: %d)" msgid "Unable to mount main memory (Error code: %d)"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:635 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:639
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:637 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:641
msgid "The reader has no storage card in this slot." msgid "The reader has no storage card in this slot."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:639 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:643
msgid "Selected slot: %s is not supported." msgid "Selected slot: %s is not supported."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:663 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:667
msgid "There is insufficient free space in main memory" msgid "There is insufficient free space in main memory"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:665 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:669
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:667 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:671
msgid "There is insufficient free space on the storage card" msgid "There is insufficient free space on the storage card"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:677 #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:681
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:467 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:467
#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:83 #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:83
#: /home/kovid/work/calibre/src/calibre/library/database2.py:1006 #: /home/kovid/work/calibre/src/calibre/library/database2.py:1006
@ -939,10 +940,25 @@ msgstr ""
msgid "Normally, if the input file ahs no cover and you don't specify one, a default cover is generated with the title, authors, etc. This option disables the generation of this cover." msgid "Normally, if the input file ahs no cover and you don't specify one, a default cover is generated with the title, authors, etc. This option disables the generation of this cover."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/fb2/fb2ml.py:123
#: /home/kovid/work/calibre/src/calibre/ebooks/pml/pmlml.py:111
#: /home/kovid/work/calibre/src/calibre/ebooks/rb/rbml.py:98
#: /home/kovid/work/calibre/src/calibre/ebooks/txt/txtml.py:70
msgid "Table of Contents:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:32 #: /home/kovid/work/calibre/src/calibre/ebooks/fb2/input.py:32
msgid "Do not insert a Table of Contents at the beginning of the book." msgid "Do not insert a Table of Contents at the beginning of the book."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/fb2/output.py:21
#: /home/kovid/work/calibre/src/calibre/ebooks/pdb/output.py:32
#: /home/kovid/work/calibre/src/calibre/ebooks/pml/output.py:37
#: /home/kovid/work/calibre/src/calibre/ebooks/rb/output.py:21
#: /home/kovid/work/calibre/src/calibre/ebooks/txt/output.py:35
msgid "Add Table of Contents to begenning of the book."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/html/input.py:242 #: /home/kovid/work/calibre/src/calibre/ebooks/html/input.py:242
msgid "Traverse links in HTML files breadth first. Normally, they are traversed depth first." msgid "Traverse links in HTML files breadth first. Normally, they are traversed depth first."
msgstr "" msgstr ""
@ -1244,7 +1260,6 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:183 #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:183
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:71 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info.py:71
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info_ui.py:64 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/book_info_ui.py:64
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:363
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:349 #: /home/kovid/work/calibre/src/calibre/gui2/library.py:349
#: /home/kovid/work/calibre/src/calibre/gui2/status.py:58 #: /home/kovid/work/calibre/src/calibre/gui2/status.py:58
msgid "Comments" msgid "Comments"
@ -1580,7 +1595,6 @@ msgid "Format to use inside the pdb container. Choices are:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/pdb/output.py:27 #: /home/kovid/work/calibre/src/calibre/ebooks/pdb/output.py:27
#: /home/kovid/work/calibre/src/calibre/ebooks/pml/output.py:33
msgid "Specify the character encoding of the output document. The default is cp1252. Note: This option is not honored by all formats." msgid "Specify the character encoding of the output document. The default is cp1252. Note: This option is not honored by all formats."
msgstr "" msgstr ""
@ -1782,6 +1796,10 @@ msgstr ""
msgid "Could not find pdftohtml, check it is in your PATH" msgid "Could not find pdftohtml, check it is in your PATH"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/pml/output.py:33
msgid "Specify the character encoding of the output document. The default is cp1252."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/rtf/input.py:108 #: /home/kovid/work/calibre/src/calibre/ebooks/rtf/input.py:108
msgid "This RTF file has a feature calibre does not support. Convert it to HTML first and then try it." msgid "This RTF file has a feature calibre does not support. Convert it to HTML first and then try it."
msgstr "" msgstr ""
@ -1888,7 +1906,7 @@ msgid "Default action to perform when send to device button is clicked"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/__init__.py:113 #: /home/kovid/work/calibre/src/calibre/gui2/__init__.py:113
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:396 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:397
msgid "Copied" msgid "Copied"
msgstr "" msgstr ""
@ -1956,11 +1974,13 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/comic_input.py:16 #: /home/kovid/work/calibre/src/calibre/gui2/convert/comic_input.py:16
#: /home/kovid/work/calibre/src/calibre/gui2/convert/epub_output.py:16 #: /home/kovid/work/calibre/src/calibre/gui2/convert/epub_output.py:16
#: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_input.py:13 #: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_input.py:13
#: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_output.py:15
#: /home/kovid/work/calibre/src/calibre/gui2/convert/lrf_output.py:20 #: /home/kovid/work/calibre/src/calibre/gui2/convert/lrf_output.py:20
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output.py:16 #: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output.py:16
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output.py:17 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output.py:17
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input.py:13 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input.py:13
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output.py:18 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output.py:18
#: /home/kovid/work/calibre/src/calibre/gui2/convert/rb_output.py:15
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_input.py:13 #: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_input.py:13
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output.py:17 #: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output.py:17
msgid "Options specific to" msgid "Options specific to"
@ -1976,18 +1996,20 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/comic_input_ui.py:76 #: /home/kovid/work/calibre/src/calibre/gui2/convert/comic_input_ui.py:76
#: /home/kovid/work/calibre/src/calibre/gui2/convert/epub_output_ui.py:41 #: /home/kovid/work/calibre/src/calibre/gui2/convert/epub_output_ui.py:41
#: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_input_ui.py:28 #: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_input_ui.py:28
#: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_output_ui.py:28
#: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel_ui.py:88 #: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel_ui.py:88
#: /home/kovid/work/calibre/src/calibre/gui2/convert/lrf_output_ui.py:115 #: /home/kovid/work/calibre/src/calibre/gui2/convert/lrf_output_ui.py:115
#: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:165 #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:165
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:44 #: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:44
#: /home/kovid/work/calibre/src/calibre/gui2/convert/page_setup_ui.py:110 #: /home/kovid/work/calibre/src/calibre/gui2/convert/page_setup_ui.py:110
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output_ui.py:31 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output_ui.py:35
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input_ui.py:37 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input_ui.py:38
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output_ui.py:37 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output_ui.py:39
#: /home/kovid/work/calibre/src/calibre/gui2/convert/rb_output_ui.py:28
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:71 #: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:71
#: /home/kovid/work/calibre/src/calibre/gui2/convert/toc_ui.py:61 #: /home/kovid/work/calibre/src/calibre/gui2/convert/toc_ui.py:61
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_input_ui.py:28 #: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_input_ui.py:28
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output_ui.py:31 #: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output_ui.py:35
#: /home/kovid/work/calibre/src/calibre/gui2/convert/xpath_edit_ui.py:41 #: /home/kovid/work/calibre/src/calibre/gui2/convert/xpath_edit_ui.py:41
#: /home/kovid/work/calibre/src/calibre/gui2/convert/xpath_wizard_ui.py:67 #: /home/kovid/work/calibre/src/calibre/gui2/convert/xpath_wizard_ui.py:67
#: /home/kovid/work/calibre/src/calibre/gui2/device_drivers/configwidget_ui.py:59 #: /home/kovid/work/calibre/src/calibre/gui2/device_drivers/configwidget_ui.py:59
@ -2056,10 +2078,12 @@ msgid "EPUB Output"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/epub_output.py:16 #: /home/kovid/work/calibre/src/calibre/gui2/convert/epub_output.py:16
#: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_output.py:15
#: /home/kovid/work/calibre/src/calibre/gui2/convert/lrf_output.py:20 #: /home/kovid/work/calibre/src/calibre/gui2/convert/lrf_output.py:20
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output.py:16 #: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output.py:16
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output.py:17 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output.py:17
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output.py:18 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output.py:18
#: /home/kovid/work/calibre/src/calibre/gui2/convert/rb_output.py:15
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output.py:17 #: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output.py:17
msgid "output" msgid "output"
msgstr "" msgstr ""
@ -2088,6 +2112,17 @@ msgstr ""
msgid "Do not insert a &Table of Contents at the beginning of the book." msgid "Do not insert a &Table of Contents at the beginning of the book."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_output.py:14
msgid "FB2 Output"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/fb2_output_ui.py:29
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output_ui.py:37
#: /home/kovid/work/calibre/src/calibre/gui2/convert/rb_output_ui.py:29
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output_ui.py:37
msgid "&Inline TOC"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel.py:15 #: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel.py:15
msgid "Look & Feel" msgid "Look & Feel"
msgstr "" msgstr ""
@ -2421,32 +2456,36 @@ msgstr ""
msgid "PDB Output" msgid "PDB Output"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output_ui.py:32 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output_ui.py:36
msgid "Format:" msgid "&Format:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input.py:12 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input.py:12
msgid "PDF Input" msgid "PDF Input"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input_ui.py:38 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input_ui.py:39
msgid "Line Un-Wrapping Factor:" msgid "Line &Un-Wrapping Factor:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input_ui.py:39 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input_ui.py:40
msgid "No Images" msgid "No &Images"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output.py:17 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output.py:17
msgid "PDF Output" msgid "PDF Output"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output_ui.py:38 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output_ui.py:40
msgid "Paper Size:" msgid "&Paper Size:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output_ui.py:39 #: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output_ui.py:41
msgid "Orientation:" msgid "&Orientation:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/rb_output.py:14
msgid "RB Output"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/single.py:137 #: /home/kovid/work/calibre/src/calibre/gui2/convert/single.py:137
@ -2625,8 +2664,8 @@ msgstr ""
msgid "TXT Output" msgid "TXT Output"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output_ui.py:32 #: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output_ui.py:36
msgid "Line ending style:" msgid "&Line ending style:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/xpath_edit_ui.py:42 #: /home/kovid/work/calibre/src/calibre/gui2/convert/xpath_edit_ui.py:42
@ -3084,7 +3123,7 @@ msgid "Failed to start content server"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config.py:662 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config.py:662
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:468 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:469
msgid "Select location for books" msgid "Select location for books"
msgstr "" msgstr ""
@ -3649,8 +3688,8 @@ msgstr ""
msgid "Publishe&d:" msgid "Publishe&d:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:362 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:363
msgid "MMM yyyy" msgid "&Comments"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:364 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:364
@ -5408,45 +5447,45 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:36 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:36
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:37 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:37
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:148
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:149 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:149
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:150
msgid "Default" msgid "Default"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:287 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:288
msgid "If you use the WordPlayer e-book app on your Android phone, you can access your calibre book collection directly on the device. To do this you have to turn on the content server." msgid "If you use the WordPlayer e-book app on your Android phone, you can access your calibre book collection directly on the device. To do this you have to turn on the content server."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:291 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:292
msgid "Remember to leave calibre running as the server only runs as long as calibre is running." msgid "Remember to leave calibre running as the server only runs as long as calibre is running."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:293 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:294
msgid "You have to add the URL http://myhostname:8080 as your calibre library in WordPlayer. Here myhostname should be the fully qualified hostname or the IP address of the computer calibre is running on." msgid "You have to add the URL http://myhostname:8080 as your calibre library in WordPlayer. Here myhostname should be the fully qualified hostname or the IP address of the computer calibre is running on."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:370 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:371
msgid "Moving library..." msgid "Moving library..."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:386
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:387 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:387
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:388
msgid "Failed to move library" msgid "Failed to move library"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:440 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:441
msgid "Invalid database" msgid "Invalid database"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:441 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:442
msgid "<p>An invalid library already exists at %s, delete it before trying to move the existing library.<br>Error: %s" msgid "<p>An invalid library already exists at %s, delete it before trying to move the existing library.<br>Error: %s"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:452 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:453
msgid "Could not move library" msgid "Could not move library"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:514 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:515
msgid "welcome wizard" msgid "welcome wizard"
msgstr "" msgstr ""
@ -6191,7 +6230,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_iht.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_iht.py:15
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_indy_star.py:6 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_indy_star.py:6
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_inquirer_net.py:24 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_inquirer_net.py:24
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_irish_times.py:12 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_irish_times.py:13
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_japan_times.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_japan_times.py:15
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_joelonsoftware.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_joelonsoftware.py:15
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_jpost.py:8 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_jpost.py:8
@ -6234,7 +6273,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_seattle_times.py:22 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_seattle_times.py:22
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_security_watch.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_security_watch.py:15
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_shacknews.py:10 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_shacknews.py:10
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_slashdot.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_slashdot.py:14
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_slate.py:29 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_slate.py:29
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_smh.py:19 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_smh.py:19
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_soldiers.py:26 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_soldiers.py:26
@ -6273,6 +6312,13 @@ msgstr ""
msgid "English" msgid "English"
msgstr "" msgstr ""
#:
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_bbcvietnamese.py:16
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_tnxm.py:16
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_vnexpress.py:16
msgid "Vietnamese"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_carta.py:24 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_carta.py:24
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_der_standard.py:22 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_der_standard.py:22
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_diepresse.py:23 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_diepresse.py:23
@ -6313,6 +6359,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_gva_be.py:22 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_gva_be.py:22
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_hln.py:22 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_hln.py:22
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_tijd.py:22 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_tijd.py:22
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_volksrant.py:17
msgid "Dutch" msgid "Dutch"
msgstr "" msgstr ""

View File

@ -62,7 +62,7 @@ and save it to a new file.
>>> MagickWriteImage(wand,"out.png") #doctest: +ELLIPSIS >>> MagickWriteImage(wand,"out.png") #doctest: +ELLIPSIS
<MagickBooleanType object at ...> <MagickBooleanType object at ...>
>>> >>>
""" """
@ -82,14 +82,15 @@ else:
_lib = util.find_library('MagickWand') _lib = util.find_library('MagickWand')
if _lib is None: if _lib is None:
_lib = util.find_library('Wand') _lib = util.find_library('Wand')
_magick = _magick_error = None _magick = _magick_error = None
try: try:
_magick = ctypes.CDLL(_lib) _magick = ctypes.CDLL(_lib)
except Exception, err: except Exception, err:
_magick_erorr = str(err) global _magick_error
_magick_error = str(err)
_initialized = False _initialized = False
def initialize(): def initialize():
global _initialized global _initialized
if not _initialized: if not _initialized:
@ -97,22 +98,22 @@ def initialize():
_magick.MagickWandGenesis() _magick.MagickWandGenesis()
else: else:
raise RuntimeError('Failed to load ImageMagick: %s'%_magick_error) raise RuntimeError('Failed to load ImageMagick: %s'%_magick_error)
def finalize(): def finalize():
global _initialized global _initialized
if _initialized: if _initialized:
_magick.MagickWandTerminus() _magick.MagickWandTerminus()
_initialized = False _initialized = False
class ImageMagick(object): class ImageMagick(object):
def __enter__(self): def __enter__(self):
initialize() initialize()
def __exit__(self, *args): def __exit__(self, *args):
finalize() finalize()
class MetricType(ctypes.c_int): pass class MetricType(ctypes.c_int): pass
UndefinedMetric = MetricType(0) UndefinedMetric = MetricType(0)
AbsoluteErrorMetric = MetricType(1) AbsoluteErrorMetric = MetricType(1)
@ -489,7 +490,7 @@ SetEvaluateOperator = MagickEvaluateOperator(10)
SubtractEvaluateOperator = MagickEvaluateOperator(11) SubtractEvaluateOperator = MagickEvaluateOperator(11)
XorEvaluateOperator = MagickEvaluateOperator(12) XorEvaluateOperator = MagickEvaluateOperator(12)
class ExceptionType(ctypes.c_int): class ExceptionType(ctypes.c_int):
pass pass
UndefinedException = ExceptionType(0) UndefinedException = ExceptionType(0)
@ -4360,9 +4361,8 @@ try:
except AttributeError,e: except AttributeError,e:
pass pass
else: else:
PixelSetColor = _magick.PixelSetColor PixelSetColor = _magick.PixelSetColor
if __name__=='__main__': if __name__=='__main__':
import doctest import doctest
doctest.testmod() doctest.testmod()

View File

@ -22,9 +22,14 @@ def ascii_text(orig):
return ascii return ascii
def ascii_filename(orig): def ascii_filename(orig, substitute='_'):
return sanitize_file_name(ascii_text(orig).replace('?', '_')) ans = []
orig = ascii_text(orig).replace('?', '_')
for x in orig:
if ord(x) < 32:
x = substitute
ans.append(x)
return sanitize_file_name(''.join(ans), substitute=substitute)
def supports_long_names(path): def supports_long_names(path):
t = ('a'*300)+'.txt' t = ('a'*300)+'.txt'

View File

@ -53,6 +53,7 @@ recipe_modules = ['recipe_' + r for r in (
'gva_be', 'hln', 'tijd', 'degentenaar', 'inquirer_net', 'uncrate', 'gva_be', 'hln', 'tijd', 'degentenaar', 'inquirer_net', 'uncrate',
'fastcompany', 'accountancyage', 'laprensa_hn', 'latribuna', 'fastcompany', 'accountancyage', 'laprensa_hn', 'latribuna',
'eltiempo_hn', 'slate', 'tnxm', 'bbcvietnamese', 'vnexpress', 'eltiempo_hn', 'slate', 'tnxm', 'bbcvietnamese', 'vnexpress',
'volksrant', 'theeconomictimes_india', 'ourdailybread',
)] )]

View File

@ -12,14 +12,35 @@ from threading import RLock
class ChicagoTribune(BasicNewsRecipe): class ChicagoTribune(BasicNewsRecipe):
title = 'Chicago Tribune' title = 'Chicago Tribune'
__author__ = 'Kovid Goyal' __author__ = 'Kovid Goyal and Sujata Raman'
description = 'Politics, local and business news from Chicago' description = 'Politics, local and business news from Chicago'
language = _('English') language = _('English')
use_embedded_content = False use_embedded_content = False
articles_are_obfuscated = True no_stylesheets = True
remove_tags_before = dict(name='h1') remove_javascript = True
obfuctation_lock = RLock()
keep_only_tags = [dict(name='div', attrs={'class':["story","entry-asset asset hentry"]}),
dict(name='div', attrs={'id':["pagebody","story","maincontentcontainer"]}),
]
remove_tags_after = [ {'class':['photo_article',]} ]
remove_tags = [{'id':["moduleArticleTools","content-bottom","rail","articleRelates module","toolSet","relatedrailcontent","div-wrapper","beta","atp-comments","footer"]},
{'class':["clearfix","relatedTitle","articleRelates module","asset-footer","tools","comments","featurePromo","featurePromo fp-topjobs brownBackground","clearfix fullSpan brownBackground","curvedContent"]},
dict(name='font',attrs={'id':["cr-other-headlines"]})]
extra_css = '''
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
.byline {font-family:Arial,Helvetica,sans-serif; font-size:xx-small;}
.date {font-family:Arial,Helvetica,sans-serif; font-size:xx-small;}
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
.copyright {font-family:Arial,Helvetica,sans-serif;font-size:xx-small;text-align:center}
.story{font-family:Arial,Helvetica,sans-serif;font-size:small;}
.entry-asset asset hentry{font-family:Arial,Helvetica,sans-serif;font-size:small;}
.pagebody{font-family:Arial,Helvetica,sans-serif;font-size:small;}
.maincontentcontainer{font-family:Arial,Helvetica,sans-serif;font-size:small;}
.story-body{font-family:Arial,Helvetica,sans-serif;font-size:small;}
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
'''
feeds = [ feeds = [
('Latest news', 'http://feeds.chicagotribune.com/chicagotribune/news/'), ('Latest news', 'http://feeds.chicagotribune.com/chicagotribune/news/'),
('Local news', 'http://feeds.chicagotribune.com/chicagotribune/news/local/'), ('Local news', 'http://feeds.chicagotribune.com/chicagotribune/news/local/'),
@ -28,14 +49,14 @@ class ChicagoTribune(BasicNewsRecipe):
('Most E-mailed stories', 'http://feeds.chicagotribune.com/chicagotribune/email/'), ('Most E-mailed stories', 'http://feeds.chicagotribune.com/chicagotribune/email/'),
('Opinion', 'http://feeds.chicagotribune.com/chicagotribune/opinion/'), ('Opinion', 'http://feeds.chicagotribune.com/chicagotribune/opinion/'),
('Off Topic', 'http://feeds.chicagotribune.com/chicagotribune/offtopic/'), ('Off Topic', 'http://feeds.chicagotribune.com/chicagotribune/offtopic/'),
('Politics', 'http://feeds.chicagotribune.com/chicagotribune/politics/'), #('Politics', 'http://feeds.chicagotribune.com/chicagotribune/politics/'),
('Special Reports', 'http://feeds.chicagotribune.com/chicagotribune/special/'), #('Special Reports', 'http://feeds.chicagotribune.com/chicagotribune/special/'),
('Religion News', 'http://feeds.chicagotribune.com/chicagotribune/religion/'), #('Religion News', 'http://feeds.chicagotribune.com/chicagotribune/religion/'),
('Business news', 'http://feeds.chicagotribune.com/chicagotribune/business/'), ('Business news', 'http://feeds.chicagotribune.com/chicagotribune/business/'),
('Jobs and Careers', 'http://feeds.chicagotribune.com/chicagotribune/career/'), ('Jobs and Careers', 'http://feeds.chicagotribune.com/chicagotribune/career/'),
('Local scene', 'http://feeds.chicagotribune.com/chicagohomes/localscene/'), ('Local scene', 'http://feeds.chicagotribune.com/chicagohomes/localscene/'),
('Phil Rosenthal', 'http://feeds.chicagotribune.com/chicagotribune/rosenthal/'), ('Phil Rosenthal', 'http://feeds.chicagotribune.com/chicagotribune/rosenthal/'),
('Tech Buzz', 'http://feeds.chicagotribune.com/chicagotribune/techbuzz/'), #('Tech Buzz', 'http://feeds.chicagotribune.com/chicagotribune/techbuzz/'),
('Your Money', 'http://feeds.chicagotribune.com/chicagotribune/yourmoney/'), ('Your Money', 'http://feeds.chicagotribune.com/chicagotribune/yourmoney/'),
('Jon Hilkevitch - Getting around', 'http://feeds.chicagotribune.com/chicagotribune/gettingaround/'), ('Jon Hilkevitch - Getting around', 'http://feeds.chicagotribune.com/chicagotribune/gettingaround/'),
('Jon Yates - What\'s your problem?', 'http://feeds.chicagotribune.com/chicagotribune/problem/'), ('Jon Yates - What\'s your problem?', 'http://feeds.chicagotribune.com/chicagotribune/problem/'),
@ -44,39 +65,30 @@ class ChicagoTribune(BasicNewsRecipe):
('Sports', 'http://feeds.chicagotribune.com/chicagotribune/sports/'), ('Sports', 'http://feeds.chicagotribune.com/chicagotribune/sports/'),
('Arts and Architecture', 'http://feeds.chicagotribune.com/chicagotribune/arts/'), ('Arts and Architecture', 'http://feeds.chicagotribune.com/chicagotribune/arts/'),
('Books', 'http://feeds.chicagotribune.com/chicagotribune/books/'), ('Books', 'http://feeds.chicagotribune.com/chicagotribune/books/'),
('Magazine', 'http://feeds.chicagotribune.com/chicagotribune/magazine/'), #('Magazine', 'http://feeds.chicagotribune.com/chicagotribune/magazine/'),
('Movies', 'http://feeds.chicagotribune.com/chicagotribune/movies/'), ('Movies', 'http://feeds.chicagotribune.com/chicagotribune/movies/'),
('Music', 'http://feeds.chicagotribune.com/chicagotribune/movies/'), ('Music', 'http://feeds.chicagotribune.com/chicagotribune/music/'),
('TV', 'http://feeds.chicagotribune.com/chicagotribune/tv/'), ('TV', 'http://feeds.chicagotribune.com/chicagotribune/tv/'),
('Hypertext', 'http://feeds.chicagotribune.com/chicagotribune/hypertext/'), ('Hypertext', 'http://feeds.chicagotribune.com/chicagotribune/hypertext/'),
('iPhone Blog', 'http://feeds.feedburner.com/redeye/iphoneblog'), ('iPhone Blog', 'http://feeds.feedburner.com/redeye/iphoneblog'),
('Julie\'s Health Club', 'http://feeds.chicagotribune.com/chicagotribune_julieshealthclub/'), ('Julie\'s Health Club', 'http://feeds.chicagotribune.com/chicagotribune_julieshealthclub/'),
] ]
temp_files = []
def get_article_url(self, article): def get_article_url(self, article):
print article.get('feedburner_origlink', article.get('guid', article.get('link')))
return article.get('feedburner_origlink', article.get('guid', article.get('link'))) return article.get('feedburner_origlink', article.get('guid', article.get('link')))
def get_obfuscated_article(self, url):
with self.obfuctation_lock: def postprocess_html(self, soup, first_fetch):
soup = self.index_to_soup(url) for t in soup.findAll(['table', 'tr', 'td']):
img = soup.find('img', alt='Print') t.name = 'div'
if img is not None:
a = img.parent.find('a', href=True) for tag in soup.findAll('form', dict(attrs={'name':["comments_form"]})):
purl = urlparse(url) tag.extract()
xurl = urlunparse(purl[:2] + (a['href'], '', '', '')) for tag in soup.findAll('font', dict(attrs={'id':["cr-other-headlines"]})):
soup = self.index_to_soup(xurl) tag.extract()
for img in soup.findAll('img', src=True):
if img['src'].startswith('/'): return soup
img['src'] = urlunparse(purl[:2]+(img['src'], '', '', ''))
html = unicode(soup)
else:
h1 = soup.find(id='page-title')
body = soup.find(attrs={'class':re.compile('asset-content')})
html = u'<html><head/><body>%s</body></html>'%(unicode(h1)+unicode(body))
self.temp_files.append(PersistentTemporaryFile('_chicago_tribune.xhtml'))
self.temp_files[-1].write(html.encode('utf-8'))
self.temp_files[-1].close()
return self.temp_files[-1].name

View File

@ -1,37 +1,39 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Derry FitzGerald' __copyright__ = '2008, Derry FitzGerald. 2009 Modified by Ray Kinsella'
''' '''
irishtimes.com irishtimes.com
''' '''
import re
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.web.feeds.news import BasicNewsRecipe
class IrishTimes(BasicNewsRecipe):
title = u'The Irish Times' class IrishTimes(BasicNewsRecipe):
__author__ = 'Derry FitzGerald' title = u'The Irish Times'
language = _('English') __author__ = 'Derry FitzGerald and Ray Kinsella'
no_stylesheets = True language = _('English')
no_stylesheets = True
remove_tags = [dict(name='div', attrs={'class':'footer'})] simultaneous_downloads= 1
extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'
r = re.compile('.*(?P<url>http:\/\/www.irishtimes.com\/.*\.html).*')
feeds = [ remove_tags = [dict(name='div', attrs={'class':'footer'})]
('Frontpage', 'http://www.irishtimes.com/feeds/rss/newspaper/index.rss'), extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'
('Ireland', 'http://www.irishtimes.com/feeds/rss/newspaper/ireland.rss'),
('World', 'http://www.irishtimes.com/feeds/rss/newspaper/world.rss'), feeds = [
('Finance', 'http://www.irishtimes.com/feeds/rss/newspaper/finance.rss'), ('Frontpage', 'http://www.irishtimes.com/feeds/rss/newspaper/index.rss'),
('Features', 'http://www.irishtimes.com/feeds/rss/newspaper/features.rss'), ('Ireland', 'http://www.irishtimes.com/feeds/rss/newspaper/ireland.rss'),
('Sport', 'http://www.irishtimes.com/feeds/rss/newspaper/sport.rss'), ('World', 'http://www.irishtimes.com/feeds/rss/newspaper/world.rss'),
('Opinion', 'http://www.irishtimes.com/feeds/rss/newspaper/opinion.rss'), ('Finance', 'http://www.irishtimes.com/feeds/rss/newspaper/finance.rss'),
('Letters', 'http://www.irishtimes.com/feeds/rss/newspaper/letters.rss'), ('Features', 'http://www.irishtimes.com/feeds/rss/newspaper/features.rss'),
('Health', 'http://www.irishtimes.com/feeds/rss/newspaper/health.rss'), ('Sport', 'http://www.irishtimes.com/feeds/rss/newspaper/sport.rss'),
('Education and Parenting', 'http://www.irishtimes.com/feeds/rss/newspaper/education.rss'), ('Opinion', 'http://www.irishtimes.com/feeds/rss/newspaper/opinion.rss'),
('Science Today', 'http://www.irishtimes.com/feeds/rss/newspaper/sciencetoday.rss'), ('Letters', 'http://www.irishtimes.com/feeds/rss/newspaper/letters.rss'),
('The Ticket', 'http://www.irishtimes.com/feeds/rss/newspaper/theticket.rss'), ]
('Weekend', 'http://www.irishtimes.com/feeds/rss/newspaper/weekend.rss'),
('News Features', 'http://www.irishtimes.com/feeds/rss/newspaper/newsfeatures.rss'),
('Magazine', 'http://www.irishtimes.com/feeds/rss/newspaper/magazine.rss'), def print_version(self, url):
] return url.replace('.html', '_pf.html')
def print_version(self, url): def get_article_url(self, article):
return url.replace('.html', '_pf.html') m = self.r.match(article.get('description', None))
print m.group('url')
return m.group('url')

View File

@ -0,0 +1,35 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
rbc.org
'''
from calibre.web.feeds.news import BasicNewsRecipe
class OurDailyBread(BasicNewsRecipe):
title = 'Our Daily Bread'
__author__ = 'Darko Miletic'
description = 'Religion'
oldest_article = 15
language = _('English')
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
category = 'religion'
encoding = 'utf-8'
extra_css = ' #devoTitle{font-size: x-large; font-weight: bold} '
conversion_options = {
'comments' : description
,'tags' : category
,'language' : 'en'
}
keep_only_tags = [dict(name='div', attrs={'class':['altbg','text']})]
feeds = [(u'Our Daily Bread', u'http://www.rbc.org/rss.ashx?id=50398')]
def preprocess_html(self, soup):
return self.adeify_images(soup)

View File

@ -0,0 +1,34 @@
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1249039563(BasicNewsRecipe):
title = u'De Volkskrant'
__author__ = 'acidzebra'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
language = _('Dutch')
keep_only_tags = [dict(name='div', attrs={'id':'leftColumnArticle'}) ]
remove_tags = [
dict(name='div',attrs={'class':'article_tools'}),
dict(name='div',attrs={'id':'article_tools'}),
dict(name='div',attrs={'class':'articletools'}),
dict(name='div',attrs={'id':'articletools'}),
dict(name='div',attrs={'id':'myOverlay'}),
dict(name='div',attrs={'id':'trackback'}),
dict(name='div',attrs={'id':'googleBanner'}),
dict(name='div',attrs={'id':'article_headlines'}),
]
extra_css = '''
body{font-family:Arial,Helvetica,sans-serif; font-size:small;}
h1{font-size:large;}
'''
feeds = [(u'Laatste Nieuws', u'http://volkskrant.nl/rss/laatstenieuws.rss'), (u'Binnenlands nieuws', u'http://volkskrant.nl/rss/nederland.rss'), (u'Buitenlands nieuws', u'http://volkskrant.nl/rss/internationaal.rss'), (u'Economisch nieuws', u'http://volkskrant.nl/rss/economie.rss'), (u'Sportnieuws', u'http://volkskrant.nl/rss/sport.rss'), (u'Kunstnieuws', u'http://volkskrant.nl/rss/kunst.rss'), (u'Wetenschapsnieuws', u'http://feeds.feedburner.com/DeVolkskrantWetenschap'), (u'Technologienieuws', u'http://feeds.feedburner.com/vkmedia')]

View File

@ -344,6 +344,7 @@ class gui(OptionlessCommand):
dat = dat.replace('from convert.xpath_wizard import', dat = dat.replace('from convert.xpath_wizard import',
'from calibre.gui2.convert.xpath_wizard import') 'from calibre.gui2.convert.xpath_wizard import')
dat = re.compile(r'QtGui.QApplication.translate\(.+?,\s+"(.+?)(?<!\\)",.+?\)', re.DOTALL).sub(r'_("\1")', dat) dat = re.compile(r'QtGui.QApplication.translate\(.+?,\s+"(.+?)(?<!\\)",.+?\)', re.DOTALL).sub(r'_("\1")', dat)
dat = dat.replace('_("MMM yyyy")', '"MMM yyyy"')
# Workaround bug in Qt 4.4 on Windows # Workaround bug in Qt 4.4 on Windows
if form.endswith('dialogs%sconfig.ui'%os.sep) or form.endswith('dialogs%slrf_single.ui'%os.sep): if form.endswith('dialogs%sconfig.ui'%os.sep) or form.endswith('dialogs%slrf_single.ui'%os.sep):