GwR revise single-section periodical type byte enabling Kindle content management

This commit is contained in:
GRiker 2010-03-29 08:24:42 -07:00
commit 71a2521d87
31 changed files with 293 additions and 307 deletions

View File

@ -21,6 +21,7 @@ class Ser24Sata(BasicNewsRecipe):
encoding = 'utf-8'
use_embedded_content = False
language = 'sr'
publication_type = 'newspaper'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: serif1, serif}'
conversion_options = {

View File

@ -10,7 +10,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
class B92(BasicNewsRecipe):
title = 'B92'
__author__ = 'Darko Miletic'
description = 'Dnevne vesti iz Srbije i sveta'
description = 'B92 info, najnovije vesti iz Srbije, regiona i sveta'
publisher = 'B92'
category = 'news, politics, Serbia'
oldest_article = 2
@ -19,6 +19,7 @@ class B92(BasicNewsRecipe):
use_embedded_content = False
encoding = 'cp1250'
language = 'sr'
publication_type = 'newsportal'
extra_css = ' @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: serif1, serif} '
conversion_options = {

View File

@ -18,6 +18,7 @@ class Danas(BasicNewsRecipe):
no_stylesheets = False
use_embedded_content = True
language = 'sr'
publication_type = 'newsportal'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif} img{margin-bottom: 0.8em} '
conversion_options = {

View File

@ -20,7 +20,8 @@ class Blic(BasicNewsRecipe):
use_embedded_content = False
masthead_url = 'http://www.blic.rs/resources/images/header/header_back.png'
language = 'sr'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: Georgia, serif1, serif} .article_description{font-family: Arial, sans1, sans-serif} .img_full{float: none} img{margin-bottom: 0.8em} '
publication_type = 'newspaper'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: Georgia, serif1, serif} .article_description{font-family: Arial, sans1, sans-serif} .img_full{float: none} img{margin-bottom: 0.8em} '
conversion_options = {
'comment' : description
@ -41,4 +42,6 @@ class Blic(BasicNewsRecipe):
return url + '/print'
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
return self.adeify_images(soup)

View File

@ -15,6 +15,7 @@ class Chetnixploitation(BasicNewsRecipe):
oldest_article = 7
max_articles_per_feed = 100
language = 'sr'
publication_type = 'blog'
encoding = 'utf-8'
no_stylesheets = True
use_embedded_content = True
@ -32,5 +33,3 @@ class Chetnixploitation(BasicNewsRecipe):
def preprocess_html(self, soup):
return self.adeify_images(soup)

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
'''
@ -20,7 +21,9 @@ class Danas(BasicNewsRecipe):
encoding = 'utf-8'
masthead_url = 'http://www.danas.rs/images/basic/danas.gif'
language = 'sr'
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)} .article_description,body,.lokacija{font-family: Tahoma,Arial,Helvetica,sans1,sans-serif} .nadNaslov,h1,.preamble{font-family: Georgia,"Times New Roman",Times,serif1,serif} .antrfileText{border-left: 2px solid #999999; margin-left: 0.8em; padding-left: 1.2em; margin-bottom: 0; margin-top: 0} h2,.datum,.lokacija,.autor{font-size: small} .antrfileNaslov{border-left: 2px solid #999999; margin-left: 0.8em; padding-left: 1.2em; font-weight:bold; margin-bottom: 0; margin-top: 0} img{margin-bottom: 0.8em} '
publication_type = 'newspaper'
remove_empty_feeds = True
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)} .article_description,body,.lokacija{font-family: Tahoma,Arial,Helvetica,sans1,sans-serif} .nadNaslov,h1,.preamble{font-family: Georgia,"Times New Roman",Times,serif1,serif} .antrfileText{border-left: 2px solid #999999; margin-left: 0.8em; padding-left: 1.2em; margin-bottom: 0; margin-top: 0} h2,.datum,.lokacija,.autor{font-size: small} .antrfileNaslov{border-left: 2px solid #999999; margin-left: 0.8em; padding-left: 1.2em; font-weight:bold; margin-bottom: 0; margin-top: 0} img{margin-bottom: 0.8em} '
conversion_options = {
'comment' : description
@ -41,7 +44,7 @@ class Danas(BasicNewsRecipe):
feeds = [
(u'Politika' , u'http://www.danas.rs/rss/rss.asp?column_id=27')
,(u'Hronika' , u'http://www.danas.rs/rss/rss.asp?column_id=2' )
,(u'Drustvo' , u'http://www.danas.rs/rss/rss.asp?column_id=24')
,(u'Dru\xc5\xa1tvo', u'http://www.danas.rs/rss/rss.asp?column_id=24')
,(u'Dijalog' , u'http://www.danas.rs/rss/rss.asp?column_id=1' )
,(u'Ekonomija', u'http://www.danas.rs/rss/rss.asp?column_id=6' )
,(u'Svet' , u'http://www.danas.rs/rss/rss.asp?column_id=25')
@ -51,12 +54,13 @@ class Danas(BasicNewsRecipe):
,(u'Scena' , u'http://www.danas.rs/rss/rss.asp?column_id=42')
,(u'Feljton' , u'http://www.danas.rs/rss/rss.asp?column_id=19')
,(u'Periskop' , u'http://www.danas.rs/rss/rss.asp?column_id=4' )
,(u'Famozno' , u'http://www.danas.rs/rss/rss.asp?column_id=47')
]
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
return soup
return self.adeify_images(soup)
def print_version(self, url):
return url + '&action=print'

View File

@ -20,6 +20,7 @@ class E_novine(BasicNewsRecipe):
encoding = 'utf-8'
use_embedded_content = False
language = 'sr'
publication_type = 'newsportal'
masthead_url = 'http://www.e-novine.com/themes/e_novine/img/logo.gif'
extra_css = ' @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} .article_description,body{font-family: Arial,Helvetica,sans1,sans-serif} img{float: none; margin-bottom: 0.8em} '

View File

@ -22,6 +22,7 @@ class GlasSrpske(BasicNewsRecipe):
use_embedded_content = False
masthead_url = 'http://www.glassrpske.com/var/slike/glassrpske-logo.png'
language = 'sr'
publication_type = 'newspaper'
INDEX = 'http://www.glassrpske.com'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: serif1, serif} img{margin-bottom: 0.8em} '

View File

@ -18,6 +18,7 @@ class GlasJavnosti(BasicNewsRecipe):
no_stylesheets = False
use_embedded_content = False
language = 'sr'
publication_type = 'newspaper'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif} img{margin-bottom: 0.8em} '
conversion_options = {

View File

@ -10,7 +10,7 @@ class IrishIndependent(BasicNewsRecipe):
title = u'Irish Independent'
description = 'Irish and World news from Irelands Bestselling Daily Broadsheet'
__author__ = 'Neil Grogan'
language = 'en_GB'
language = 'en_IE'
oldest_article = 7
max_articles_per_feed = 100
remove_tags_before = dict(id='article')

View File

@ -10,7 +10,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
class IrishTimes(BasicNewsRecipe):
title = u'The Irish Times'
__author__ = "Derry FitzGerald, Ray Kinsella and David O'Callaghan"
language = 'en'
language = 'en_IE'
timefmt = ' (%A, %B %d, %Y)'

View File

@ -25,7 +25,8 @@ class Nin(BasicNewsRecipe):
LOGIN = PREFIX + '/?logout=true'
use_embedded_content = False
language = 'sr'
extra_css = ' @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: Verdana, Lucida, sans1, sans-serif} .article_description{font-family: Verdana, Lucida, sans1, sans-serif} .artTitle{font-size: x-large; font-weight: bold; color: #900} .izjava{font-size: x-large; font-weight: bold} .columnhead{font-size: small; font-weight: bold;} img{margin-top:0.5em; margin-bottom: 0.7em} b{margin-top: 1em} '
publication_type = 'magazine'
extra_css = ' @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: Verdana, Lucida, sans1, sans-serif} .article_description{font-family: Verdana, Lucida, sans1, sans-serif} .artTitle{font-size: x-large; font-weight: bold; color: #900} .izjava{font-size: x-large; font-weight: bold} .columnhead{font-size: small; font-weight: bold;} img{margin-top:0.5em; margin-bottom: 0.7em} b{margin-top: 1em} '
conversion_options = {
'comment' : description

View File

@ -1,14 +1,12 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008-2009, Darko Miletic <darko.miletic at gmail.com>'
__copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
'''
novosti.rs
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag
class Novosti(BasicNewsRecipe):
title = 'Vecernje Novosti'
@ -21,17 +19,16 @@ class Novosti(BasicNewsRecipe):
no_stylesheets = True
use_embedded_content = False
encoding = 'utf-8'
language = 'sr'
lang = 'sr-Latn-RS'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif}'
language = 'sr'
publication_type = 'newspaper'
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)} .article_description,body{font-family: Tahoma,Arial,Helvetica,sans1,sans-serif} '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : lang
, 'pretty_print' : True
, 'language' : language
, 'linearize_tables' : True
}
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
@ -42,17 +39,6 @@ class Novosti(BasicNewsRecipe):
feeds = [(u'Vesti', u'http://www.novosti.rs/php/vesti/rss.php')]
def preprocess_html(self, soup):
mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)])
soup.head.insert(0,mlang)
attribs = [ 'style','font','valign'
,'colspan','width','height'
,'rowspan','summary','align'
,'cellspacing','cellpadding'
,'frames','rules','border'
]
for item in soup.body.findAll(name=['table','td','tr','th','caption','thead','tfoot','tbody','colgroup','col']):
item.name = 'div'
for attrib in attribs:
if item.has_key(attrib):
del item[attrib]
return soup
for item in soup.findAll(style=True):
del item['style']
return self.adeify_images(soup)

View File

@ -20,6 +20,7 @@ class Nspm(BasicNewsRecipe):
INDEX = 'http://www.nspm.rs/?alphabet=l'
encoding = 'utf-8'
language = 'sr'
publication_type = 'magazine'
masthead_url = 'http://www.nspm.rs/templates/jsn_epic_pro/images/logol.jpg'
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}'

View File

@ -9,7 +9,8 @@ import re
import time
from calibre import entity_to_unicode
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag, NavigableString, Comment
from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag, NavigableString, \
Comment, BeautifulStoneSoup
class NYTimes(BasicNewsRecipe):
@ -256,7 +257,6 @@ class NYTimes(BasicNewsRecipe):
# Fetch the outer table
table = soup.find('table')
previousTable = table
contentTable = None
# Find the deepest table containing the stories
while True :

View File

@ -89,6 +89,7 @@ class NYTimes(BasicNewsRecipe):
'header_search',
'login',
'masthead',
'masthead-nav',
'memberTools',
'navigation',
'portfolioInline',

View File

@ -1,14 +1,11 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008-2009, Darko Miletic <darko.miletic at gmail.com>'
__copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
'''
pescanik.net
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag
class Pescanik(BasicNewsRecipe):
title = 'Pescanik'
@ -21,17 +18,16 @@ class Pescanik(BasicNewsRecipe):
no_stylesheets = True
use_embedded_content = False
encoding = 'utf-8'
language = 'sr'
lang = 'sr-Latn-RS'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif} .contentheading{font-size: x-large; font-weight: bold} .small{font-size: small} .createdate{font-size: x-small; font-weight: bold}'
language = 'sr'
publication_type = 'newsportal'
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)} .article_description,body{font-family: Arial,"Lucida Grande",Tahoma,Verdana,sans1,sans-serif} .contentheading{font-size: x-large; font-weight: bold} .small{font-size: small} .createdate{font-size: x-small; font-weight: bold}'
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : lang
, 'pretty_print' : True
, 'language' : language
, 'linearize_tables' : True
}
@ -50,17 +46,4 @@ class Pescanik(BasicNewsRecipe):
return nurl + '&pop=1&page=0'
def preprocess_html(self, soup):
mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)])
soup.head.insert(0,mlang)
attribs = [ 'style','font','valign'
,'colspan','width','height'
,'rowspan','summary','align'
,'cellspacing','cellpadding'
,'frames','rules','border'
]
for item in soup.body.findAll(name=['table','td','tr','th','caption','thead','tfoot','tbody','colgroup','col']):
item.name = 'div'
for attrib in attribs:
if item.has_key(attrib):
del item[attrib]
return self.adeify_images(soup)

View File

@ -5,7 +5,7 @@ class RTE(BasicNewsRecipe):
oldest_article = 7
max_articles_per_feed = 100
__author__ = u'Robin Phillips'
language = 'en_GB'
language = 'en_IE'
remove_tags = [dict(attrs={'class':['topAd','botad','previousNextItem','headline','footerLinks','footernav']})]

View File

@ -18,6 +18,7 @@ class TheCultOfGhoul(BasicNewsRecipe):
encoding = 'utf-8'
no_stylesheets = True
use_embedded_content = True
publication_type = 'blog'
extra_css = ' @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: "Trebuchet MS",Trebuchet,Verdana,sans1,sans-serif} .article_description{font-family: sans1, sans-serif} img{margin-bottom: 0.8em; border: 1px solid #333333; padding: 4px } '
conversion_options = {

View File

@ -128,7 +128,6 @@ class USAToday(BasicNewsRecipe):
def parse_feeds(self, *args, **kwargs):
parsed_feeds = BasicNewsRecipe.parse_feeds(self, *args, **kwargs)
# Count articles for progress dialog
content_feeds = []
article_count = 0
for feed in parsed_feeds:
article_count += len(feed)
@ -297,7 +296,6 @@ class USAToday(BasicNewsRecipe):
if not headline_found:
# Monolithic <div> - restructure
insert_loc = 0
tag = body.find(True)
while True:
insertLoc += 1

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
'''
vijesti.me
@ -9,7 +8,6 @@ vijesti.me
import re
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag
class Vijesti(BasicNewsRecipe):
title = 'Vijesti'
@ -22,17 +20,16 @@ class Vijesti(BasicNewsRecipe):
no_stylesheets = True
encoding = 'cp1250'
use_embedded_content = False
language = 'sr'
lang ='sr-Latn-Me'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif}'
language = 'sr'
publication_type = 'newspaper'
masthead_url = 'http://www.vijesti.me/img/logo.gif'
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif}'
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : lang
, 'pretty_print' : True
, 'language' : language
}
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
@ -44,15 +41,5 @@ class Vijesti(BasicNewsRecipe):
feeds = [(u'Sve vijesti', u'http://www.vijesti.me/rss.php' )]
def preprocess_html(self, soup):
soup.html['xml:lang'] = self.lang
soup.html['lang'] = self.lang
mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)])
mcharset = Tag(soup,'meta',[("http-equiv","Content-Type"),("content","text/html; charset=UTF-8")])
soup.head.insert(0,mlang)
soup.head.insert(1,mcharset)
return self.adeify_images(soup)
def get_article_url(self, article):
raw = article.get('link', None)
return raw.replace('.cg.yu','.me')

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008-2009, Darko Miletic <darko.miletic at gmail.com>'
'''
@ -9,7 +7,6 @@ vreme.com
import re
from calibre import strftime
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag
class Vreme(BasicNewsRecipe):
title = 'Vreme'
@ -24,22 +21,23 @@ class Vreme(BasicNewsRecipe):
LOGIN = 'http://www.vreme.com/account/login.php?url=%2F'
use_embedded_content = False
encoding = 'utf-8'
language = 'sr'
lang = 'sr-Latn-RS'
direction = 'ltr'
language = 'sr'
publication_type = 'magazine'
masthead_url = 'http://www.vreme.com/g/vreme-logo.gif'
extra_css = ' @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: serif1, serif} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} .heading1{font-family: sans1, sans-serif; font-size: x-large; font-weight: bold} .heading2{font-family: sans1, sans-serif; font-size: large; font-weight: bold} .toc-heading{font-family: sans1, sans-serif; font-size: small} .column-heading2{font-family: sans1, sans-serif; font-size: large} .column-heading1{font-family: sans1, sans-serif; font-size: x-large} .column-normal{font-family: sans1, sans-serif; font-size: medium} .large{font-family: sans1, sans-serif; font-size: large} '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : lang
, 'pretty_print' : True
, 'language' : language
, 'linearize_tables' : True
}
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
remove_tags_before = dict(attrs={'class':'toc-heading'})
remove_tags_after = dict(attrs={'class':'footer' })
def get_browser(self):
br = BasicNewsRecipe.get_browser()
@ -79,31 +77,6 @@ class Vreme(BasicNewsRecipe):
def print_version(self, url):
return url + '&print=yes'
def preprocess_html(self, soup):
del soup.body['text' ]
del soup.body['bgcolor']
del soup.body['onload' ]
soup.html['lang'] = self.lang
soup.html['dir' ] = self.direction
attribs = [ 'style','font','valign'
,'colspan','width','height'
,'rowspan','summary','align'
,'cellspacing','cellpadding'
,'frames','rules','border'
]
for item in soup.body.findAll(name=['table','td','tr','th','caption','thead','tfoot','tbody','colgroup','col']):
item.name = 'div'
for attrib in attribs:
if item.has_key(attrib):
del item[attrib]
mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)])
mcharset = Tag(soup,'meta',[("http-equiv","Content-Type"),("content","text/html; charset=UTF-8")])
soup.head.insert(0,mlang)
soup.head.insert(1,mcharset)
return soup
def get_cover_url(self):
cover_url = None
soup = self.index_to_soup(self.INDEX)

View File

@ -30,7 +30,7 @@ class ANDROID(USBMS):
EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(EBOOK_DIR_MAIN)
VENDOR_NAME = ['HTC', 'MOTOROLA', 'GOOGLE_', 'ANDROID']
WINDOWS_MAIN_MEM = ['ANDROID_PHONE', 'A855', 'INC.NEXUS_ONE',
WINDOWS_MAIN_MEM = ['ANDROID_PHONE', 'A855', 'A853', 'INC.NEXUS_ONE',
'___UMS_COMPOSITE',]
OSX_MAIN_MEM = 'HTC Android Phone Media'

View File

@ -25,7 +25,6 @@ from calibre.devices.mime import mime_type_ext
# are inherited from the device interface in Device.
class USBMS(CLI, Device):
name = 'USBMS Base Device Interface'
description = _('Communicate with an eBook reader.')
author = _('John Schember')
supported_platforms = ['windows', 'osx', 'linux']

View File

@ -12,7 +12,6 @@ __docformat__ = 'restructuredtext en'
from struct import pack, unpack
from cStringIO import StringIO
from calibre.ebooks.conversion.config import load_defaults
from calibre.ebooks.mobi import MobiError
from calibre.ebooks.mobi.writer import rescale_image, MAX_THUMB_DIMEN
from calibre.ebooks.mobi.langcodes import iana2mobi
@ -323,11 +322,13 @@ class MetadataUpdater(object):
recs = []
try:
from calibre.ebooks.conversion.config import load_defaults
prefs = load_defaults('mobi_output')
pas = prefs.get('prefer_author_sort', False)
from calibre.ebooks.conversion.config import load_defaults
prefs = load_defaults('mobi_output')
pas = prefs.get('prefer_author_sort', False)
kindle_pdoc = prefs.get('personal_doc', None)
except:
pas = False
kindle_pdoc = None
if mi.author_sort and pas:
authors = mi.author_sort
update_exth_record((100, authors.encode(self.codec, 'replace')))
@ -351,9 +352,7 @@ class MetadataUpdater(object):
subjects = '; '.join(mi.tags)
update_exth_record((105, subjects.encode(self.codec, 'replace')))
prefs = load_defaults('mobi_output')
kindle_pdoc = prefs.get('personal_doc', None)
if kindle_pdoc in mi.tags:
if kindle_pdoc and kindle_pdoc in mi.tags:
update_exth_record((501, str('PDOC')))
if mi.pubdate:

View File

@ -127,6 +127,7 @@ class BookHeader(object):
self.length, self.type, self.codepage, self.unique_id, \
self.version = struct.unpack('>LLLLL', raw[20:40])
try:
self.codec = {
1252: 'cp1252',
@ -153,31 +154,24 @@ class BookHeader(object):
sublangid = (langcode >> 10) & 0xFF
self.language = main_language.get(langid, 'ENGLISH')
self.sublanguage = sub_language.get(sublangid, 'NEUTRAL')
self.mobi_version = struct.unpack('>I', raw[0x68:0x6c])[0]
self.first_image_index = struct.unpack('>L', raw[0x6c:0x6c + 4])[0]
if ident == 'TEXTREAD':
self.mobi_version = 1
self.first_image_index = -1
self.exth_flag = 0
self.exth = None
else:
self.mobi_version = struct.unpack('>I', raw[0x68:0x6c])[0]
self.first_image_index = struct.unpack('>L', raw[0x6c:0x6c + 4])[0]
self.exth_flag, = struct.unpack('>L', raw[0x80:0x84])
self.exth = None
if not isinstance(self.title, unicode):
self.title = self.title.decode(self.codec, 'replace')
if self.exth_flag & 0x40:
self.exth_flag, = struct.unpack('>L', raw[0x80:0x84])
self.exth = None
if not isinstance(self.title, unicode):
self.title = self.title.decode(self.codec, 'replace')
if self.exth_flag & 0x40:
try:
self.exth = EXTHHeader(raw[16 + self.length:], self.codec, self.title)
self.exth.mi.uid = self.unique_id
try:
self.exth = EXTHHeader(raw[16 + self.length:], self.codec, self.title)
self.exth.mi.uid = self.unique_id
try:
self.exth.mi.language = mobi2iana(langid, sublangid)
except:
self.log.exception("'%s': Unknown language code" % getattr(stream, 'name', 'Unnamed stream'))
self.exth.mi.language = mobi2iana(langid, sublangid)
except:
self.log.exception("'%s': Invalid EXTH header" % getattr(stream, 'name', 'Unnamed stream'))
self.exth_flag = 0
self.log.exception('Unknown language code')
except:
self.log.exception('Invalid EXTH header')
self.exth_flag = 0
class MetadataHeader(BookHeader):
@ -839,7 +833,7 @@ def get_metadata(stream):
try:
im = PILImage.open(buf)
except:
log.exception("'%s': Failed to read MOBI cover" % getattr(stream, 'name', 'Unnamed stream'))
log.exception('Failed to read MOBI cover')
else:
obuf = cStringIO.StringIO()
im.convert('RGB').save(obuf, format='JPEG')

View File

@ -2030,9 +2030,7 @@ class MobiWriter(object):
if (not self._periodicalCount and not self._sectionCount and not self._articleCount) or \
not self.opts.mobi_periodical :
mobiType = 0x002
elif self._periodicalCount and self._sectionCount == 1 :
mobiType = 0x102
elif self._periodicalCount and self._sectionCount > 1 :
elif self._periodicalCount:
pt = None
if self._oeb.metadata.publication_type:
x = unicode(self._oeb.metadata.publication_type[0]).split(':')

View File

@ -25,7 +25,7 @@ class RegexHighlighter(QSyntaxHighlighter):
self.regex = u''
def update_regex(self, regex):
self.regex = qstring_to_unicode(regex)
self.regex = regex
self.rehighlight()
def highlightBlock(self, text):
@ -59,14 +59,22 @@ class RegexBuilder(QDialog, Ui_RegexBuilder):
self.select_format(db, book_id)
self.connect(self.button_box, SIGNAL('clicked(QAbstractButton*)'), self.button_clicked)
self.connect(self.regex, SIGNAL('textChanged(QString)'), self.highlighter.update_regex)
self.connect(self.highlighter, SIGNAL('regex_valid(PyQt_PyObject)'), self.regex_valid)
self.connect(self.regex, SIGNAL('textChanged(QString)'), self.regex_valid)
self.connect(self.test, SIGNAL('clicked()'), self.do_test)
def regex_valid(self, valid):
if valid:
self.regex.setStyleSheet('QLineEdit { color: black; background-color: white; }')
regex = qstring_to_unicode(self.regex.text())
if regex:
try:
re.compile(regex)
self.regex.setStyleSheet('QLineEdit { color: black; background-color: rgba(0,255,0,20%); }')
except:
self.regex.setStyleSheet('QLineEdit { color: black; background-color: rgb(255,0,0,20%); }')
else:
self.regex.setStyleSheet('QLineEdit { color: black; background-color: rgb(255,0,0,20%); }')
self.regex.setStyleSheet('QLineEdit { color: black; background-color: white; }')
def do_test(self):
self.highlighter.update_regex(qstring_to_unicode(self.regex.text()))
def select_format(self, db, book_id):
format = None

View File

@ -14,7 +14,7 @@
<string>Regex Builder</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">
<item row="1" column="0" colspan="5">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Preview</string>
@ -36,7 +36,7 @@
</layout>
</widget>
</item>
<item row="2" column="1">
<item row="2" column="4">
<widget class="QDialogButtonBox" name="button_box">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -53,8 +53,19 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="regex"/>
<item row="0" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="regex"/>
</item>
<item>
<widget class="QPushButton" name="test">
<property name="text">
<string>Test</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>

View File

@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: calibre 0.6.45\n"
"POT-Creation-Date: 2010-03-11 23:47+MST\n"
"PO-Revision-Date: 2010-03-11 23:47+MST\n"
"POT-Creation-Date: 2010-03-28 09:20+IST\n"
"PO-Revision-Date: 2010-03-28 09:20+IST\n"
"Last-Translator: Automatically generated\n"
"Language-Team: LANGUAGE\n"
"MIME-Version: 1.0\n"
@ -27,7 +27,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs500/books.py:267
#: /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/usbms/driver.py:205
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:204
#: /home/kovid/work/calibre/src/calibre/ebooks/chm/input.py:98
#: /home/kovid/work/calibre/src/calibre/ebooks/chm/input.py:101
#: /home/kovid/work/calibre/src/calibre/ebooks/chm/metadata.py:56
@ -133,7 +133,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/library/server.py:664
#: /home/kovid/work/calibre/src/calibre/library/server.py:740
#: /home/kovid/work/calibre/src/calibre/library/server.py:787
#: /home/kovid/work/calibre/src/calibre/utils/localization.py:111
#: /home/kovid/work/calibre/src/calibre/utils/localization.py:112
#: /home/kovid/work/calibre/src/calibre/utils/podofo/__init__.py:45
#: /home/kovid/work/calibre/src/calibre/utils/podofo/__init__.py:63
#: /home/kovid/work/calibre/src/calibre/utils/podofo/__init__.py:77
@ -453,7 +453,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/iliad/driver.py:17
#: /home/kovid/work/calibre/src/calibre/devices/irexdr/driver.py:18
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:30
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:29
msgid "John Schember"
msgstr ""
@ -481,11 +481,11 @@ msgstr ""
msgid "Communicate with the Kindle eBook reader."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:140
#: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:147
msgid "Communicate with the Kindle 2 eBook reader."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:150
#: /home/kovid/work/calibre/src/calibre/devices/kindle/driver.py:157
msgid "Communicate with the Kindle DX eBook reader."
msgstr ""
@ -518,12 +518,12 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:105
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:108
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:119
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:45
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:48
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:51
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:71
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:81
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:90
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:44
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:47
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:50
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:70
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:80
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:89
msgid "Getting list of books on device..."
msgstr ""
@ -537,24 +537,24 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:139
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:141
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:116
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:118
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:115
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:117
msgid "Transferring books to device..."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:174
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:181
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:145
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:162
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:179
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:186
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:144
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:161
msgid "Removing books from device..."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:207
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:177
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:212
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:176
msgid "Sending metadata to device..."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:213
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:218
msgid "Communicate with the Sony PRS-600/700/900 eBook reader."
msgstr ""
@ -644,21 +644,21 @@ msgstr ""
msgid "Extra customization"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:29
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:28
msgid "Communicate with an eBook reader."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:37
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:36
msgid "Get device information..."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:133
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:141
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:132
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:140
msgid "Adding books to device metadata listing..."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:166
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:171
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:165
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:170
msgid "Removing books from device metadata listing..."
msgstr ""
@ -1655,7 +1655,11 @@ msgstr ""
msgid "Disable compression of the file contents."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/output.py:105
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/output.py:40
msgid "Tag marking book to be filed with Personal Docs"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/output.py:108
msgid "All articles"
msgstr ""
@ -2173,7 +2177,7 @@ msgid "No books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/add.py:257
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1617
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1654
msgid "No books found"
msgstr ""
@ -2255,7 +2259,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel_ui.py:118
#: /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/mobi_output_ui.py:57
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:66
#: /home/kovid/work/calibre/src/calibre/gui2/convert/page_setup_ui.py:114
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_input_ui.py:31
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdb_output_ui.py:35
@ -2833,32 +2837,36 @@ msgstr ""
msgid "Default"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:58
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:67
msgid "&Title for Table of Contents:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:59
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:68
msgid "Rescale images for &Palm devices"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:60
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:69
msgid "Use author &sort for author"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:61
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:70
msgid "Disable compression of the file contents"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:62
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:71
msgid "Do not add Table of Contents to book"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:63
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:72
msgid "Kindle options"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:64
msgid "Masthead font:"
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:73
msgid "Periodical masthead font:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/mobi_output_ui.py:74
msgid "Personal Doc tag:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/page_setup.py:35
@ -2947,39 +2955,44 @@ msgstr ""
msgid "RB Output"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:77
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1862
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:85
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1899
msgid "Choose the format to view"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:83
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:91
msgid "Cannot build regex using the GUI builder without a book."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:83
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:91
msgid "No formats available"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:99
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:107
msgid "Open book"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:99
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:107
msgid "~"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder_ui.py:46
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder_ui.py:52
msgid "Regex Builder"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder_ui.py:47
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder_ui.py:53
msgid "Preview"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder_ui.py:48
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder_ui.py:54
msgid "Regex:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder_ui.py:55
#: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:117
msgid "Test"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/convert/single.py:171
msgid "Convert"
msgstr ""
@ -3614,7 +3627,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:478
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:823
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:160
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1456
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1493
#: /home/kovid/work/calibre/src/calibre/utils/ipc/job.py:53
msgid "Error"
msgstr ""
@ -4315,7 +4328,7 @@ msgid "Choose formats for "
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single.py:137
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1202
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1239
msgid "Books"
msgstr ""
@ -4962,10 +4975,6 @@ msgstr ""
msgid "File &name:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:117
msgid "Test"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:118
msgid "Title:"
msgstr ""
@ -5599,7 +5608,7 @@ msgid "Save to disk in a single directory"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:308
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1967
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2004
msgid "Save only %s format to disk"
msgstr ""
@ -5654,7 +5663,7 @@ msgid "Calibre Library"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:488
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2123
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2160
msgid "Choose a location for your ebook library."
msgstr ""
@ -5694,22 +5703,22 @@ msgid ""
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:958
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1098
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1135
msgid "Use library only"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:959
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1099
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1136
msgid "User annotations generated from main library only"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:966
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1410
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1467
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1447
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1504
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1529
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1594
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1712
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1541
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1566
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1631
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1749
msgid "No books selected"
msgstr ""
@ -5717,315 +5726,335 @@ msgstr ""
msgid "No books selected to fetch annotations from"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:989
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:992
msgid "Merging user annotations into database"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1142
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1020
msgid "%s<br />Last Page Read: %d (%d%%)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1026
msgid "%s<br />Last Page Read: Location %d (%d%%)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1045
msgid "<b>Location %d &bull; %s</b><br />%s<br />"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1054
msgid "<b>Page %d &bull; %s</b><br />"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1059
msgid "<b>Location %d &bull; %s</b><br />"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1179
msgid "How many empty books?"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1143
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1180
msgid "How many empty books should be added?"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1191
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1242
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1228
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1279
msgid "Uploading books to device."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1203
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1240
msgid "EPUB Books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1204
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1241
msgid "LRF Books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1205
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1242
msgid "HTML Books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1206
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1243
msgid "LIT Books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1207
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1244
msgid "MOBI Books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1208
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1245
msgid "Topaz books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1209
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1246
msgid "Text books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1210
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1247
msgid "PDF Books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1211
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1248
msgid "Comics"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1212
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1249
msgid "Archives"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1216
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1253
msgid "Supported books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1251
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1288
msgid "Merged some books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1252
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1289
msgid "Some duplicates were found and merged into the following existing books:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1261
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1298
msgid "Failed to read metadata"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1262
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1299
msgid "Failed to read metadata from the following"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1282
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1319
msgid "Cannot delete"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1285
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1856
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1872
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1322
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1893
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1909
msgid "No book selected"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1295
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1332
msgid "Choose formats to be deleted"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1313
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1350
msgid "Choose formats <b>not</b> to be deleted"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1351
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1388
msgid "The selected books will be <b>permanently deleted</b> and the files removed from your computer. Are you sure?"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1378
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1415
msgid "Deleting books from device."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1409
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1446
msgid "Cannot download metadata"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1425
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1462
msgid "social metadata"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1427
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1464
msgid "covers"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1427
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1464
msgid "metadata"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1429
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1466
msgid "Downloading %s for %d book(s)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1451
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1488
msgid "Failed to download some metadata"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1452
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1489
msgid "Failed to download metadata for the following:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1455
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1492
msgid "Failed to download metadata:"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1466
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1503
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1540
msgid "Cannot edit metadata"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1528
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1565
msgid "Cannot save to disk"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1531
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1568
msgid "Choose destination directory"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1564
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1601
msgid "Error while saving"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1565
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1602
msgid "There was an error while saving."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1572
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1573
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1609
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1610
msgid "Could not save some books"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1574
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1611
msgid "Click the show details button to see which ones."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1595
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1632
msgid "No books selected to generate catalog for"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1612
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1649
msgid "Generating %s catalog..."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1618
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1655
msgid ""
"No books to catalog\n"
"Check exclude tags"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1628
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1665
msgid "Catalog generated."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1631
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1668
msgid "Export Catalog Directory"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1632
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1669
msgid "Select destination for %s.%s"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1646
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1683
msgid "Fetching news from "
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1660
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1697
msgid " fetched."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1711
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1748
msgid "Cannot convert"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1740
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1777
msgid "Starting conversion of %d book(s)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1856
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1909
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1893
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1946
msgid "Cannot view"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1871
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1908
msgid "Cannot open folder"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1893
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1930
msgid "Multiple Books Selected"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1894
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1931
msgid "You are attempting to open %d books. Opening too many books at once can be slow and have a negative effect on the responsiveness of your computer. Once started the process cannot be stopped until complete. Do you wish to continue?"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1910
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1947
msgid "%s has no available formats."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1951
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1988
msgid "Cannot configure"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1952
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1989
msgid "Cannot configure while there are running jobs."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1995
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2032
msgid "No detailed info available"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:1996
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2033
msgid "No detailed information is available for books on the device."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2051
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2088
msgid "Error talking to device"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2052
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2089
msgid "There was a temporary error talking to the device. Please unplug and reconnect the device and or reboot."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2075
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2103
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2112
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2140
msgid "Conversion Error"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2076
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2113
msgid "<p>Could not convert: %s<p>It is a <a href=\"%s\">DRM</a>ed book. You must first remove the DRM using third party tools."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2089
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2126
msgid "Recipe Disabled"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2104
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2141
msgid "<b>Failed</b>"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2132
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2169
msgid "Invalid library location"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2133
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2170
msgid "Could not access %s. Using %s as the library."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2183
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2220
msgid "is the result of the efforts of many volunteers from all over the world. If you find it useful, please consider donating to support its development."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2208
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2245
msgid "There are active jobs. Are you sure you want to quit?"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2211
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2248
msgid ""
" is communicating with the device!<br>\n"
" Quitting may cause corruption on the device.<br>\n"
" Are you sure you want to quit?"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2215
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2252
msgid "WARNING: Active jobs"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2267
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2304
msgid "will keep running in the system tray. To close it, choose <b>Quit</b> in the context menu of the system tray."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2286
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2323
msgid "<span style=\"color:red; font-weight:bold\">Latest version: <a href=\"%s\">%s</a></span>"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2294
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2331
msgid "Update available"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2295
#: /home/kovid/work/calibre/src/calibre/gui2/ui.py:2332
msgid "%s has been updated to version %s. See the <a href=\"http://calibre-ebook.com/whats-new\">new features</a>. Visit the download page?"
msgstr ""
@ -7364,14 +7393,18 @@ msgid "English (Yemen)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/utils/localization.py:108
msgid "German (AT)"
msgid "English (Ireland)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/utils/localization.py:109
msgid "Dutch (NL)"
msgid "German (AT)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/utils/localization.py:110
msgid "Dutch (NL)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/utils/localization.py:111
msgid "Dutch (BE)"
msgstr ""

View File

@ -105,6 +105,7 @@ _extra_lang_codes = {
'en_PK' : _('English (Pakistan)'),
'en_SG' : _('English (Singapore)'),
'en_YE' : _('English (Yemen)'),
'en_IE' : _('English (Ireland)'),
'de_AT' : _('German (AT)'),
'nl' : _('Dutch (NL)'),
'nl_BE' : _('Dutch (BE)'),