Sync to trunk

This commit is contained in:
John Schember 2009-03-07 13:20:21 -05:00
commit d24c879e47
43 changed files with 765 additions and 483 deletions

View File

@ -37,6 +37,7 @@ def freeze():
'/usr/lib/libpoppler.so.4', '/usr/lib/libpoppler.so.4',
'/usr/lib/libxml2.so.2', '/usr/lib/libxml2.so.2',
'/usr/lib/libdbus-1.so.3', '/usr/lib/libdbus-1.so.3',
'/usr/lib/libopenjpeg.so.2',
'/usr/lib/libxslt.so.1', '/usr/lib/libxslt.so.1',
'/usr/lib/libxslt.so.1', '/usr/lib/libxslt.so.1',
'/usr/lib/libgthread-2.0.so.0', '/usr/lib/libgthread-2.0.so.0',

View File

@ -34,8 +34,8 @@ python = os.path.join(base_dir, 'MacOS', 'python')
loader_path = os.path.join(dirpath, base_name+'.py') loader_path = os.path.join(dirpath, base_name+'.py')
loader = open(loader_path, 'w') loader = open(loader_path, 'w')
site_packages = glob.glob(resources_dir+'/lib/python*/site-packages.zip')[0] site_packages = glob.glob(resources_dir+'/lib/python*/site-packages.zip')[0]
print >>loader, '#!'+python
print >>loader, 'import sys' print >>loader, 'import sys'
print >>loader, 'sys.argv[0] =', repr(os.path.basename(path))
print >>loader, 'if', repr(dirpath), 'in sys.path: sys.path.remove(', repr(dirpath), ')' print >>loader, 'if', repr(dirpath), 'in sys.path: sys.path.remove(', repr(dirpath), ')'
print >>loader, 'sys.path.append(', repr(site_packages), ')' print >>loader, 'sys.path.append(', repr(site_packages), ')'
print >>loader, 'sys.frozen = "macosx_app"' print >>loader, 'sys.frozen = "macosx_app"'
@ -49,7 +49,8 @@ os.environ['PYTHONHOME'] = resources_dir
os.environ['FC_CONFIG_DIR'] = os.path.join(resources_dir, 'fonts') os.environ['FC_CONFIG_DIR'] = os.path.join(resources_dir, 'fonts')
os.environ['MAGICK_HOME'] = os.path.join(frameworks_dir, 'ImageMagick') os.environ['MAGICK_HOME'] = os.path.join(frameworks_dir, 'ImageMagick')
os.environ['DYLD_LIBRARY_PATH'] = os.path.join(frameworks_dir, 'ImageMagick', 'lib') os.environ['DYLD_LIBRARY_PATH'] = os.path.join(frameworks_dir, 'ImageMagick', 'lib')
os.execv(loader_path, sys.argv) args = [path, loader_path] + sys.argv[1:]
os.execv(python, args)
''' '''
CHECK_SYMLINKS_PRESCRIPT = \ CHECK_SYMLINKS_PRESCRIPT = \
r''' r'''

View File

@ -2,7 +2,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
__appname__ = 'calibre' __appname__ = 'calibre'
__version__ = '0.4.142' __version__ = '0.4.143'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
''' '''
Various run time constants. Various run time constants.

View File

@ -196,8 +196,8 @@ to auto-generate a Table of Contents.
'an overview of the NCX format.')) 'an overview of the NCX format.'))
toc('use_auto_toc', ['--use-auto-toc'], default=False, toc('use_auto_toc', ['--use-auto-toc'], default=False,
help=_('Normally, if the source file already has a Table of Contents, ' help=_('Normally, if the source file already has a Table of Contents, '
'it is used in preference to the autodetected one. ' 'it is used in preference to the auto-generated one. '
'With this option, the autodetected one is always used.')) 'With this option, the auto-generated one is always used.'))
layout = c.add_group('page layout', _('Control page layout')) layout = c.add_group('page layout', _('Control page layout'))
layout('margin_top', ['--margin-top'], default=5.0, layout('margin_top', ['--margin-top'], default=5.0,

View File

@ -640,7 +640,7 @@ class Processor(Parser):
name = self.htmlfile_map[self.htmlfile.path] name = self.htmlfile_map[self.htmlfile.path]
href = 'content/'+name href = 'content/'+name
# Add level 1 and level 2 TOC items # Add level* TOC items
counter = 0 counter = 0
def elem_to_link(elem, href, counter): def elem_to_link(elem, href, counter):
@ -711,6 +711,8 @@ class Processor(Parser):
if len(toc) > 0: if len(toc) > 0:
# Detected TOC entries using --level* options
# so aborting all other toc processing
return return
# Add chapters to TOC # Add chapters to TOC
if not self.opts.no_chapters_in_toc: if not self.opts.no_chapters_in_toc:
@ -795,7 +797,8 @@ class Processor(Parser):
self.external_stylesheets, self.stylesheet = [], self.css_parser.parseString('') self.external_stylesheets, self.stylesheet = [], self.css_parser.parseString('')
self.specified_override_css = [] self.specified_override_css = []
for link in self.root.xpath('//link'): for link in self.root.xpath('//link'):
if 'css' in link.get('type', 'text/css').lower(): ltype = link.get('type', link.get('rel', 'text/css')).lower()
if 'css' in ltype or 'style' in ltype:
file = os.path.join(self.tdir, *(link.get('href', '').split('/'))) file = os.path.join(self.tdir, *(link.get('href', '').split('/')))
if file and not 'http:' in file: if file and not 'http:' in file:
if not parsed_sheets.has_key(file): if not parsed_sheets.has_key(file):
@ -845,7 +848,12 @@ class Processor(Parser):
except: except:
size = '3' size = '3'
if size and size.strip() and size.strip()[0] in ('+', '-'): if size and size.strip() and size.strip()[0] in ('+', '-'):
size = 3 + float(size) # Hack assumes basefont=3 size = re.search(r'[+-]{0,1}[\d\.]+', size)
try:
size = float(size.group())
except:
size = 0
size += 3 # Hack assumes basefont=3
try: try:
setting = 'font-size: %d%%;'%int((float(size)/3) * 100) setting = 'font-size: %d%%;'%int((float(size)/3) * 100)
except ValueError: except ValueError:

View File

@ -6,8 +6,6 @@ from __future__ import with_statement
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.cam>' __copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.cam>'
import sys
import os
import copy import copy
import re import re
from lxml import etree from lxml import etree
@ -187,7 +185,7 @@ class MobiMLizer(object):
while vspace > 0: while vspace > 0:
wrapper.addprevious(etree.Element(XHTML('br'))) wrapper.addprevious(etree.Element(XHTML('br')))
vspace -= 1 vspace -= 1
if istate.halign != 'auto': if istate.halign != 'auto' and isinstance(istate.halign, (str, unicode)):
para.attrib['align'] = istate.halign para.attrib['align'] = istate.halign
pstate = bstate.istate pstate = bstate.istate
if tag in CONTENT_TAGS: if tag in CONTENT_TAGS:

View File

@ -22,7 +22,7 @@ from calibre.ebooks.mobi.huffcdic import HuffReader
from calibre.ebooks.mobi.palmdoc import decompress_doc from calibre.ebooks.mobi.palmdoc import decompress_doc
from calibre.ebooks.mobi.langcodes import main_language, sub_language from calibre.ebooks.mobi.langcodes import main_language, sub_language
from calibre.ebooks.metadata import MetaInformation from calibre.ebooks.metadata import MetaInformation
from calibre.ebooks.metadata.opf2 import OPFCreator from calibre.ebooks.metadata.opf2 import OPFCreator, OPF
from calibre.ebooks.metadata.toc import TOC from calibre.ebooks.metadata.toc import TOC
from calibre import sanitize_file_name from calibre import sanitize_file_name
@ -126,6 +126,8 @@ class BookHeader(object):
self.exth_flag, = struct.unpack('>L', raw[0x80:0x84]) self.exth_flag, = struct.unpack('>L', raw[0x80:0x84])
self.exth = None self.exth = None
if not isinstance(self.title, unicode):
self.title = self.title.decode(self.codec, 'replace')
if self.exth_flag & 0x40: if self.exth_flag & 0x40:
self.exth = EXTHHeader(raw[16+self.length:], self.codec, self.title) self.exth = EXTHHeader(raw[16+self.length:], self.codec, self.title)
self.exth.mi.uid = self.unique_id self.exth.mi.uid = self.unique_id
@ -138,6 +140,8 @@ class MobiReader(object):
def __init__(self, filename_or_stream, verbose=False): def __init__(self, filename_or_stream, verbose=False):
self.verbose = verbose self.verbose = verbose
self.embedded_mi = None
if hasattr(filename_or_stream, 'read'): if hasattr(filename_or_stream, 'read'):
stream = filename_or_stream stream = filename_or_stream
stream.seek(0) stream.seek(0)
@ -213,7 +217,10 @@ class MobiReader(object):
self.upshift_markup(root) self.upshift_markup(root)
guides = root.xpath('//guide') guides = root.xpath('//guide')
guide = guides[0] if guides else None guide = guides[0] if guides else None
for elem in guides + root.xpath('//metadata'): metadata_elems = root.xpath('//metadata')
if metadata_elems and self.book_header.exth is None:
self.read_embedded_metadata(root, metadata_elems[0], guide)
for elem in guides + metadata_elems:
elem.getparent().remove(elem) elem.getparent().remove(elem)
htmlfile = os.path.join(output_dir, htmlfile = os.path.join(output_dir,
sanitize_file_name(self.name)+'.html') sanitize_file_name(self.name)+'.html')
@ -233,7 +240,7 @@ class MobiReader(object):
f.write(raw) f.write(raw)
self.htmlfile = htmlfile self.htmlfile = htmlfile
if self.book_header.exth is not None: if self.book_header.exth is not None or self.embedded_mi is not None:
if self.verbose: if self.verbose:
print 'Creating OPF...' print 'Creating OPF...'
ncx = cStringIO.StringIO() ncx = cStringIO.StringIO()
@ -243,6 +250,32 @@ class MobiReader(object):
if ncx: if ncx:
open(os.path.splitext(htmlfile)[0]+'.ncx', 'wb').write(ncx) open(os.path.splitext(htmlfile)[0]+'.ncx', 'wb').write(ncx)
def read_embedded_metadata(self, root, elem, guide):
raw = '<package>'+html.tostring(elem, encoding='utf-8')+'</package>'
stream = cStringIO.StringIO(raw)
opf = OPF(stream)
self.embedded_mi = MetaInformation(opf)
if guide is not None:
for ref in guide.xpath('descendant::reference'):
if 'cover' in ref.get('type', '').lower():
href = ref.get('href', '')
if href.startswith('#'):
href = href[1:]
anchors = root.xpath('//*[@id="%s"]'%href)
if anchors:
cpos = anchors[0]
reached = False
for elem in root.iter():
if elem is cpos:
reached = True
if reached and elem.tag == 'img':
cover = elem.get('src', None)
self.embedded_mi.cover = cover
elem.getparent().remove(elem)
break
break
def cleanup_html(self): def cleanup_html(self):
if self.verbose: if self.verbose:
print 'Cleaning up HTML...' print 'Cleaning up HTML...'
@ -331,10 +364,12 @@ class MobiReader(object):
pass pass
def create_opf(self, htmlfile, guide=None, root=None): def create_opf(self, htmlfile, guide=None, root=None):
mi = self.book_header.exth.mi mi = getattr(self.book_header.exth, 'mi', self.embedded_mi)
opf = OPFCreator(os.path.dirname(htmlfile), mi) opf = OPFCreator(os.path.dirname(htmlfile), mi)
if hasattr(self.book_header.exth, 'cover_offset'): if hasattr(self.book_header.exth, 'cover_offset'):
opf.cover = 'images/%05d.jpg'%(self.book_header.exth.cover_offset+1) opf.cover = 'images/%05d.jpg'%(self.book_header.exth.cover_offset+1)
elif mi.cover is not None:
opf.cover = mi.cover
manifest = [(htmlfile, 'text/x-oeb1-document')] manifest = [(htmlfile, 'text/x-oeb1-document')]
bp = os.path.dirname(htmlfile) bp = os.path.dirname(htmlfile)
for i in getattr(self, 'image_names', []): for i in getattr(self, 'image_names', []):
@ -361,7 +396,7 @@ class MobiReader(object):
continue continue
if reached and x.tag == 'a': if reached and x.tag == 'a':
href = x.get('href', '') href = x.get('href', '')
if href: if href and re.match('\w+://', href) is None:
try: try:
text = u' '.join([t.strip() for t in \ text = u' '.join([t.strip() for t in \
x.xpath('descendant::text()')]) x.xpath('descendant::text()')])
@ -370,6 +405,8 @@ class MobiReader(object):
text = ent_pat.sub(entity_to_unicode, text) text = ent_pat.sub(entity_to_unicode, text)
tocobj.add_item(toc.partition('#')[0], href[1:], tocobj.add_item(toc.partition('#')[0], href[1:],
text) text)
if reached and x.get('class', None) == 'mbp_pagebreak':
break
if tocobj is not None: if tocobj is not None:
opf.set_toc(tocobj) opf.set_toc(tocobj)
@ -435,7 +472,7 @@ class MobiReader(object):
def replace_page_breaks(self): def replace_page_breaks(self):
self.processed_html = self.PAGE_BREAK_PAT.sub( self.processed_html = self.PAGE_BREAK_PAT.sub(
'<div style="page-break-after: always; margin: 0; display: block" />', '<div class="mbp_pagebreak" style="page-break-after: always; margin: 0; display: block" />',
self.processed_html) self.processed_html)
def add_anchors(self): def add_anchors(self):
@ -477,7 +514,11 @@ class MobiReader(object):
os.makedirs(output_dir) os.makedirs(output_dir)
image_index = 0 image_index = 0
self.image_names = [] self.image_names = []
for i in range(self.book_header.first_image_index, self.num_sections): start = self.book_header.first_image_index
if start > self.num_sections or start < 0:
# BAEN PRC files have bad headers
start=0
for i in range(start, self.num_sections):
if i in processed_records: if i in processed_records:
continue continue
processed_records.append(i) processed_records.append(i)
@ -521,7 +562,7 @@ def option_parser():
parser = OptionParser(usage=_('%prog [options] myebook.mobi')) parser = OptionParser(usage=_('%prog [options] myebook.mobi'))
parser.add_option('-o', '--output-dir', default='.', parser.add_option('-o', '--output-dir', default='.',
help=_('Output directory. Defaults to current directory.')) help=_('Output directory. Defaults to current directory.'))
parser.add_option('--verbose', default=False, action='store_true', parser.add_option('-v', '--verbose', default=False, action='store_true',
help='Useful for debugging.') help='Useful for debugging.')
return parser return parser

View File

@ -561,6 +561,7 @@ CYRILLIC SMALL LETTER YA:'FF:1103:&#x044F;
</ansicpg1251> </ansicpg1251>
<ansicpg1252> <ansicpg1252>
LATIN SMALL LETTER Y WITH DIAERESIS:'00:00:&#x00FF; LATIN SMALL LETTER Y WITH DIAERESIS:'00:00:&#x00FF;
EURO SIGN:'80:8364:&#x20ac;
SINGLE LOW-9 QUOTATION MARK:'82:8218:&#x201A; SINGLE LOW-9 QUOTATION MARK:'82:8218:&#x201A;
LATIN SMALL LETTER F WITH HOOK:'83:402:&#x0192; LATIN SMALL LETTER F WITH HOOK:'83:402:&#x0192;
DOUBLE LOW-9 QUOTATION MARK:'84:8222:&#x201E; DOUBLE LOW-9 QUOTATION MARK:'84:8222:&#x201E;

View File

@ -46,7 +46,7 @@ class AddFiles(Add):
def metadata_delivered(self, id, mi): def metadata_delivered(self, id, mi):
if self.is_canceled(): if self.is_canceled():
self.reading.wakeAll() self.wake_up()
return return
if not mi.title: if not mi.title:
mi.title = os.path.splitext(self.names[id])[0] mi.title = os.path.splitext(self.names[id])[0]
@ -163,7 +163,7 @@ class AddRecursive(Add):
def metadata_delivered(self, id, mi): def metadata_delivered(self, id, mi):
if self.is_canceled(): if self.is_canceled():
self.reading.wakeAll() self.wake_up()
return return
self.emit(SIGNAL('processed(PyQt_PyObject,PyQt_PyObject)'), self.emit(SIGNAL('processed(PyQt_PyObject,PyQt_PyObject)'),
mi.title, id) mi.title, id)

View File

@ -320,11 +320,17 @@ class ConfigDialog(QDialog, Ui_Dialog):
layout.addWidget(QLabel(_('Error log:'))) layout.addWidget(QLabel(_('Error log:')))
el = QPlainTextEdit(d) el = QPlainTextEdit(d)
layout.addWidget(el) layout.addWidget(el)
try:
el.setPlainText(open(log_error_file, 'rb').read().decode('utf8', 'replace')) el.setPlainText(open(log_error_file, 'rb').read().decode('utf8', 'replace'))
except IOError:
el.setPlainText('No error log found')
layout.addWidget(QLabel(_('Access log:'))) layout.addWidget(QLabel(_('Access log:')))
al = QPlainTextEdit(d) al = QPlainTextEdit(d)
layout.addWidget(al) layout.addWidget(al)
try:
al.setPlainText(open(log_access_file, 'rb').read().decode('utf8', 'replace')) al.setPlainText(open(log_access_file, 'rb').read().decode('utf8', 'replace'))
except IOError:
el.setPlainText('No access log found')
d.show() d.show()
def set_server_options(self): def set_server_options(self):

View File

@ -366,9 +366,14 @@ class SchedulerDialog(QDialog, Ui_Dialog):
def show_recipe(self, index): def show_recipe(self, index):
recipe = self._model.data(index, Qt.UserRole) recipe = self._model.data(index, Qt.UserRole)
self.current_recipe = recipe self.current_recipe = recipe
self.title.setText(recipe.title) self.blurb.setText('''
self.author.setText(_('Created by: ') + recipe.author) <p>
self.description.setText(recipe.description if recipe.description else '') <b>%(title)s</b><br>
%(cb)s %(author)s<br/>
%(description)s
</p>
'''%dict(title=recipe.title, cb=_('Created by: '), author=recipe.author,
description=recipe.description if recipe.description else ''))
self.allow_scheduling = False self.allow_scheduling = False
schedule = -1 if recipe.schedule is None else recipe.schedule schedule = -1 if recipe.schedule is None else recipe.schedule
if schedule < 1e5 and schedule >= 0: if schedule < 1e5 and schedule >= 0:

View File

@ -54,6 +54,27 @@
</item> </item>
<item row="0" column="1" > <item row="0" column="1" >
<layout class="QVBoxLayout" name="verticalLayout_3" > <layout class="QVBoxLayout" name="verticalLayout_3" >
<item>
<widget class="QScrollArea" name="scrollArea" >
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable" >
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>361</width>
<height>500</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" >
<property name="margin" >
<number>0</number>
</property>
<item> <item>
<widget class="QGroupBox" name="detail_box" > <widget class="QGroupBox" name="detail_box" >
<property name="title" > <property name="title" >
@ -61,51 +82,21 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4" > <layout class="QVBoxLayout" name="verticalLayout_4" >
<item> <item>
<widget class="QLabel" name="title" > <widget class="QLabel" name="blurb" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" > <property name="text" >
<string>title</string> <string>blurb</string>
</property> </property>
<property name="textFormat" > <property name="textFormat" >
<enum>Qt::PlainText</enum> <enum>Qt::RichText</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="description" >
<property name="text" >
<string>description</string>
</property> </property>
<property name="wordWrap" > <property name="wordWrap" >
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> <property name="openExternalLinks" >
</item> <bool>true</bool>
<item>
<widget class="QLabel" name="author" >
<property name="text" >
<string>author</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QCheckBox" name="schedule" > <widget class="QCheckBox" name="schedule" >
<property name="text" > <property name="text" >
@ -257,19 +248,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QLabel" name="label" > <widget class="QLabel" name="label" >
<property name="text" > <property name="text" >
@ -287,21 +265,12 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> </layout>
<spacer name="verticalSpacer" > </widget>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget>
</item> </item>
</layout> </layout>
</item> </item>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

View File

@ -1568,6 +1568,8 @@ def main(args=sys.argv):
QCoreApplication.setApplicationName(APP_UID) QCoreApplication.setApplicationName(APP_UID)
single_instance = None if SingleApplication is None else SingleApplication('calibre GUI') single_instance = None if SingleApplication is None else SingleApplication('calibre GUI')
if not singleinstance('calibre GUI'): if not singleinstance('calibre GUI'):
if len(args) > 1:
args[1] = os.path.abspath(args[1])
if single_instance is not None and single_instance.is_running() and \ if single_instance is not None and single_instance.is_running() and \
single_instance.send_message('launched:'+repr(args)): single_instance.send_message('launched:'+repr(args)):
return 0 return 0

View File

@ -157,6 +157,7 @@ class ResultCache(SearchQueryParser):
def __init__(self): def __init__(self):
self._map = self._map_filtered = self._data = [] self._map = self._map_filtered = self._data = []
self.first_sort = True
SearchQueryParser.__init__(self) SearchQueryParser.__init__(self)
def __getitem__(self, row): def __getitem__(self, row):
@ -269,24 +270,28 @@ class ResultCache(SearchQueryParser):
if ans != 0: return ans if ans != 0: return ans
return cmp(self._data[x][10], self._data[y][10]) return cmp(self._data[x][10], self._data[y][10])
def cmp(self, loc, x, y, str=True): def cmp(self, loc, x, y, str=True, subsort=False):
try: try:
ans = cmp(self._data[x][loc].lower(), self._data[y][loc].lower()) if str else\ ans = cmp(self._data[x][loc].lower(), self._data[y][loc].lower()) if str else\
cmp(self._data[x][loc], self._data[y][loc]) cmp(self._data[x][loc], self._data[y][loc])
except AttributeError: # Some entries may be None except AttributeError: # Some entries may be None
ans = cmp(self._data[x][loc], self._data[y][loc]) ans = cmp(self._data[x][loc], self._data[y][loc])
if ans != 0: return ans if subsort and ans == 0:
return cmp(self._data[x][11].lower(), self._data[y][11].lower()) return cmp(self._data[x][11].lower(), self._data[y][11].lower())
return ans
def sort(self, field, ascending): def sort(self, field, ascending, subsort=False):
field = field.lower().strip() field = field.lower().strip()
if field in ('author', 'tag', 'comment'): if field in ('author', 'tag', 'comment'):
field += 's' field += 's'
if field == 'date': field = 'timestamp' if field == 'date': field = 'timestamp'
elif field == 'title': field = 'sort' elif field == 'title': field = 'sort'
elif field == 'authors': field = 'author_sort' elif field == 'authors': field = 'author_sort'
if self.first_sort:
subsort = True
self.first_sort = False
fcmp = self.seriescmp if field == 'series' else \ fcmp = self.seriescmp if field == 'series' else \
functools.partial(self.cmp, FIELD_MAP[field], functools.partial(self.cmp, FIELD_MAP[field], subsort=subsort,
str=field not in ('size', 'rating', 'timestamp')) str=field not in ('size', 'rating', 'timestamp'))
self._map.sort(cmp=fcmp, reverse=not ascending) self._map.sort(cmp=fcmp, reverse=not ascending)

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"

View File

@ -17,7 +17,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: calibre\n" "Project-Id-Version: calibre\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-02-26 19:09+0000\n" "POT-Creation-Date: 2009-02-26 19:09+0000\n"
"PO-Revision-Date: 2009-03-03 16:00+0000\n" "PO-Revision-Date: 2009-03-04 20:00+0000\n"
"Last-Translator: Plazec <Unknown>\n" "Last-Translator: Plazec <Unknown>\n"
"Language-Team: Czech <cs@li.org>\n" "Language-Team: Czech <cs@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41
@ -2810,6 +2810,8 @@ msgstr ""
msgid "" msgid ""
"Adjust the look of the generated ebook by specifying things like font sizes." "Adjust the look of the generated ebook by specifying things like font sizes."
msgstr "" msgstr ""
"Upraví vzhled vytvořené elektronické knihy, například určením velikosti "
"písma."
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub.py:99 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub.py:99
msgid "Specify the page layout settings like margins." msgid "Specify the page layout settings like margins."
@ -2905,7 +2907,7 @@ msgstr "Změnit &obálku:"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:498 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:498
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:368 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single_ui.py:368
msgid "Browse for an image to use as the cover of this book." msgid "Browse for an image to use as the cover of this book."
msgstr "" msgstr "Vybete obrázkový soubor . který se použije jako obálka této knihy."
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:472 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:472
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:500 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:500
@ -2938,11 +2940,13 @@ msgid ""
"Change the author(s) of this book. Multiple authors should be separated by " "Change the author(s) of this book. Multiple authors should be separated by "
"an &. If the author name contains an &, use && to represent it." "an &. If the author name contains an &, use && to represent it."
msgstr "" msgstr ""
"Autor(ři) této knihy. Více autorů by mělo být odďeleno znakem & (ampersand). "
"Pokud jméno autora obsahuje znak &, zadejte ho jako &&."
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:477 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:477
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:505 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:505
msgid "Author So&rt:" msgid "Author So&rt:"
msgstr "" msgstr "Autor ve tvaru \"&příjmení, jméno\"."
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:478 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:478
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:506 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single_ui.py:506
@ -3124,7 +3128,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:518 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:518
msgid "Automatic &chapter detection" msgid "Automatic &chapter detection"
msgstr "" msgstr "Automatické rozpoznávání &kapitol"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:519 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:519
msgid "" msgid ""
@ -3136,71 +3140,71 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:520 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:520
msgid "&XPath:" msgid "&XPath:"
msgstr "" msgstr "Výraz &XPath:"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:521 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:521
msgid "Chapter &mark:" msgid "Chapter &mark:"
msgstr "" msgstr "&Značka kapitol:"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:522 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:522
msgid "Automatic &Table of Contents" msgid "Automatic &Table of Contents"
msgstr "" msgstr "Automatický &Obsah"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:523 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:523
msgid "Number of &links to add to Table of Contents" msgid "Number of &links to add to Table of Contents"
msgstr "" msgstr "&Počet odkazů, které budou přidány do Obsahu"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:524 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:524
msgid "Do not add &detected chapters to the Table of Contents" msgid "Do not add &detected chapters to the Table of Contents"
msgstr "" msgstr "&Nepřidávat automaticky rozpoznané kapitoly do Obsahu"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:525 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:525
msgid "Chapter &threshold" msgid "Chapter &threshold"
msgstr "" msgstr "Prahová úroveň &kapitol"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:526 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:526
msgid "&Force use of auto-generated Table of Contents" msgid "&Force use of auto-generated Table of Contents"
msgstr "" msgstr "&Vždy použít automaticky generovaný obsah"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:527 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:527
msgid "Level &1 TOC" msgid "Level &1 TOC"
msgstr "" msgstr "Obsah úrovně &1"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:528 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:528
msgid "Level &2 TOC" msgid "Level &2 TOC"
msgstr "" msgstr "Obsah úrovně &2"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:529 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:529
msgid "&Title for generated TOC" msgid "&Title for generated TOC"
msgstr "" msgstr "Název vygenerovaného &Obsahu"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:530 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:530
msgid "Level &3 TOC" msgid "Level &3 TOC"
msgstr "" msgstr "Obsah úrovně &3"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:38 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:38
msgid "Author Sort" msgid "Author Sort"
msgstr "" msgstr "Autor (seřadit jako)"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:40 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:40
msgid "ISBN" msgid "ISBN"
msgstr "" msgstr "ISBN"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:104 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:104
msgid "Cannot connect" msgid "Cannot connect"
msgstr "" msgstr "Spojení selhalo"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:105 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:105
msgid "You must specify a valid access key for isbndb.com" msgid "You must specify a valid access key for isbndb.com"
msgstr "" msgstr "Musíte zadat platný přístupový kód pro isbndb.com"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:139 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:139
msgid "Error fetching metadata" msgid "Error fetching metadata"
msgstr "" msgstr "Chyba přebírání metadat"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:144 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:144
msgid "No metadata found" msgid "No metadata found"
msgstr "" msgstr "Nenalezeny žádné metadata"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:144 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/fetch_metadata.py:144
msgid "" msgid ""

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -17,7 +17,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -15,7 +15,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: de\n" "Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-02-26 19:09+0000\n" "POT-Creation-Date: 2009-02-26 19:09+0000\n"
"PO-Revision-Date: 2009-02-26 22:22+0000\n" "PO-Revision-Date: 2009-03-03 17:38+0000\n"
"Last-Translator: S. Dorscht <Unknown>\n" "Last-Translator: Kovid Goyal <Unknown>\n"
"Language-Team: American English <kde-i18n-doc@lists.kde.org>\n" "Language-Team: American English <kde-i18n-doc@lists.kde.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
@ -3209,11 +3209,11 @@ msgid ""
msgstr "" msgstr ""
"<p>Sie können mit Hilfe eines XPath Ausdrucks einstellen, wie Calibre " "<p>Sie können mit Hilfe eines XPath Ausdrucks einstellen, wie Calibre "
"Seitenbegrenzungen erkennt. Zum Gebrauch von XPath Ausdrücken sehen Sie sich " "Seitenbegrenzungen erkennt. Zum Gebrauch von XPath Ausdrücken sehen Sie sich "
"das <a href=\\\"http://calibre.kovidgoyal.net/user_manual/xpath.html\\" "das <a href=\"http://calibre.kovidgoyal.net/user_manual/xpath.html\">XPath "
"\">XPath Tutorial</a> an. Die Seitenbegrenzungen sind nur hilfreich, wenn " "Tutorial</a> an. Die Seitenbegrenzungen sind nur hilfreich, wenn eine "
"eine Zuordnung von Seiten eines Papierbuches auf Punkte im eBook erfolgen " "Zuordnung von Seiten eines Papierbuches auf Punkte im eBook erfolgen soll. "
"soll. Dies stellt ein, wo Adobe Digital Editions die Seitenzahlen am rechten " "Dies stellt ein, wo Adobe Digital Editions die Seitenzahlen am rechten Rand "
"Rand darstellt.</p>" "darstellt.</p>"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:516 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:516
msgid "&Boundary XPath:" msgid "&Boundary XPath:"

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: RUSSIAN FEDERATION\n" "X-Poedit-Country: RUSSIAN FEDERATION\n"
"X-Poedit-Language: Russian\n" "X-Poedit-Language: Russian\n"

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: calibre\n" "Project-Id-Version: calibre\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-02-26 19:09+0000\n" "POT-Creation-Date: 2009-02-26 19:09+0000\n"
"PO-Revision-Date: 2009-02-18 20:47+0000\n" "PO-Revision-Date: 2009-03-05 12:30+0000\n"
"Last-Translator: Kovid Goyal <Unknown>\n" "Last-Translator: Stano Sitar <Unknown>\n"
"Language-Team: Slovak <sk@li.org>\n" "Language-Team: Slovak <sk@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41
@ -356,6 +356,9 @@ msgid ""
"XPath expression to detect page boundaries for building a custom pagination " "XPath expression to detect page boundaries for building a custom pagination "
"map, as used by AdobeDE. Default is not to build an explicit pagination map." "map, as used by AdobeDE. Default is not to build an explicit pagination map."
msgstr "" msgstr ""
"Výraz XPath pre rozoznanie hranice strany pre vytvorenie mapy strán, tak ako "
"je použitý v AdobeDE. Prednastavená hodnota je nevytvárať explicitnú mapu "
"strán."
#: /home/kovid/work/calibre/src/calibre/ebooks/epub/__init__.py:161 #: /home/kovid/work/calibre/src/calibre/ebooks/epub/__init__.py:161
msgid "" msgid ""
@ -363,6 +366,8 @@ msgid ""
"relative to its boundary element. Default is to number all pages staring " "relative to its boundary element. Default is to number all pages staring "
"with 1." "with 1."
msgstr "" msgstr ""
"Výraz XPath pre zistenie mena každej strany v mape strán vo vzťahu k jej "
"hraničnému prvku. Prednastavená hodnota je číslovať všetky strany od 1."
#: /home/kovid/work/calibre/src/calibre/ebooks/epub/__init__.py:165 #: /home/kovid/work/calibre/src/calibre/ebooks/epub/__init__.py:165
msgid "" msgid ""
@ -422,6 +427,9 @@ msgid ""
"of Contents at level three. Each entry is added under the previous level two " "of Contents at level three. Each entry is added under the previous level two "
"entry." "entry."
msgstr "" msgstr ""
"Výraz XPath ktorý špecifikuje všetky návestia (tagy) ktoré majú byť pridané "
"do Obsahu na úrovni tri. Každá hodnota je zadaná pod existujúcou hodnotou "
"úrovne tri."
#: /home/kovid/work/calibre/src/calibre/ebooks/epub/__init__.py:192 #: /home/kovid/work/calibre/src/calibre/ebooks/epub/__init__.py:192
msgid "" msgid ""
@ -3134,14 +3142,20 @@ msgid ""
"pages in a paper book, to locations in the e-book. This controls where Adobe " "pages in a paper book, to locations in the e-book. This controls where Adobe "
"Digital Editions displays the page numbers in the right margin.</p>" "Digital Editions displays the page numbers in the right margin.</p>"
msgstr "" msgstr ""
"<p>Pomocou XPath výrazu môžte ovplyvniť ako Calibre určuje hranice strán. "
"Aby ste sa dozvedeli o použití XPath výrazov, navštívte <a "
"href=\"http://calibre.kovidgoyal.net/user_manual/xpath.html\">XPath "
"tutorial</a>. Hranice strán sú užitočné iba keď chcete namapovať strany z "
"papierovej knihy na presné umiestnenie v e-knihe. Toto určí kde Adobe "
"Digital Editions zobrazí čísla strán na pravom okraji strany.</p>"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:516 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:516
msgid "&Boundary XPath:" msgid "&Boundary XPath:"
msgstr "" msgstr "&Hraničná XPath:"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:517 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:517
msgid "&Name XPath:" msgid "&Name XPath:"
msgstr "" msgstr "&Názov XPath:"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:518 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:518
msgid "Automatic &chapter detection" msgid "Automatic &chapter detection"
@ -3154,6 +3168,10 @@ msgid ""
"href=\"http://calibre.kovidgoyal.net/user_manual/xpath.html\">XPath " "href=\"http://calibre.kovidgoyal.net/user_manual/xpath.html\">XPath "
"tutorial</a></p>" "tutorial</a></p>"
msgstr "" msgstr ""
"<p>Pomocou XPath výrazu môžte ovplyvniť ako Calibre určuje hranice strán. "
"Aby ste sa dozvedeli o použití XPath výrazov, navštívte <a "
"href=\"http://calibre.kovidgoyal.net/user_manual/xpath.html\">XPath "
"tutorial</a>.</p>"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:520 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/epub_ui.py:520
msgid "&XPath:" msgid "&XPath:"
@ -3299,7 +3317,7 @@ msgstr "Štandardné nastavenie prevodu"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single.py:258 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single.py:258
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single.py:341 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single.py:341
msgid "No preprocessing" msgid "No preprocessing"
msgstr "" msgstr "Žiaden pre-processing."
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single.py:261 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/lrf_single.py:261
msgid "" msgid ""
@ -3833,7 +3851,7 @@ msgstr "Každých "
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler_ui.py:173 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler_ui.py:173
msgid "at" msgid "at"
msgstr "" msgstr "na"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler_ui.py:175 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler_ui.py:175
msgid "" msgid ""
@ -3876,7 +3894,7 @@ msgstr "Mazať správy staršie ako "
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/search_item_ui.py:35 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/search_item_ui.py:35
#: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:96 #: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:96
msgid "Form" msgid "Form"
msgstr "" msgstr "Z"
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/search_item_ui.py:36 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/search_item_ui.py:36
msgid "contains" msgid "contains"
@ -4196,6 +4214,26 @@ msgid ""
"expression on a few sample filenames. The group names for the various " "expression on a few sample filenames. The group names for the various "
"metadata entries are documented in tooltips.</p></body></html>" "metadata entries are documented in tooltips.</p></body></html>"
msgstr "" msgstr ""
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" "
"\"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style "
"type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'DejaVu Sans'; font-size:10pt; "
"font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-"
"right:0px; -qt-block-indent:0; text-indent:0px;\">Zadajte Regulárny výraz "
"ktorý sa použije na odhadnutie metadát z e-knihy z názvu súboru. </p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-"
"right:0px; -qt-block-indent:0; text-indent:0px;\">K dispozícii je <a "
"href=\"http://docs.python.org/lib/re-syntax.html\"><span style=\" text-"
"decoration: underline; color:#0000ff;\">Referencia</span></a> na syntax "
"Regulárnych výrazov.</p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-"
"right:0px; -qt-block-indent:0; text-indent:0px;\">Použite <span style=\" "
"font-weight:600;\">Test</span> test funkcionalitu tu dole aby ste otestovali "
"váš relulárny výraz na vzorke niekoľkých názvov súborov. Skupinové mená pre "
"jednotlivé metadáta sú dokumentované v bublinovej nápovede</p></body></html>"
#: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:104 #: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:104
msgid "Regular &expression" msgid "Regular &expression"
@ -4698,7 +4736,7 @@ msgstr "Odosielam správy do zariadenia."
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:900 #: /home/kovid/work/calibre/src/calibre/gui2/main.py:900
msgid "Choose format to send to device" msgid "Choose format to send to device"
msgstr "" msgstr "Vyberte formát na poslanie do zariadenia"
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:954 #: /home/kovid/work/calibre/src/calibre/gui2/main.py:954
msgid "Sending books to device." msgid "Sending books to device."
@ -5050,7 +5088,7 @@ msgstr "Knihy s rovnakými tagmi"
#: /home/kovid/work/calibre/src/calibre/gui2/main_ui.py:372 #: /home/kovid/work/calibre/src/calibre/gui2/main_ui.py:372
msgid "Send specific format to device" msgid "Send specific format to device"
msgstr "" msgstr "Pošlite konkrétny formát do zariadenia"
#: /home/kovid/work/calibre/src/calibre/gui2/main_window.py:18 #: /home/kovid/work/calibre/src/calibre/gui2/main_window.py:18
msgid "" msgid ""
@ -5250,7 +5288,7 @@ msgstr "Pozícia v knihe"
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/main.py:208 #: /home/kovid/work/calibre/src/calibre/gui2/viewer/main.py:208
msgid "/Unknown" msgid "/Unknown"
msgstr "" msgstr "/Neznámy"
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/main.py:213 #: /home/kovid/work/calibre/src/calibre/gui2/viewer/main.py:213
msgid "Go to a reference. To get reference numbers, use the reference mode." msgid "Go to a reference. To get reference numbers, use the reference mode."
@ -5329,7 +5367,7 @@ msgstr "Prehliadač elektronických kníh"
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/main_ui.py:153 #: /home/kovid/work/calibre/src/calibre/gui2/viewer/main_ui.py:153
msgid "toolBar" msgid "toolBar"
msgstr "" msgstr "Panel nástrojov"
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/main_ui.py:156 #: /home/kovid/work/calibre/src/calibre/gui2/viewer/main_ui.py:156
msgid "Next page" msgid "Next page"
@ -5708,6 +5746,13 @@ msgid ""
"(in\n" "(in\n"
"an opf file). You can get id numbers from the list command.\n" "an opf file). You can get id numbers from the list command.\n"
msgstr "" msgstr ""
"%prog export [options] ids\n"
"\n"
"Exportujte knihy špecifikované pomocou ids (zoznam oddelený čiarkami) na "
"súborový systém.\n"
"Operácia exportu uloží všetky formáty knihy, obrázok obalu knihy a metadáta "
"\n"
"(v súbore opf). ID čísla môžte distiť pomocou príkazu list.\n"
#: /home/kovid/work/calibre/src/calibre/library/cli.py:496 #: /home/kovid/work/calibre/src/calibre/library/cli.py:496
msgid "Export all books in database, ignoring the list of ids." msgid "Export all books in database, ignoring the list of ids."
@ -5939,11 +5984,16 @@ msgid ""
"If you specify this option, any argument to %prog is ignored and a default " "If you specify this option, any argument to %prog is ignored and a default "
"recipe is used to download the feeds." "recipe is used to download the feeds."
msgstr "" msgstr ""
"Zadajte zoznam \"feedov\" na stiahnutie. Napríklad:\n"
"\"['http://feeds.newsweek.com/newsweek/TopNews', "
"'http://feeds.newsweek.com/headlines/politics']\"\n"
"Ak využijetre túto voľbu, akýkoľvek argument pre %prog je ignorovaný a "
"prednastavený recept je určený aby stiahol \"feed-y\""
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:37 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:37
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:94 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:94
msgid "Be more verbose while processing." msgid "Be more verbose while processing."
msgstr "" msgstr "Použi viac hlášok pri spracovaní"
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:39 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:39
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:96 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:96
@ -5969,6 +6019,8 @@ msgid ""
"Number of levels of links to follow on webpages that are linked to from " "Number of levels of links to follow on webpages that are linked to from "
"feeds. Defaul %default" "feeds. Defaul %default"
msgstr "" msgstr ""
"Počet úrovní odkazov ktoré sa budú nasledovať na stránkach, ktoré sú "
"prilinkované vo feedoch. Prednastavená hodnota %default"
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:53 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:53
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:103 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:103
@ -5976,6 +6028,8 @@ msgid ""
"The directory in which to store the downloaded feeds. Defaults to the " "The directory in which to store the downloaded feeds. Defaults to the "
"current directory." "current directory."
msgstr "" msgstr ""
"Adresár kam sa ukladajú stiahnuté feedy. Prednastavená hodnota je aktuálny "
"adresár."
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:55 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:55
msgid "Don't show the progress bar" msgid "Don't show the progress bar"
@ -5992,6 +6046,8 @@ msgid ""
"Useful for recipe development. Forces max_articles_per_feed to 2 and " "Useful for recipe development. Forces max_articles_per_feed to 2 and "
"downloads at most 2 feeds." "downloads at most 2 feeds."
msgstr "" msgstr ""
"Užitečné na vývoj (testovanie pri vývoji) receptov. Natvrdo nastaví hodnotu "
"max_articles_per_feed (max. článkov pre feed) na 2 a stiahne najviac 2 feedy."
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:63 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:63
msgid "" msgid ""
@ -6013,6 +6069,23 @@ msgid ""
"Available builtin recipes are:\n" "Available builtin recipes are:\n"
"%s\n" "%s\n"
msgstr "" msgstr ""
"%%prog [options] ARG\n"
"\n"
"%%prog spracuje on-line zdroj článkov, ako napríklad RSS alebo ATOM feed a\n"
"stiahne obsah článku zorganizovaný v peknej hierarchii.\n"
"\n"
"ARG môže byť jeden z:\n"
"\n"
"názov súboru - %%prog sa pokúsi načítať recept zo súboru\n"
"\n"
"názov receptu zabudovaného v Calibre - %%prog načíta zabudovaný recept a "
"použije ho n astiahnutie feedu.. Pre napr. Newsweek alebo \"The BBC\" alebo "
"\"The New York Times\"\n"
"\n"
"recept ako reťazac - %%prog načíta recept priamo z reťazca.\n"
"\n"
"K dispozícii sú nasledujúce zabudované recepty:\n"
"%s\n"
#: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:87 #: /home/kovid/work/calibre/src/calibre/web/feeds/main.py:87
msgid "" msgid ""
@ -6277,7 +6350,7 @@ msgstr "Nemčina"
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_hindu.py:12 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_hindu.py:12
msgid "Kovid Goyal" msgid "Kovid Goyal"
msgstr "" msgstr "Kovid Goyal"
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_jutarnji.py:22 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_jutarnji.py:22
msgid "Croatian" msgid "Croatian"
@ -6285,15 +6358,15 @@ msgstr "Chorvátština"
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_la_republica.py:6 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_la_republica.py:6
msgid "Italian" msgid "Italian"
msgstr "" msgstr "Taliančina"
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_le_monde.py:83 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_le_monde.py:83
msgid "Skipping duplicated article: %s" msgid "Skipping duplicated article: %s"
msgstr "" msgstr "Preskakujem duplicitný článok: %s"
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_le_monde.py:88 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_le_monde.py:88
msgid "Skipping filtered article: %s" msgid "Skipping filtered article: %s"
msgstr "" msgstr "Preskakujem odfiltrovaný článok: %s"
#: /home/kovid/work/calibre/src/calibre/web/fetch/simple.py:454 #: /home/kovid/work/calibre/src/calibre/web/fetch/simple.py:454
msgid "" msgid ""

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-03-03 17:04+0000\n" "X-Launchpad-Export-Date: 2009-03-06 17:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41 #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:41

View File

@ -7,7 +7,7 @@ Builtin recipes.
recipe_modules = ['recipe_' + r for r in ( recipe_modules = ['recipe_' + r for r in (
'newsweek', 'atlantic', 'economist', 'portfolio', 'newsweek', 'atlantic', 'economist', 'portfolio',
'nytimes', 'usatoday', 'outlook_india', 'bbc', 'greader', 'wsj', 'nytimes', 'usatoday', 'outlook_india', 'bbc', 'greader', 'wsj',
'wired', 'globe_and_mail', 'smh', 'espn', 'business_week', 'wired', 'globe_and_mail', 'smh', 'espn', 'business_week', 'miami_herald',
'ars_technica', 'upi', 'new_yorker', 'irish_times', 'iht', 'lanacion', 'ars_technica', 'upi', 'new_yorker', 'irish_times', 'iht', 'lanacion',
'discover_magazine', 'scientific_american', 'new_york_review_of_books', 'discover_magazine', 'scientific_american', 'new_york_review_of_books',
'daily_telegraph', 'guardian', 'el_pais', 'new_scientist', 'b92', 'daily_telegraph', 'guardian', 'el_pais', 'new_scientist', 'b92',

View File

@ -0,0 +1,53 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
miamiherald.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class TheMiamiHerald(BasicNewsRecipe):
title = 'The Miami Herald'
__author__ = 'Darko Miletic'
description = "Miami-Dade and Broward's source for the latest breaking local news on sports, weather, business, jobs, real estate, shopping, health, travel, entertainment, & more."
oldest_article = 1
max_articles_per_feed = 100
publisher = u'The Miami Herald'
category = u'miami herald, weather, dolphins, news, miami news, local news, miamiherald, miami newspaper, miamiherald.com, miami, the miami herald, broward, miami-dade'
language = _('English')
no_stylesheets = True
use_embedded_content = False
encoding = 'cp1252'
remove_javascript = True
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
html2lrf_options = [
'--comment' , description
, '--category' , category
, '--publisher' , publisher
]
keep_only_tags = [dict(name='div', attrs={'id':'pageContainer'})]
feeds = [
(u'Breaking News' , u'http://www.miamiherald.com/416/index.xml' )
,(u'Miami-Dade' , u'http://www.miamiherald.com/460/index.xml' )
,(u'Broward' , u'http://www.miamiherald.com/467/index.xml' )
,(u'Florida Keys' , u'http://www.miamiherald.com/505/index.xml' )
,(u'Florida' , u'http://www.miamiherald.com/569/index.xml' )
,(u'Nation' , u'http://www.miamiherald.com/509/index.xml' )
,(u'World' , u'http://www.miamiherald.com/578/index.xml' )
,(u'Americas' , u'http://www.miamiherald.com/579/index.xml' )
,(u'Cuba' , u'http://www.miamiherald.com/581/index.xml' )
,(u'Haiti' , u'http://www.miamiherald.com/582/index.xml' )
,(u'Politics' , u'http://www.miamiherald.com/515/index.xml' )
,(u'Education' , u'http://www.miamiherald.com/295/index.xml' )
,(u'Environment' , u'http://www.miamiherald.com/573/index.xml' )
]
def print_version(self, url):
return url.replace('/story/','/v-print/story/')

View File

@ -68,10 +68,9 @@ class Newsweek(BasicNewsRecipe):
def parse_index(self): def parse_index(self):
ci = self.get_current_issue() soup = self.get_current_issue()
if not ci: if not soup:
raise RuntimeError('Unable to connect to newsweek.com. Try again later.') raise RuntimeError('Unable to connect to newsweek.com. Try again later.')
soup = self.index_to_soup(ci)
img = soup.find(alt='Cover') img = soup.find(alt='Cover')
if img is not None and img.has_key('src'): if img is not None and img.has_key('src'):
small = img['src'] small = img['src']
@ -119,10 +118,10 @@ class Newsweek(BasicNewsRecipe):
return soup return soup
def get_current_issue(self): def get_current_issue(self):
from urllib2 import urlopen # For some reason mechanize fails #from urllib2 import urlopen # For some reason mechanize fails
home = urlopen('http://www.newsweek.com').read() #home = urlopen('http://www.newsweek.com').read()
soup = BeautifulSoup(home) soup = self.index_to_soup('http://www.newsweek.com')#BeautifulSoup(home)
img = soup.find('img', alt='Current Magazine') img = soup.find('img', alt='Current Magazine')
if img and img.parent.has_key('href'): if img and img.parent.has_key('href'):
return urlopen(img.parent['href']).read() return self.index_to_soup(img.parent['href'])

View File

@ -3,7 +3,7 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008-2009, Darko Miletic <darko.miletic at gmail.com>' __copyright__ = '2008-2009, Darko Miletic <darko.miletic at gmail.com>'
''' '''
nin.co.yu nin.co.rs
''' '''
import re, urllib import re, urllib
@ -19,14 +19,17 @@ class Nin(BasicNewsRecipe):
oldest_article = 15 oldest_article = 15
simultaneous_downloads = 1 simultaneous_downloads = 1
delay = 1 delay = 1
encoding = 'utf8' encoding = 'utf-8'
needs_subscription = True needs_subscription = True
PREFIX = 'http://www.nin.co.yu' PREFIX = 'http://www.nin.co.rs'
INDEX = PREFIX + '/?change_lang=ls' INDEX = PREFIX + '/?change_lang=ls'
LOGIN = PREFIX + '/?logout=true' LOGIN = PREFIX + '/?logout=true'
FEED = PREFIX + '/misc/rss.php?feed=RSS2.0'
remove_javascript = True remove_javascript = True
use_embedded_content = False use_embedded_content = False
language = _('Serbian') language = _('Serbian')
lang = 'sr-RS'
direction = 'ltr'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{text-align: justify; font-family: serif1, serif} .article_description{font-family: sans1, sans-serif}' extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{text-align: justify; font-family: serif1, serif} .article_description{font-family: sans1, sans-serif}'
html2lrf_options = [ html2lrf_options = [
@ -54,7 +57,7 @@ class Nin(BasicNewsRecipe):
keep_only_tags =[dict(name='td', attrs={'width':'520'})] keep_only_tags =[dict(name='td', attrs={'width':'520'})]
remove_tags_after =dict(name='html') remove_tags_after =dict(name='html')
feeds =[(u'NIN', u'http://www.nin.co.yu/misc/rss.php?feed=RSS2.0')] feeds =[(u'NIN', FEED)]
def get_cover_url(self): def get_cover_url(self):
cover_url = None cover_url = None
@ -65,8 +68,16 @@ class Nin(BasicNewsRecipe):
return cover_url return cover_url
def preprocess_html(self, soup): def preprocess_html(self, soup):
mtag = '<meta http-equiv="Content-Language" content="sr-Latn-RS"/>' soup.html['lang'] = self.lang
soup.html['dir' ] = self.direction
mtag = '<meta http-equiv="Content-Language" content="' + self.lang + '"/>'
mtag += '\n<meta http-equiv="Content-Type" content="text/html; charset=' + self.encoding + '"/>'
soup.head.insert(0,mtag) soup.head.insert(0,mtag)
for item in soup.findAll(style=True): for item in soup.findAll(style=True):
del item['style'] del item['style']
return soup return soup
def get_article_url(self, article):
raw = article.get('link', None)
return raw.replace('.co.yu','.co.rs')