Sync to trunk.

This commit is contained in:
John Schember 2011-09-18 18:39:38 -04:00
commit 8f95d10d27
109 changed files with 22043 additions and 17772 deletions

View File

@ -19,6 +19,68 @@
# new recipes: # new recipes:
# - title: # - title:
- version: 0.8.19
date: 2011-09-16
new features:
- title: "Driver for Sony Ericsson Xperia Arc"
- title: "MOBI Output: Add option in Preferences->Output Options->MOBI Output to enable the share via Facebook feature for calibre produced MOBI files. Note that enabling this disables the sync last read position across multiple devices feature. Don't ask me why, ask Amazon."
- title: "Content server: Update metadata when sending MOBI as well as EPUB files"
- title: "News download: Add an auto_cleanup_keep variable that allows recipe writers to tell the auto cleanup to never remove a specified element"
- title: "Conversion: Remove paragraph spacing: If you set the indent size negative, calibre will now leave the indents specified in the input document"
bug fixes:
- title: "Fix regression in 0.8.18 that broke PDF Output"
- title: "MOBI Output: Revert change in 0.8.18 that marked news downloads with a single section as blogs, as the Kindle does not auto archive them"
- title: "PDF output on OSX now generates proper non image based documents"
- title: "RTF Input: Fix handling of internal links and underlined text"
tickets: [845328]
- title: "Fix language sometimes not getting set when downloading metadata in the edit metadata dialog"
- title: "Fix regression that broke killing of multiple jobs"
tickets: [850764]
- title: "Fix bug processing author names with initials when downloading metadata from ozon.ru."
tickets: [845420]
- title: "Fix a memory leak in the Copy to library operation which also fixes the metadata.db being held open in the destination library"
tickets: [849469]
- title: "Keyboard shortcuts: Allow use of symbol keys like >,*,etc."
tickets: [847378]
- title: "EPUB Output: When splitting be a little cleverer about discarding 'empty' pages"
improved recipes:
- Twitch Films
- Japan Times
- People/US Magazine mashup
- Business World India
- Inquirer.net
- Guardian/Observer
new recipes:
- title: RT
author: Darko Miletic
- title: CIO Magazine
author: Julio Map
- title: India Today and Hindustan Times
author: Krittika Goyal
- title: Pagina 12 Print Edition
author: Pablo Marfil
- version: 0.8.18 - version: 0.8.18
date: 2011-09-09 date: 2011-09-09
@ -39,6 +101,7 @@
- title: "TXT Output: Preserve as much formatting as possible when generating Markdown output including various CSS styles" - title: "TXT Output: Preserve as much formatting as possible when generating Markdown output including various CSS styles"
bug fixes: bug fixes:
- title: "Fix pubdate incorrect when used in save to disk template in timezones ahead of GMT." - title: "Fix pubdate incorrect when used in save to disk template in timezones ahead of GMT."
tickets: [844445] tickets: [844445]

View File

@ -0,0 +1,61 @@
from calibre.web.feeds.recipes import BasicNewsRecipe
import re
class SportsIllustratedRecipe(BasicNewsRecipe) :
__author__ = 'ape'
__copyright__ = 'ape'
__license__ = 'GPL v3'
language = 'de'
description = 'Berliner Zeitung'
version = 2
title = u'Berliner Zeitung'
timefmt = ' [%d.%m.%Y]'
no_stylesheets = True
remove_javascript = True
use_embedded_content = False
publication_type = 'newspaper'
keep_only_tags = [dict(name='div', attrs={'class':'teaser t_split t_artikel'})]
INDEX = 'http://www.berlinonline.de/berliner-zeitung/'
def parse_index(self):
base = 'http://www.berlinonline.de'
answer = []
articles = {}
more = 1
soup = self.index_to_soup(self.INDEX)
# Get list of links to ressorts from index page
ressort_list = soup.findAll('ul', attrs={'class': re.compile('ressortlist')})
for ressort in ressort_list[0].findAll('a'):
feed_title = ressort.string
print 'Analyzing', feed_title
if not articles.has_key(feed_title):
articles[feed_title] = []
answer.append(feed_title)
# Load ressort page.
feed = self.index_to_soup('http://www.berlinonline.de' + ressort['href'])
# find mainbar div which contains the list of all articles
for article_container in feed.findAll('div', attrs={'class': re.compile('mainbar')}):
# iterate over all articles
for article_teaser in article_container.findAll('div', attrs={'class': re.compile('teaser')}):
# extract title of article
if article_teaser.h3 != None:
article = {'title' : article_teaser.h3.a.string, 'date' : u'', 'url' : base + article_teaser.h3.a['href'], 'description' : u''}
articles[feed_title].append(article)
else:
# Skip teasers for missing photos
if article_teaser.div.p.contents[0].find('Foto:') > -1:
continue
article = {'title': 'Weitere Artikel ' + str(more), 'date': u'', 'url': base + article_teaser.div.p.a['href'], 'description': u''}
articles[feed_title].append(article)
more += 1
answer = [[key, articles[key]] for key in answer if articles.has_key(key)]
return answer
def get_masthead_url(self):
return 'http://www.berlinonline.de/.img/berliner-zeitung/blz_logo.gif'

29
recipes/china_post.recipe Normal file
View File

@ -0,0 +1,29 @@
from calibre.web.feeds.news import BasicNewsRecipe
class CP(BasicNewsRecipe):
title = u'China Post'
language = 'en_CN'
__author__ = 'Krittika Goyal'
oldest_article = 1 #days
max_articles_per_feed = 25
use_embedded_content = False
no_stylesheets = True
auto_cleanup = True
feeds = [
('Top Stories',
'http://www.chinapost.com.tw/rss/front.xml'),
('Taiwan',
'http://www.chinapost.com.tw/rss/taiwan.xml'),
('China',
'http://www.chinapost.com.tw/rss/china.xml'),
('Business',
'http://www.chinapost.com.tw/rss/business.xml'),
('World',
'http://www.chinapost.com.tw/rss/international.xml'),
('Sports',
'http://www.chinapost.com.tw/rss/sports.xml'),
]

View File

@ -1,35 +1,38 @@
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
class Cicero(BasicNewsRecipe): class BasicUserRecipe1316245412(BasicNewsRecipe):
timefmt = ' [%Y-%m-%d]'
title = u'Cicero' title = u'Cicero Online'
__author__ = 'mad@sharktooth.de'
description = u'Magazin f\xfcr politische Kultur' description = u'Magazin f\xfcr politische Kultur'
oldest_article = 7 publisher = 'Ringier Publishing GmbH'
category = 'news, politics, Germany'
language = 'de' language = 'de'
encoding = 'UTF-8'
__author__ = 'Armin Geller' # 2011-09-17
oldest_article = 7
max_articles_per_feed = 100 max_articles_per_feed = 100
no_stylesheets = True no_stylesheets = True
use_embedded_content = False auto_cleanup = False
publisher = 'Ringier Publishing'
category = 'news, politics, Germany' remove_tags = [
encoding = 'iso-8859-1' dict(name='div', attrs={'id':["header", "navigation", "skip-link", "header-print", "header-print-url", "meta-toolbar", "footer"]}),
publication_type = 'magazine' dict(name='div', attrs={'class':["region region-sidebar-first column sidebar", "breadcrumb", "breadcrumb-title", "meta", "comment-wrapper",
masthead_url = 'http://www.cicero.de/img2/cicero_logo_rss.gif' "field field-name-field-show-teaser-right field-type-list-boolean field-label-above"]}),
dict(name='div', attrs={'title':["Dossier Auswahl"]}),
dict(name='h2', attrs={'class':["title comment-form"]}),
dict(name='form', attrs={'class':["comment-form user-info-from-cookie"]}),
]
feeds = [ feeds = [
(u'Das gesamte Portfolio', u'http://www.cicero.de/rss/rss.php?ress_id='), (u'Das gesamte Portfolio', u'http://www.cicero.de/rss.xml'),
#(u'Alle Heft-Inhalte', u'http://www.cicero.de/rss/rss.php?ress_id=heft'), (u'Berliner Republik', u'http://www.cicero.de/berliner-republik.xml'),
#(u'Alle Online-Inhalte', u'http://www.cicero.de/rss/rss.php?ress_id=online'), (u'Weltb\xfchne', u'http://www.cicero.de/weltbuehne.xml'),
#(u'Berliner Republik', u'http://www.cicero.de/rss/rss.php?ress_id=4'), (u'Kapital', u'http://www.cicero.de/kapital.xml'),
#(u'Weltb\xfchne', u'http://www.cicero.de/rss/rss.php?ress_id=1'), (u'Salon', u'http://www.cicero.de/salon.xml'),
#(u'Salon', u'http://www.cicero.de/rss/rss.php?ress_id=7'), (u'Blogs', u'http://www.cicero.de/blogs.xml'), #seems not to be in use at the moment
#(u'Kapital', u'http://www.cicero.de/rss/rss.php?ress_id=6'),
#(u'Netzst\xfccke', u'http://www.cicero.de/rss/rss.php?ress_id=9'),
#(u'Leinwand', u'http://www.cicero.de/rss/rss.php?ress_id=12'),
#(u'Bibliothek', u'http://www.cicero.de/rss/rss.php?ress_id=15'),
(u'Kolumne - Alle Kolulmnen', u'http://www.cicero.de/rss/rss2.php?ress_id='),
#(u'Kolumne - Schreiber, Berlin', u'http://www.cicero.de/rss/rss2.php?ress_id=35'),
#(u'Kolumne - TV Kritik', u'http://www.cicero.de/rss/rss2.php?ress_id=34')
] ]
def print_version(self, url): def print_version(self, url):
return 'http://www.cicero.de/page_print.php?' + url.rpartition('?')[2] return url + '?print'

View File

@ -46,7 +46,9 @@ class LATimes(BasicNewsRecipe):
remove_tags_after=dict(name='p', attrs={'class':'copyright'}) remove_tags_after=dict(name='p', attrs={'class':'copyright'})
remove_tags = [ remove_tags = [
dict(name=['meta','link','iframe','object','embed']) dict(name=['meta','link','iframe','object','embed'])
,dict(attrs={'class':['toolSet','articlerail','googleAd','entry-footer-left','entry-footer-right','entry-footer-social','google-ad-story-bottom','sphereTools']}) ,dict(attrs={'class':['toolSet','articlerail','googleAd','entry-footer-left',
'entry-footer-right','entry-footer-social','google-ad-story-bottom',
'sphereTools', 'nextgen-share-tools']})
,dict(attrs={'id':['article-promo','googleads','moduleArticleToolsContainer','gallery-subcontent']}) ,dict(attrs={'id':['article-promo','googleads','moduleArticleToolsContainer','gallery-subcontent']})
] ]
remove_attributes=['lang','xmlns:fb','xmlns:og','border','xtags','i','article_body'] remove_attributes=['lang','xmlns:fb','xmlns:og','border','xtags','i','article_body']

View File

@ -2,7 +2,6 @@ from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1306097511(BasicNewsRecipe): class AdvancedUserRecipe1306097511(BasicNewsRecipe):
title = u'Metro Nieuws NL' title = u'Metro Nieuws NL'
description = u'Metro Nieuws - NL'
# Version 1.2, updated cover image to match the changed website. # Version 1.2, updated cover image to match the changed website.
# added info date on title # added info date on title
oldest_article = 2 oldest_article = 2
@ -11,14 +10,14 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
description = u'Metro Nederland' description = u'Metro Nederland'
language = u'nl' language = u'nl'
simultaneous_downloads = 5 simultaneous_downloads = 5
delay = 1 #delay = 1
# timefmt = ' [%A, %d %B, %Y]' auto_cleanup = True
auto_cleanup_keep = '//div[@class="article-image-caption-2column"]|//div[@id="date"]'
timefmt = ' [%A, %d %b %Y]' timefmt = ' [%A, %d %b %Y]'
no_stylesheets = True no_stylesheets = True
remove_javascript = True remove_javascript = True
remove_empty_feeds = True remove_empty_feeds = True
cover_url = 'http://www.oldreadmetro.com/img/en/metroholland/last/1/small.jpg' cover_url = 'http://www.oldreadmetro.com/img/en/metroholland/last/1/small.jpg'
remove_empty_feeds = True
publication_type = 'newspaper' publication_type = 'newspaper'
remove_tags_before = dict(name='div', attrs={'id':'date'}) remove_tags_before = dict(name='div', attrs={'id':'date'})
remove_tags_after = dict(name='div', attrs={'id':'column-1-3'}) remove_tags_after = dict(name='div', attrs={'id':'column-1-3'})

View File

@ -51,14 +51,13 @@ class pcWorld(BasicNewsRecipe):
keep_only_tags = [ keep_only_tags = [
dict(name='div', attrs={'class':'article'}) dict(name='div', attrs={'class':'article'})
] ]
remove_tags = [ remove_tags = [
dict(name='div', attrs={'class':['toolBar','mac_tags','toolBar btmTools','recommend longRecommend','recommend shortRecommend','textAds']}), dict(name='div', attrs={'class':['toolBar','mac_tags','toolBar btmTools','recommend longRecommend','recommend shortRecommend','textAds']}),
dict(name='div', attrs={'id':['sidebar','comments','mac_tags']}), dict(name='div', attrs={'id':['sidebar','comments','mac_tags']}),
dict(name='ul', attrs={'class':'tools'}), dict(name='ul', attrs={'class':['tools', 'tools clearfix']}),
dict(name='li', attrs={'class':'sub'}) dict(name='li', attrs={'class':'sub'}),
dict(name='p', attrs={'id':'userDesire'})
] ]
feeds = [ feeds = [
(u'PCWorld Headlines', u'http://feeds.pcworld.com/pcworld/latestnews'), (u'PCWorld Headlines', u'http://feeds.pcworld.com/pcworld/latestnews'),
(u'How-To', u'http://feeds.pcworld.com/pcworld/update/howto'), (u'How-To', u'http://feeds.pcworld.com/pcworld/update/howto'),

View File

@ -15,12 +15,12 @@ class Time(BasicNewsRecipe):
# ' publish complete articles on the web.') # ' publish complete articles on the web.')
title = u'Time' title = u'Time'
__author__ = 'Kovid Goyal' __author__ = 'Kovid Goyal'
description = 'Weekly magazine' description = ('Weekly US magazine.')
encoding = 'utf-8' encoding = 'utf-8'
no_stylesheets = True no_stylesheets = True
language = 'en' language = 'en'
remove_javascript = True remove_javascript = True
#needs_subscription = 'optional'
keep_only_tags = [ keep_only_tags = [
{ {
@ -41,6 +41,21 @@ class Time(BasicNewsRecipe):
preprocess_regexps = [(re.compile( preprocess_regexps = [(re.compile(
r'<meta .+/>'), lambda m:'')] r'<meta .+/>'), lambda m:'')]
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if False and self.username and self.password:
# This site uses javascript in its login process
res = br.open('http://www.time.com/time/magazine')
br.select_form(nr=1)
br['username'] = self.username
br['password'] = self.password
res = br.submit()
raw = res.read()
if '>Log Out<' not in raw:
raise ValueError('Failed to login to time.com, check'
' your username and password')
return br
def parse_index(self): def parse_index(self):
raw = self.index_to_soup('http://www.time.com/time/magazine', raw=True) raw = self.index_to_soup('http://www.time.com/time/magazine', raw=True)
root = html.fromstring(raw) root = html.fromstring(raw)

View File

@ -18,23 +18,23 @@ msgstr ""
"Report-Msgid-Bugs-To: Debian iso-codes team <pkg-isocodes-" "Report-Msgid-Bugs-To: Debian iso-codes team <pkg-isocodes-"
"devel@lists.alioth.debian.org>\n" "devel@lists.alioth.debian.org>\n"
"POT-Creation-Date: 2011-09-02 16:21+0000\n" "POT-Creation-Date: 2011-09-02 16:21+0000\n"
"PO-Revision-Date: 2011-08-27 06:01+0000\n" "PO-Revision-Date: 2011-09-13 16:28+0000\n"
"Last-Translator: Wolfgang Rohdewald <wolfgang@rohdewald.de>\n" "Last-Translator: frenkx <Unknown>\n"
"Language-Team: German <debian-l10n-german@lists.debian.org>\n" "Language-Team: German <debian-l10n-german@lists.debian.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: 2011-09-03 05:03+0000\n" "X-Launchpad-Export-Date: 2011-09-14 04:40+0000\n"
"X-Generator: Launchpad (build 13830)\n" "X-Generator: Launchpad (build 13921)\n"
"Language: de\n" "Language: de\n"
#. name for aaa #. name for aaa
msgid "Ghotuo" msgid "Ghotuo"
msgstr "" msgstr "Ghotuo"
#. name for aab #. name for aab
msgid "Alumu-Tesu" msgid "Alumu-Tesu"
msgstr "" msgstr "Alumu-Tesu"
#. name for aac #. name for aac
msgid "Ari" msgid "Ari"
@ -120,9 +120,10 @@ msgstr ""
msgid "Amarasi" msgid "Amarasi"
msgstr "" msgstr ""
# auch: Abbé, Abbey oder Abi
#. name for aba #. name for aba
msgid "Abé" msgid "Abé"
msgstr "" msgstr "Abé"
#. name for abb #. name for abb
msgid "Bankon" msgid "Bankon"
@ -150,7 +151,7 @@ msgstr ""
#. name for abh #. name for abh
msgid "Arabic, Tajiki" msgid "Arabic, Tajiki"
msgstr "" msgstr "Arabisch, Tadschikisch"
#. name for abi #. name for abi
msgid "Abidji" msgid "Abidji"
@ -190,7 +191,7 @@ msgstr ""
#. name for abr #. name for abr
msgid "Abron" msgid "Abron"
msgstr "" msgstr "Abron"
#. name for abs #. name for abs
msgid "Malay, Ambonese" msgid "Malay, Ambonese"
@ -374,7 +375,7 @@ msgstr ""
#. name for ads #. name for ads
msgid "Adamorobe Sign Language" msgid "Adamorobe Sign Language"
msgstr "" msgstr "Adamorobe-Gebärdensprache"
#. name for adt #. name for adt
msgid "Adnyamathanha" msgid "Adnyamathanha"
@ -626,7 +627,7 @@ msgstr ""
#. name for aha #. name for aha
msgid "Ahanta" msgid "Ahanta"
msgstr "" msgstr "Ahanta"
#. name for ahb #. name for ahb
msgid "Axamb" msgid "Axamb"
@ -1192,9 +1193,10 @@ msgstr ""
msgid "Andra-Hus" msgid "Andra-Hus"
msgstr "" msgstr ""
# auch: Anyi, Agni
#. name for any #. name for any
msgid "Anyin" msgid "Anyin"
msgstr "" msgstr "Anyin"
#. name for anz #. name for anz
msgid "Anem" msgid "Anem"
@ -1418,7 +1420,7 @@ msgstr ""
#. name for arc #. name for arc
msgid "Aramaic, Official (700-300 BCE)" msgid "Aramaic, Official (700-300 BCE)"
msgstr "" msgstr "Aramäisch"
#. name for ard #. name for ard
msgid "Arabana" msgid "Arabana"
@ -2114,7 +2116,7 @@ msgstr ""
#. name for bar #. name for bar
msgid "Bavarian" msgid "Bavarian"
msgstr "" msgstr "Bairisch"
#. name for bas #. name for bas
msgid "Basa (Cameroon)" msgid "Basa (Cameroon)"
@ -2526,7 +2528,7 @@ msgstr ""
#. name for bet #. name for bet
msgid "Béte, Guiberoua" msgid "Béte, Guiberoua"
msgstr "" msgstr "Guiberouabété"
#. name for beu #. name for beu
msgid "Blagar" msgid "Blagar"
@ -2534,7 +2536,7 @@ msgstr ""
#. name for bev #. name for bev
msgid "Bété, Daloa" msgid "Bété, Daloa"
msgstr "" msgstr "Daloabété"
#. name for bew #. name for bew
msgid "Betawi" msgid "Betawi"
@ -3954,7 +3956,7 @@ msgstr ""
#. name for btg #. name for btg
msgid "Bété, Gagnoa" msgid "Bété, Gagnoa"
msgstr "" msgstr "Gagnoabété"
#. name for bth #. name for bth
msgid "Bidayuh, Biatah" msgid "Bidayuh, Biatah"
@ -4884,9 +4886,10 @@ msgstr ""
msgid "Chaudangsi" msgid "Chaudangsi"
msgstr "" msgstr ""
# auch: Östlicher Min-Dialekt
#. name for cdo #. name for cdo
msgid "Chinese, Min Dong" msgid "Chinese, Min Dong"
msgstr "" msgstr "Min Dong, Chinesisch"
#. name for cdr #. name for cdr
msgid "Cinda-Regi-Tiyal" msgid "Cinda-Regi-Tiyal"
@ -5034,7 +5037,7 @@ msgstr ""
#. name for chu #. name for chu
msgid "Slavonic, Old" msgid "Slavonic, Old"
msgstr "" msgstr "Altkirchenslawisch"
#. name for chv #. name for chv
msgid "Chuvash" msgid "Chuvash"
@ -5162,7 +5165,7 @@ msgstr ""
#. name for ckb #. name for ckb
msgid "Kurdish, Central" msgid "Kurdish, Central"
msgstr "" msgstr "Zentralkurdisch"
#. name for ckh #. name for ckh
msgid "Chak" msgid "Chak"
@ -5172,9 +5175,10 @@ msgstr ""
msgid "Cibak" msgid "Cibak"
msgstr "" msgstr ""
# auch: Chokosi, Chakosi, Kyokosi, Tchokossi, Tiokossi
#. name for cko #. name for cko
msgid "Anufo" msgid "Anufo"
msgstr "" msgstr "Anufo"
#. name for ckq #. name for ckq
msgid "Kajakse" msgid "Kajakse"
@ -5288,9 +5292,10 @@ msgstr ""
msgid "Michigamea" msgid "Michigamea"
msgstr "" msgstr ""
# auch: Mandarin
#. name for cmn #. name for cmn
msgid "Chinese, Mandarin" msgid "Chinese, Mandarin"
msgstr "" msgstr "Hochchinesisch"
#. name for cmo #. name for cmo
msgid "Mnong, Central" msgid "Mnong, Central"
@ -6294,7 +6299,7 @@ msgstr ""
#. name for dic #. name for dic
msgid "Dida, Lakota" msgid "Dida, Lakota"
msgstr "" msgstr "Lakota Dida"
#. name for did #. name for did
msgid "Didinga" msgid "Didinga"
@ -6964,9 +6969,10 @@ msgstr ""
msgid "Jola-Fonyi" msgid "Jola-Fonyi"
msgstr "" msgstr ""
# auch: Dyula, Jula
#. name for dyu #. name for dyu
msgid "Dyula" msgid "Dyula"
msgstr "Dyula" msgstr "Dioula"
#. name for dyy #. name for dyy
msgid "Dyaabugay" msgid "Dyaabugay"
@ -7532,9 +7538,10 @@ msgstr ""
msgid "Persian" msgid "Persian"
msgstr "Persisch" msgstr "Persisch"
# auch: Fanti, Fannti, Odschi, Fante-Twi
#. name for fat #. name for fat
msgid "Fanti" msgid "Fanti"
msgstr "Fanti" msgstr "Fante"
#. name for fau #. name for fau
msgid "Fayu" msgid "Fayu"
@ -8058,7 +8065,7 @@ msgstr ""
#. name for gct #. name for gct
msgid "German, Colonia Tovar" msgid "German, Colonia Tovar"
msgstr "" msgstr "Alemán Coloniero Tovar"
#. name for gda #. name for gda
msgid "Lohar, Gade" msgid "Lohar, Gade"
@ -8406,7 +8413,7 @@ msgstr ""
#. name for gkp #. name for gkp
msgid "Kpelle, Guinea" msgid "Kpelle, Guinea"
msgstr "" msgstr "Kpelle, Guinea"
#. name for gla #. name for gla
msgid "Gaelic, Scottish" msgid "Gaelic, Scottish"
@ -8482,11 +8489,11 @@ msgstr ""
#. name for gmh #. name for gmh
msgid "German, Middle High (ca. 1050-1500)" msgid "German, Middle High (ca. 1050-1500)"
msgstr "" msgstr "Mittelhochdeutsch (ca. 1050-1500)"
#. name for gml #. name for gml
msgid "German, Middle Low" msgid "German, Middle Low"
msgstr "" msgstr "Mittelniederdeutsch"
#. name for gmm #. name for gmm
msgid "Gbaya-Mbodomo" msgid "Gbaya-Mbodomo"
@ -8602,7 +8609,7 @@ msgstr ""
#. name for god #. name for god
msgid "Godié" msgid "Godié"
msgstr "" msgstr "Godié"
#. name for goe #. name for goe
msgid "Gongduk" msgid "Gongduk"
@ -8618,7 +8625,7 @@ msgstr ""
#. name for goh #. name for goh
msgid "German, Old High (ca. 750-1050)" msgid "German, Old High (ca. 750-1050)"
msgstr "" msgstr "Althochdeutsch (ca. 750-1050)"
#. name for goi #. name for goi
msgid "Gobasi" msgid "Gobasi"
@ -8802,7 +8809,7 @@ msgstr ""
#. name for gsg #. name for gsg
msgid "German Sign Language" msgid "German Sign Language"
msgstr "" msgstr "Deutsche Gebärdensprache"
#. name for gsl #. name for gsl
msgid "Gusilay" msgid "Gusilay"
@ -8830,7 +8837,7 @@ msgstr ""
#. name for gsw #. name for gsw
msgid "German, Swiss" msgid "German, Swiss"
msgstr "" msgstr "Schweizerdeutsch"
#. name for gta #. name for gta
msgid "Guató" msgid "Guató"
@ -8854,7 +8861,7 @@ msgstr ""
#. name for gud #. name for gud
msgid "Dida, Yocoboué" msgid "Dida, Yocoboué"
msgstr "" msgstr "Yocoboué Dida"
#. name for gue #. name for gue
msgid "Gurinji" msgid "Gurinji"
@ -9158,7 +9165,7 @@ msgstr ""
#. name for hak #. name for hak
msgid "Chinese, Hakka" msgid "Chinese, Hakka"
msgstr "" msgstr "Hakka, Chinesisch"
#. name for hal #. name for hal
msgid "Halang" msgid "Halang"
@ -9694,7 +9701,7 @@ msgstr ""
#. name for hsb #. name for hsb
msgid "Sorbian, Upper" msgid "Sorbian, Upper"
msgstr "" msgstr "Obersorbisch"
#. name for hsh #. name for hsh
msgid "Hungarian Sign Language" msgid "Hungarian Sign Language"
@ -11020,9 +11027,10 @@ msgstr ""
msgid "Javanese, Caribbean" msgid "Javanese, Caribbean"
msgstr "" msgstr ""
# auch: Pepesa-Jwira
#. name for jwi #. name for jwi
msgid "Jwira-Pepesa" msgid "Jwira-Pepesa"
msgstr "" msgstr "Jwira-Pepesa"
#. name for jya #. name for jya
msgid "Jiarong" msgid "Jiarong"
@ -12318,11 +12326,11 @@ msgstr ""
#. name for kmq #. name for kmq
msgid "Kwama" msgid "Kwama"
msgstr "" msgstr "Kwama"
#. name for kmr #. name for kmr
msgid "Kurdish, Northern" msgid "Kurdish, Northern"
msgstr "" msgstr "Nordkurdisch"
#. name for kms #. name for kms
msgid "Kamasau" msgid "Kamasau"
@ -12886,7 +12894,7 @@ msgstr ""
#. name for ksh #. name for ksh
msgid "Kölsch" msgid "Kölsch"
msgstr "" msgstr "Kölsch"
#. name for ksi #. name for ksi
msgid "Krisa" msgid "Krisa"
@ -13498,7 +13506,7 @@ msgstr ""
#. name for kyf #. name for kyf
msgid "Kouya" msgid "Kouya"
msgstr "" msgstr "Kouya"
#. name for kyg #. name for kyg
msgid "Keyagana" msgid "Keyagana"
@ -14826,7 +14834,7 @@ msgstr ""
#. name for ltg #. name for ltg
msgid "Latgalian" msgid "Latgalian"
msgstr "" msgstr "Lettgallisch"
#. name for lti #. name for lti
msgid "Leti (Indonesia)" msgid "Leti (Indonesia)"
@ -16382,9 +16390,10 @@ msgstr ""
msgid "Mnong, Southern" msgid "Mnong, Southern"
msgstr "" msgstr ""
# auch: nördliches Min
#. name for mnp #. name for mnp
msgid "Chinese, Min Bei" msgid "Chinese, Min Bei"
msgstr "" msgstr "Min Bei, Chinesisch"
#. name for mnq #. name for mnq
msgid "Minriq" msgid "Minriq"
@ -17662,9 +17671,10 @@ msgstr ""
msgid "Nangikurrunggurr" msgid "Nangikurrunggurr"
msgstr "" msgstr ""
# auch: Südliche Min-Sprache
#. name for nan #. name for nan
msgid "Chinese, Min Nan" msgid "Chinese, Min Nan"
msgstr "" msgstr "Min Nan, Chinesisch"
#. name for nao #. name for nao
msgid "Naaba" msgid "Naaba"
@ -19306,9 +19316,10 @@ msgstr ""
msgid "Nawathinehena" msgid "Nawathinehena"
msgstr "" msgstr ""
# auch: Nyaboa
#. name for nwb #. name for nwb
msgid "Nyabwa" msgid "Nyabwa"
msgstr "" msgstr "Nyabwa"
#. name for nwc #. name for nwc
msgid "Newari, Old" msgid "Newari, Old"
@ -19494,9 +19505,10 @@ msgstr ""
msgid "Njebi" msgid "Njebi"
msgstr "" msgstr ""
# auch: Nzima, Appolo
#. name for nzi #. name for nzi
msgid "Nzima" msgid "Nzima"
msgstr "Nzima" msgstr "Nzema"
#. name for nzk #. name for nzk
msgid "Nzakara" msgid "Nzakara"
@ -22702,7 +22714,7 @@ msgstr ""
#. name for sdh #. name for sdh
msgid "Kurdish, Southern" msgid "Kurdish, Southern"
msgstr "" msgstr "Südkurdisch"
#. name for sdj #. name for sdj
msgid "Suundi" msgid "Suundi"
@ -22864,9 +22876,10 @@ msgstr ""
msgid "South African Sign Language" msgid "South African Sign Language"
msgstr "" msgstr ""
# auch: Sefwi, Asahyue
#. name for sfw #. name for sfw
msgid "Sehwi" msgid "Sehwi"
msgstr "" msgstr "Sehwi"
#. name for sga #. name for sga
msgid "Irish, Old (to 900)" msgid "Irish, Old (to 900)"
@ -23414,7 +23427,7 @@ msgstr ""
#. name for sme #. name for sme
msgid "Sami, Northern" msgid "Sami, Northern"
msgstr "" msgstr "Nordsamisch"
#. name for smf #. name for smf
msgid "Auwe" msgid "Auwe"
@ -24228,7 +24241,7 @@ msgstr ""
#. name for swg #. name for swg
msgid "Swabian" msgid "Swabian"
msgstr "" msgstr "Schwäbisch"
#. name for swh #. name for swh
msgid "Swahili (individual language)" msgid "Swahili (individual language)"
@ -24648,9 +24661,10 @@ msgstr ""
msgid "Tabaru" msgid "Tabaru"
msgstr "" msgstr ""
# auch: Ditamari, Tamari, Somba, Soma, Some, Tamberma
#. name for tbz #. name for tbz
msgid "Ditammari" msgid "Ditammari"
msgstr "" msgstr "Ditammari"
#. name for tca #. name for tca
msgid "Ticuna" msgid "Ticuna"
@ -25356,7 +25370,7 @@ msgstr ""
#. name for tlh #. name for tlh
msgid "Klingon" msgid "Klingon"
msgstr "" msgstr "Klingonisch"
#. name for tli #. name for tli
msgid "Tlingit" msgid "Tlingit"
@ -26596,7 +26610,7 @@ msgstr "Udmurt"
#. name for udu #. name for udu
msgid "Uduk" msgid "Uduk"
msgstr "" msgstr "Uduk"
#. name for ues #. name for ues
msgid "Kioko" msgid "Kioko"
@ -27412,7 +27426,7 @@ msgstr ""
#. name for wae #. name for wae
msgid "Walser" msgid "Walser"
msgstr "" msgstr "Walser"
#. name for waf #. name for waf
msgid "Wakoná" msgid "Wakoná"
@ -28180,7 +28194,7 @@ msgstr ""
#. name for wuu #. name for wuu
msgid "Chinese, Wu" msgid "Chinese, Wu"
msgstr "" msgstr "Wu, Chinesisch"
#. name for wuv #. name for wuv
msgid "Wuvulu-Aua" msgid "Wuvulu-Aua"
@ -28868,7 +28882,7 @@ msgstr ""
#. name for xom #. name for xom
msgid "Komo (Sudan)" msgid "Komo (Sudan)"
msgstr "" msgstr "Komo (Sudan)"
#. name for xon #. name for xon
msgid "Konkomba" msgid "Konkomba"
@ -28896,7 +28910,7 @@ msgstr ""
#. name for xpe #. name for xpe
msgid "Kpelle, Liberia" msgid "Kpelle, Liberia"
msgstr "" msgstr "Kpelle, Liberia"
#. name for xpg #. name for xpg
msgid "Phrygian" msgid "Phrygian"

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: 2011-09-02 16:21+0000\n" "POT-Creation-Date: 2011-09-02 16:21+0000\n"
"PO-Revision-Date: 2011-09-08 10:13+0000\n" "PO-Revision-Date: 2011-09-09 13:18+0000\n"
"Last-Translator: Jellby <Unknown>\n" "Last-Translator: Jellby <Unknown>\n"
"Language-Team: Spanish <es@li.org>\n" "Language-Team: Spanish <es@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: 2011-09-09 04:37+0000\n" "X-Launchpad-Export-Date: 2011-09-10 05:01+0000\n"
"X-Generator: Launchpad (build 13900)\n" "X-Generator: Launchpad (build 13900)\n"
#. name for aaa #. name for aaa
@ -1615,7 +1615,7 @@ msgstr "Atemble"
#. name for atg #. name for atg
msgid "Ivbie North-Okpela-Arhe" msgid "Ivbie North-Okpela-Arhe"
msgstr "" msgstr "Ivbie norte-okpela-arhe"
#. name for ati #. name for ati
msgid "Attié" msgid "Attié"
@ -2803,7 +2803,7 @@ msgstr "Bima"
#. name for bhq #. name for bhq
msgid "Tukang Besi South" msgid "Tukang Besi South"
msgstr "" msgstr "Tukang besi sur"
#. name for bhr #. name for bhr
msgid "Malagasy, Bara" msgid "Malagasy, Bara"
@ -4375,19 +4375,19 @@ msgstr "Barikanchi"
#. name for bxp #. name for bxp
msgid "Bebil" msgid "Bebil"
msgstr "" msgstr "Bebil"
#. name for bxq #. name for bxq
msgid "Beele" msgid "Beele"
msgstr "" msgstr "Beele"
#. name for bxr #. name for bxr
msgid "Buriat, Russia" msgid "Buriat, Russia"
msgstr "" msgstr "Buriat de Rusia"
#. name for bxs #. name for bxs
msgid "Busam" msgid "Busam"
msgstr "" msgstr "Busam"
#. name for bxu #. name for bxu
msgid "Buriat, China" msgid "Buriat, China"
@ -4463,11 +4463,11 @@ msgstr "Bidyara"
#. name for byn #. name for byn
msgid "Bilin" msgid "Bilin"
msgstr "" msgstr "Bilin"
#. name for byo #. name for byo
msgid "Biyo" msgid "Biyo"
msgstr "" msgstr "Biyo"
#. name for byp #. name for byp
msgid "Bumaji" msgid "Bumaji"
@ -4659,19 +4659,19 @@ msgstr "Carolinio"
#. name for cam #. name for cam
msgid "Cemuhî" msgid "Cemuhî"
msgstr "" msgstr "Cemuhî"
#. name for can #. name for can
msgid "Chambri" msgid "Chambri"
msgstr "" msgstr "Chambri"
#. name for cao #. name for cao
msgid "Chácobo" msgid "Chácobo"
msgstr "" msgstr "Chácobo"
#. name for cap #. name for cap
msgid "Chipaya" msgid "Chipaya"
msgstr "" msgstr "Chipaya"
#. name for caq #. name for caq
msgid "Nicobarese, Car" msgid "Nicobarese, Car"
@ -4679,11 +4679,11 @@ msgstr "Nicobarés de Car"
#. name for car #. name for car
msgid "Carib, Galibi" msgid "Carib, Galibi"
msgstr "" msgstr "Caribe galibí"
#. name for cas #. name for cas
msgid "Tsimané" msgid "Tsimané"
msgstr "" msgstr "Tsimané"
#. name for cat #. name for cat
msgid "Catalan" msgid "Catalan"
@ -4691,175 +4691,175 @@ msgstr "Catalán"
#. name for cav #. name for cav
msgid "Cavineña" msgid "Cavineña"
msgstr "" msgstr "Cavineña"
#. name for caw #. name for caw
msgid "Callawalla" msgid "Callawalla"
msgstr "" msgstr "Callawalla"
#. name for cax #. name for cax
msgid "Chiquitano" msgid "Chiquitano"
msgstr "" msgstr "Chiquitano"
#. name for cay #. name for cay
msgid "Cayuga" msgid "Cayuga"
msgstr "" msgstr "Cayuga"
#. name for caz #. name for caz
msgid "Canichana" msgid "Canichana"
msgstr "" msgstr "Canichana"
#. name for cbb #. name for cbb
msgid "Cabiyarí" msgid "Cabiyarí"
msgstr "" msgstr "Cabiyarí"
#. name for cbc #. name for cbc
msgid "Carapana" msgid "Carapana"
msgstr "" msgstr "Carapana"
#. name for cbd #. name for cbd
msgid "Carijona" msgid "Carijona"
msgstr "" msgstr "Carijona"
#. name for cbe #. name for cbe
msgid "Chipiajes" msgid "Chipiajes"
msgstr "" msgstr "Chipiajes"
#. name for cbg #. name for cbg
msgid "Chimila" msgid "Chimila"
msgstr "" msgstr "Chimila"
#. name for cbh #. name for cbh
msgid "Cagua" msgid "Cagua"
msgstr "" msgstr "Cagua"
#. name for cbi #. name for cbi
msgid "Chachi" msgid "Chachi"
msgstr "" msgstr "Chachi"
#. name for cbj #. name for cbj
msgid "Ede Cabe" msgid "Ede Cabe"
msgstr "" msgstr "Ede cabe"
#. name for cbk #. name for cbk
msgid "Chavacano" msgid "Chavacano"
msgstr "" msgstr "Chabacano"
#. name for cbl #. name for cbl
msgid "Chin, Bualkhaw" msgid "Chin, Bualkhaw"
msgstr "" msgstr "Chin bualkhaw"
#. name for cbn #. name for cbn
msgid "Nyahkur" msgid "Nyahkur"
msgstr "" msgstr "Nyahkur"
#. name for cbo #. name for cbo
msgid "Izora" msgid "Izora"
msgstr "" msgstr "Izora"
#. name for cbr #. name for cbr
msgid "Cashibo-Cacataibo" msgid "Cashibo-Cacataibo"
msgstr "" msgstr "Cashibo-cacataibo"
#. name for cbs #. name for cbs
msgid "Cashinahua" msgid "Cashinahua"
msgstr "" msgstr "Cashinahua"
#. name for cbt #. name for cbt
msgid "Chayahuita" msgid "Chayahuita"
msgstr "" msgstr "Chayahuita"
#. name for cbu #. name for cbu
msgid "Candoshi-Shapra" msgid "Candoshi-Shapra"
msgstr "" msgstr "Candoshi-Shapra"
#. name for cbv #. name for cbv
msgid "Cacua" msgid "Cacua"
msgstr "" msgstr "Cacua"
#. name for cbw #. name for cbw
msgid "Kinabalian" msgid "Kinabalian"
msgstr "" msgstr "Kinabalian"
#. name for cby #. name for cby
msgid "Carabayo" msgid "Carabayo"
msgstr "" msgstr "Carabayo"
#. name for cca #. name for cca
msgid "Cauca" msgid "Cauca"
msgstr "" msgstr "Cauca"
#. name for ccc #. name for ccc
msgid "Chamicuro" msgid "Chamicuro"
msgstr "" msgstr "Chamicuro"
#. name for ccd #. name for ccd
msgid "Creole, Cafundo" msgid "Creole, Cafundo"
msgstr "" msgstr "Criollo de Cafundo"
#. name for cce #. name for cce
msgid "Chopi" msgid "Chopi"
msgstr "" msgstr "Chopi"
#. name for ccg #. name for ccg
msgid "Daka, Samba" msgid "Daka, Samba"
msgstr "" msgstr "Samba daka"
#. name for cch #. name for cch
msgid "Atsam" msgid "Atsam"
msgstr "" msgstr "Atsam"
#. name for ccj #. name for ccj
msgid "Kasanga" msgid "Kasanga"
msgstr "" msgstr "Kasanga"
#. name for ccl #. name for ccl
msgid "Cutchi-Swahili" msgid "Cutchi-Swahili"
msgstr "" msgstr "Cutchi-suajili"
#. name for ccm #. name for ccm
msgid "Creole Malay, Malaccan" msgid "Creole Malay, Malaccan"
msgstr "" msgstr "Malayo criollo de Malaca"
#. name for cco #. name for cco
msgid "Chinantec, Comaltepec" msgid "Chinantec, Comaltepec"
msgstr "" msgstr "Chinanteco de Comaltepec"
#. name for ccp #. name for ccp
msgid "Chakma" msgid "Chakma"
msgstr "" msgstr "Chakma"
#. name for ccq #. name for ccq
msgid "Chaungtha" msgid "Chaungtha"
msgstr "" msgstr "Chaungtha"
#. name for ccr #. name for ccr
msgid "Cacaopera" msgid "Cacaopera"
msgstr "" msgstr "Cacaopera"
#. name for cda #. name for cda
msgid "Choni" msgid "Choni"
msgstr "" msgstr "Choni"
#. name for cde #. name for cde
msgid "Chenchu" msgid "Chenchu"
msgstr "" msgstr "Chenchu"
#. name for cdf #. name for cdf
msgid "Chiru" msgid "Chiru"
msgstr "" msgstr "Chiru"
#. name for cdg #. name for cdg
msgid "Chamari" msgid "Chamari"
msgstr "" msgstr "Chamari"
#. name for cdh #. name for cdh
msgid "Chambeali" msgid "Chambeali"
msgstr "" msgstr "Chambeali"
#. name for cdi #. name for cdi
msgid "Chodri" msgid "Chodri"
msgstr "" msgstr "Chodri"
#. name for cdj #. name for cdj
msgid "Churahi" msgid "Churahi"
@ -4867,7 +4867,7 @@ msgstr ""
#. name for cdm #. name for cdm
msgid "Chepang" msgid "Chepang"
msgstr "" msgstr "Chepang"
#. name for cdn #. name for cdn
msgid "Chaudangsi" msgid "Chaudangsi"
@ -11743,7 +11743,7 @@ msgstr ""
#. name for khc #. name for khc
msgid "Tukang Besi North" msgid "Tukang Besi North"
msgstr "" msgstr "Tukang besi norte"
#. name for khd #. name for khd
msgid "Kanum, Bädi" msgid "Kanum, Bädi"
@ -24187,11 +24187,11 @@ msgstr "Suajili (macrolengua)"
#. name for swb #. name for swb
msgid "Comorian, Maore" msgid "Comorian, Maore"
msgstr "" msgstr "Comorense de Mayotte"
#. name for swc #. name for swc
msgid "Swahili, Congo" msgid "Swahili, Congo"
msgstr "" msgstr "Suajili del Congo"
#. name for swe #. name for swe
msgid "Swedish" msgid "Swedish"
@ -27759,7 +27759,7 @@ msgstr ""
#. name for wlc #. name for wlc
msgid "Comorian, Mwali" msgid "Comorian, Mwali"
msgstr "" msgstr "Comorense de Mohéli"
#. name for wle #. name for wle
msgid "Wolane" msgid "Wolane"
@ -27899,7 +27899,7 @@ msgstr ""
#. name for wni #. name for wni
msgid "Comorian, Ndzwani" msgid "Comorian, Ndzwani"
msgstr "" msgstr "Comorense de Anjouan"
#. name for wnk #. name for wnk
msgid "Wanukaka" msgid "Wanukaka"
@ -30263,7 +30263,7 @@ msgstr ""
#. name for zdj #. name for zdj
msgid "Comorian, Ngazidja" msgid "Comorian, Ngazidja"
msgstr "" msgstr "Comorense de Gran Comora"
#. name for zea #. name for zea
msgid "Zeeuws" msgid "Zeeuws"

File diff suppressed because it is too large Load Diff

View File

@ -320,6 +320,28 @@ def get_parsed_proxy(typ='http', debug=True):
prints('Using http proxy', str(ans)) prints('Using http proxy', str(ans))
return ans return ans
def get_proxy_info(proxy_scheme, proxy_string):
'''
Parse all proxy information from a proxy string (as returned by
get_proxies). The returned dict will have members set to None when the info
is not available in the string. If an exception occurs parsing the string
this method returns None.
'''
import urlparse
try:
proxy_url = u'%s://%s'%(proxy_scheme, proxy_string)
urlinfo = urlparse.urlparse(proxy_url)
ans = {
u'scheme': urlinfo.scheme,
u'hostname': urlinfo.hostname,
u'port': urlinfo.port,
u'username': urlinfo.username,
u'password': urlinfo.password,
}
except:
return None
return ans
USER_AGENT = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101210 Gentoo Firefox/3.6.13' USER_AGENT = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101210 Gentoo Firefox/3.6.13'
USER_AGENT_MOBILE = 'Mozilla/5.0 (Windows; U; Windows CE 5.1; rv:1.8.1a3) Gecko/20060610 Minimo/0.016' USER_AGENT_MOBILE = 'Mozilla/5.0 (Windows; U; Windows CE 5.1; rv:1.8.1a3) Gecko/20060610 Minimo/0.016'

View File

@ -4,7 +4,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__ = u'calibre' __appname__ = u'calibre'
numeric_version = (0, 8, 18) numeric_version = (0, 8, 19)
__version__ = u'.'.join(map(unicode, numeric_version)) __version__ = u'.'.join(map(unicode, numeric_version))
__author__ = u"Kovid Goyal <kovid@kovidgoyal.net>" __author__ = u"Kovid Goyal <kovid@kovidgoyal.net>"
@ -33,6 +33,7 @@ islinux = not(iswindows or isosx or isbsd)
isfrozen = hasattr(sys, 'frozen') isfrozen = hasattr(sys, 'frozen')
isunix = isosx or islinux isunix = isosx or islinux
isportable = os.environ.get('CALIBRE_PORTABLE_BUILD', None) is not None isportable = os.environ.get('CALIBRE_PORTABLE_BUILD', None) is not None
ispy3 = sys.version_info.major > 2
try: try:
preferred_encoding = locale.getpreferredencoding() preferred_encoding = locale.getpreferredencoding()

View File

@ -47,7 +47,10 @@ class ANDROID(USBMS):
}, },
# Sony Ericsson # Sony Ericsson
0xfce : { 0xd12e : [0x0100]}, 0xfce : {
0xd12e : [0x0100],
0xe14f : [0x0226],
},
# Google # Google
0x18d1 : { 0x18d1 : {

View File

@ -369,9 +369,8 @@ OptionRecommendation(name='remove_paragraph_spacing_indent_size',
help=_('When calibre removes blank lines between paragraphs, it automatically ' help=_('When calibre removes blank lines between paragraphs, it automatically '
'sets a paragraph indent, to ensure that paragraphs can be easily ' 'sets a paragraph indent, to ensure that paragraphs can be easily '
'distinguished. This option controls the width of that indent (in em). ' 'distinguished. This option controls the width of that indent (in em). '
'If you set this value to 0, then the indent specified in the input ' 'If you set this value negative, then the indent specified in the input '
'document is used, unless you also set the insert line between ' 'document is used, that is, calibre does not change the indentation.')
'paragraphs option.')
), ),
OptionRecommendation(name='prefer_metadata_cover', OptionRecommendation(name='prefer_metadata_cover',

View File

@ -11,7 +11,7 @@ __docformat__ = 'restructuredtext en'
Input plugin for HTML or OPF ebooks. Input plugin for HTML or OPF ebooks.
''' '''
import os, re, sys, uuid, tempfile, errno import os, re, sys, uuid, tempfile, errno as gerrno
from urlparse import urlparse, urlunparse from urlparse import urlparse, urlunparse
from urllib import unquote from urllib import unquote
from functools import partial from functools import partial
@ -75,7 +75,7 @@ class IgnoreFile(Exception):
def __init__(self, msg, errno): def __init__(self, msg, errno):
Exception.__init__(self, msg) Exception.__init__(self, msg)
self.doesnt_exist = errno == errno.ENOENT self.doesnt_exist = errno == gerrno.ENOENT
self.errno = errno self.errno = errno
class HTMLFile(object): class HTMLFile(object):

View File

@ -330,9 +330,11 @@ class MetadataUpdater(object):
prefs = load_defaults('mobi_output') prefs = load_defaults('mobi_output')
pas = prefs.get('prefer_author_sort', False) pas = prefs.get('prefer_author_sort', False)
kindle_pdoc = prefs.get('personal_doc', None) kindle_pdoc = prefs.get('personal_doc', None)
share_not_sync = prefs.get('share_not_sync', False)
except: except:
pas = False pas = False
kindle_pdoc = None kindle_pdoc = None
share_not_sync = False
if mi.author_sort and pas: if mi.author_sort and pas:
authors = mi.author_sort authors = mi.author_sort
update_exth_record((100, normalize(authors).encode(self.codec, 'replace'))) update_exth_record((100, normalize(authors).encode(self.codec, 'replace')))
@ -358,7 +360,7 @@ class MetadataUpdater(object):
if kindle_pdoc and kindle_pdoc in mi.tags: if kindle_pdoc and kindle_pdoc in mi.tags:
added_501 = True added_501 = True
update_exth_record((501, str('PDOC'))) update_exth_record((501, b'PDOC'))
if mi.pubdate: if mi.pubdate:
update_exth_record((106, str(mi.pubdate).encode(self.codec, 'replace'))) update_exth_record((106, str(mi.pubdate).encode(self.codec, 'replace')))
@ -376,7 +378,7 @@ class MetadataUpdater(object):
# Add a 113 record if not present to allow Amazon syncing # Add a 113 record if not present to allow Amazon syncing
if (113 not in self.original_exth_records and if (113 not in self.original_exth_records and
self.original_exth_records.get(501, None) == 'EBOK' and self.original_exth_records.get(501, None) == 'EBOK' and
not added_501): not added_501 and not share_not_sync):
from uuid import uuid4 from uuid import uuid4
update_exth_record((113, str(uuid4()))) update_exth_record((113, str(uuid4())))
if 503 in self.original_exth_records: if 503 in self.original_exth_records:

View File

@ -55,6 +55,11 @@ class MOBIOutput(OutputFormatPlugin):
' specified directory. If the directory already ' ' specified directory. If the directory already '
'exists, it will be deleted.') 'exists, it will be deleted.')
), ),
OptionRecommendation(name='share_not_sync', recommended_value=False,
help=_('Enable sharing of book content via Facebook etc. '
' on the Kindle. WARNING: Using this feature means that '
' the book will not auto sync its last read position '
' on multiple devices. Complain to Amazon.'))
]) ])
def check_for_periodical(self): def check_for_periodical(self):

View File

@ -529,12 +529,13 @@ class MobiWriter(object):
if isinstance(uuid, unicode): if isinstance(uuid, unicode):
uuid = uuid.encode('utf-8') uuid = uuid.encode('utf-8')
if not self.opts.share_not_sync:
exth.write(pack(b'>II', 113, len(uuid) + 8)) exth.write(pack(b'>II', 113, len(uuid) + 8))
exth.write(uuid) exth.write(uuid)
nrecs += 1 nrecs += 1
# Write cdetype # Write cdetype
if not self.is_periodical: if not self.is_periodical and not self.opts.share_not_sync:
exth.write(pack(b'>II', 501, 12)) exth.write(pack(b'>II', 501, 12))
exth.write(b'EBOK') exth.write(b'EBOK')
nrecs += 1 nrecs += 1

View File

@ -321,7 +321,7 @@ class CSSFlattener(object):
cssdict['margin-top'] = cssdict['margin-bottom'] = \ cssdict['margin-top'] = cssdict['margin-bottom'] = \
'%fem'%self.context.insert_blank_line_size '%fem'%self.context.insert_blank_line_size
indent_size = self.context.remove_paragraph_spacing_indent_size indent_size = self.context.remove_paragraph_spacing_indent_size
keep_indents = indent_size == 0.0 and not self.context.insert_blank_line keep_indents = indent_size < 0.0
if (self.context.remove_paragraph_spacing and not keep_indents and if (self.context.remove_paragraph_spacing and not keep_indents and
cssdict.get('text-align', None) not in ('center', 'right')): cssdict.get('text-align', None) not in ('center', 'right')):
cssdict['text-indent'] = "%1.1fem" % indent_size cssdict['text-indent'] = "%1.1fem" % indent_size

View File

@ -753,15 +753,24 @@ def open_local_file(path):
url = QUrl.fromLocalFile(path) url = QUrl.fromLocalFile(path)
open_url(url) open_url(url)
def is_ok_to_use_qt(): def must_use_qt():
global gui_thread, _store_app global gui_thread, _store_app
if (islinux or isbsd) and ':' not in os.environ.get('DISPLAY', ''): if (islinux or isbsd) and ':' not in os.environ.get('DISPLAY', ''):
return False raise RuntimeError('X server required. If you are running on a'
' headless machine, use xvfb')
if _store_app is None and QApplication.instance() is None: if _store_app is None and QApplication.instance() is None:
_store_app = QApplication([]) _store_app = QApplication([])
if gui_thread is None: if gui_thread is None:
gui_thread = QThread.currentThread() gui_thread = QThread.currentThread()
return gui_thread is QThread.currentThread() if gui_thread is not QThread.currentThread():
raise RuntimeError('Cannot use Qt in non GUI thread')
def is_ok_to_use_qt():
try:
must_use_qt()
except RuntimeError:
return False
return True
def is_gui_thread(): def is_gui_thread():
global gui_thread global gui_thread

View File

@ -29,7 +29,7 @@ class StoreAction(InterfaceAction):
('book', _('book'))]: ('book', _('book'))]:
func = getattr(self, 'search_%s'%('author_title' if x == 'book' func = getattr(self, 'search_%s'%('author_title' if x == 'book'
else x)) else x))
ac = cm(x, _('Search for this %s'%t), triggered=func) ac = cm(x, _('Search for this %s')%t, triggered=func)
setattr(self, 'action_search_by_'+x, ac) setattr(self, 'action_search_by_'+x, ac)
self.store_menu.addSeparator() self.store_menu.addSeparator()
self.store_list_menu = self.store_menu.addMenu(_('Stores')) self.store_list_menu = self.store_menu.addMenu(_('Stores'))

View File

@ -84,7 +84,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset> <normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -225,12 +225,21 @@
<property name="toolTip"> <property name="toolTip">
<string>&lt;p&gt;When calibre removes inter paragraph spacing, it automatically sets a paragraph indent, to ensure that paragraphs can be easily distinguished. This option controls the width of that indent.</string> <string>&lt;p&gt;When calibre removes inter paragraph spacing, it automatically sets a paragraph indent, to ensure that paragraphs can be easily distinguished. This option controls the width of that indent.</string>
</property> </property>
<property name="specialValueText">
<string>No change</string>
</property>
<property name="suffix"> <property name="suffix">
<string> em</string> <string> em</string>
</property> </property>
<property name="decimals"> <property name="decimals">
<number>1</number> <number>1</number>
</property> </property>
<property name="minimum">
<double>-0.100000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget> </widget>
</item> </item>
<item row="6" column="3"> <item row="6" column="3">

View File

@ -23,7 +23,7 @@ class PluginWidget(Widget, Ui_Form):
Widget.__init__(self, parent, Widget.__init__(self, parent,
['prefer_author_sort', 'rescale_images', 'toc_title', ['prefer_author_sort', 'rescale_images', 'toc_title',
'mobi_ignore_margins', 'mobi_toc_at_start', 'mobi_ignore_margins', 'mobi_toc_at_start',
'dont_compress', 'no_inline_toc', 'dont_compress', 'no_inline_toc', 'share_not_sync',
'personal_doc']#, 'mobi_navpoints_only_deepest'] 'personal_doc']#, 'mobi_navpoints_only_deepest']
) )
self.db, self.book_id = db, book_id self.db, self.book_id = db, book_id

View File

@ -75,6 +75,13 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QCheckBox" name="opt_share_not_sync">
<property name="text">
<string>Enable sharing of book content via Facebook, etc. WARNING: Disables last read syncing</string>
</property>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">

View File

@ -229,14 +229,14 @@ class CheckLibraryDialog(QDialog):
self.copy_button = QPushButton(_('Copy &to clipboard')) self.copy_button = QPushButton(_('Copy &to clipboard'))
self.copy_button.setDefault(False) self.copy_button.setDefault(False)
self.copy_button.clicked.connect(self.copy_to_clipboard) self.copy_button.clicked.connect(self.copy_to_clipboard)
self.ok_button = QPushButton('&Done') self.ok_button = QPushButton(_('&Done'))
self.ok_button.setDefault(True) self.ok_button.setDefault(True)
self.ok_button.clicked.connect(self.accept) self.ok_button.clicked.connect(self.accept)
self.delete_button = QPushButton('Delete &marked') self.delete_button = QPushButton(_('Delete &marked'))
self.delete_button.setToolTip(_('Delete marked files (checked subitems)')) self.delete_button.setToolTip(_('Delete marked files (checked subitems)'))
self.delete_button.setDefault(False) self.delete_button.setDefault(False)
self.delete_button.clicked.connect(self.delete_marked) self.delete_button.clicked.connect(self.delete_marked)
self.fix_button = QPushButton('&Fix marked') self.fix_button = QPushButton(_('&Fix marked'))
self.fix_button.setDefault(False) self.fix_button.setDefault(False)
self.fix_button.setEnabled(False) self.fix_button.setEnabled(False)
self.fix_button.setToolTip(_('Fix marked sections (checked fixable items)')) self.fix_button.setToolTip(_('Fix marked sections (checked fixable items)'))

View File

@ -535,6 +535,8 @@ class MetadataBulkDialog(ResizableDialog, Ui_MetadataBulkDialog):
val = [v.replace('|', ',') for v in val] val = [v.replace('|', ',') for v in val]
else: else:
val = [] val = []
if not val:
val = ['']
return val return val
def s_r_display_bounds_changed(self, i): def s_r_display_bounds_changed(self, i):

View File

@ -18,10 +18,6 @@ class NameTableWidgetItem(QTableWidgetItem):
def data(self, role): def data(self, role):
if role == Qt.DisplayRole: if role == Qt.DisplayRole:
if self.initial_value != self.current_value:
return _('%(curr)s (was %(initial)s)')%dict(
curr=self.current_value, initial=self.initial_value)
else:
return self.current_value return self.current_value
elif role == Qt.EditRole: elif role == Qt.EditRole:
return self.current_value return self.current_value
@ -105,13 +101,16 @@ class TagListEditor(QDialog, Ui_TagListEditor):
self.up_arrow_icon = QIcon(I('arrow-up.png')) self.up_arrow_icon = QIcon(I('arrow-up.png'))
self.blank_icon = QIcon(I('blank.png')) self.blank_icon = QIcon(I('blank.png'))
self.table.setColumnCount(2) self.table.setColumnCount(3)
self.name_col = QTableWidgetItem(_('Tag')) self.name_col = QTableWidgetItem(_('Tag'))
self.table.setHorizontalHeaderItem(0, self.name_col) self.table.setHorizontalHeaderItem(0, self.name_col)
self.name_col.setIcon(self.up_arrow_icon) self.name_col.setIcon(self.up_arrow_icon)
self.count_col = QTableWidgetItem(_('Count')) self.count_col = QTableWidgetItem(_('Count'))
self.table.setHorizontalHeaderItem(1, self.count_col) self.table.setHorizontalHeaderItem(1, self.count_col)
self.count_col.setIcon(self.blank_icon) self.count_col.setIcon(self.blank_icon)
self.was_col = QTableWidgetItem(_('Was'))
self.table.setHorizontalHeaderItem(2, self.was_col)
self.count_col.setIcon(self.blank_icon)
# Capture clicks on the horizontal header to sort the table columns # Capture clicks on the horizontal header to sort the table columns
hh = self.table.horizontalHeader(); hh = self.table.horizontalHeader();
@ -120,6 +119,7 @@ class TagListEditor(QDialog, Ui_TagListEditor):
hh.sectionResized.connect(self.table_column_resized) hh.sectionResized.connect(self.table_column_resized)
self.name_order = 0 self.name_order = 0
self.count_order = 1 self.count_order = 1
self.was_order = 1
# Add the data # Add the data
select_item = None select_item = None
@ -135,6 +135,9 @@ class TagListEditor(QDialog, Ui_TagListEditor):
# only the name column can be selected # only the name column can be selected
item.setFlags (item.flags() & ~Qt.ItemIsSelectable) item.setFlags (item.flags() & ~Qt.ItemIsSelectable)
self.table.setItem(row, 1, item) self.table.setItem(row, 1, item)
item = QTableWidgetItem('')
item.setFlags (item.flags() & ~Qt.ItemIsSelectable)
self.table.setItem(row, 2, item)
# Scroll to the selected item if there is one # Scroll to the selected item if there is one
if select_item is not None: if select_item is not None:
@ -187,6 +190,10 @@ class TagListEditor(QDialog, Ui_TagListEditor):
if item.text() != item.initial_text(): if item.text() != item.initial_text():
id_ = item.data(Qt.UserRole).toInt()[0] id_ = item.data(Qt.UserRole).toInt()[0]
self.to_rename[id_] = unicode(item.text()) self.to_rename[id_] = unicode(item.text())
orig = self.table.item(item.row(), 2)
self.table.blockSignals(True)
orig.setData(Qt.DisplayRole, item.initial_text())
self.table.blockSignals(False)
def rename_tag(self): def rename_tag(self):
item = self.table.item(self.table.currentRow(), 0) item = self.table.item(self.table.currentRow(), 0)
@ -223,8 +230,10 @@ class TagListEditor(QDialog, Ui_TagListEditor):
def header_clicked(self, idx): def header_clicked(self, idx):
if idx == 0: if idx == 0:
self.do_sort_by_name() self.do_sort_by_name()
else: elif idx == 1:
self.do_sort_by_count() self.do_sort_by_count()
else:
self.do_sort_by_was()
def do_sort_by_name(self): def do_sort_by_name(self):
self.name_order = 1 if self.name_order == 0 else 0 self.name_order = 1 if self.name_order == 0 else 0
@ -232,6 +241,7 @@ class TagListEditor(QDialog, Ui_TagListEditor):
self.name_col.setIcon(self.down_arrow_icon if self.name_order self.name_col.setIcon(self.down_arrow_icon if self.name_order
else self.up_arrow_icon) else self.up_arrow_icon)
self.count_col.setIcon(self.blank_icon) self.count_col.setIcon(self.blank_icon)
self.was_col.setIcon(self.blank_icon)
def do_sort_by_count (self): def do_sort_by_count (self):
self.count_order = 1 if self.count_order == 0 else 0 self.count_order = 1 if self.count_order == 0 else 0
@ -239,6 +249,15 @@ class TagListEditor(QDialog, Ui_TagListEditor):
self.count_col.setIcon(self.down_arrow_icon if self.count_order self.count_col.setIcon(self.down_arrow_icon if self.count_order
else self.up_arrow_icon) else self.up_arrow_icon)
self.name_col.setIcon(self.blank_icon) self.name_col.setIcon(self.blank_icon)
self.was_col.setIcon(self.blank_icon)
def do_sort_by_was(self):
self.was_order = 1 if self.was_order == 0 else 0
self.table.sortByColumn(2, self.was_order)
self.was_col.setIcon(self.down_arrow_icon if self.was_order
else self.up_arrow_icon)
self.name_col.setIcon(self.blank_icon)
self.count_col.setIcon(self.blank_icon)
def accepted(self): def accepted(self):
self.save_geometry() self.save_geometry()

View File

@ -266,7 +266,7 @@ class JobManager(QAbstractTableModel): # {{{
def kill_multiple_jobs(self, rows, view): def kill_multiple_jobs(self, rows, view):
jobs = [self.jobs[row] for row in rows] jobs = [self.jobs[row] for row in rows]
devjobs = [j for j in jobs is isinstance(j, DeviceJob)] devjobs = [j for j in jobs if isinstance(j, DeviceJob)]
if devjobs: if devjobs:
error_dialog(view, _('Cannot kill job'), error_dialog(view, _('Cannot kill job'),
_('Cannot kill jobs that communicate with the device')).exec_() _('Cannot kill jobs that communicate with the device')).exec_()

View File

@ -25,6 +25,7 @@ from calibre.gui2.metadata.single_download import FullFetch
from calibre.gui2.custom_column_widgets import populate_metadata_page from calibre.gui2.custom_column_widgets import populate_metadata_page
from calibre.utils.config import tweaks from calibre.utils.config import tweaks
from calibre.ebooks.metadata.book.base import Metadata from calibre.ebooks.metadata.book.base import Metadata
from calibre.utils.localization import canonicalize_lang
BASE_TITLE = _('Edit Metadata') BASE_TITLE = _('Edit Metadata')
@ -376,7 +377,10 @@ class MetadataSingleDialogBase(ResizableDialog):
if mi.series_index is not None: if mi.series_index is not None:
self.series_index.current_val = float(mi.series_index) self.series_index.current_val = float(mi.series_index)
if not mi.is_null('languages'): if not mi.is_null('languages'):
self.languages.lang_codes = mi.languages langs = [canonicalize_lang(x) for x in mi.languages]
langs = [x for x in langs if x is not None]
if langs:
self.languages.current_val = langs
if mi.comments and mi.comments.strip(): if mi.comments and mi.comments.strip():
self.comments.current_val = mi.comments self.comments.current_val = mi.comments

View File

@ -1034,10 +1034,19 @@ class TagsModel(QAbstractItemModel): # {{{
def index_for_path(self, path): def index_for_path(self, path):
parent = QModelIndex() parent = QModelIndex()
for i in path: for idx,v in enumerate(path):
parent = self.index(i, 0, parent) tparent = self.index(v, 0, parent)
if not parent.isValid(): if not tparent.isValid():
return QModelIndex() if v > 0 and idx == len(path) - 1:
# Probably the last item went away. Use the one before it
tparent = self.index(v-1, 0, parent)
if not tparent.isValid():
# Not valid. Use the last valid index
break
else:
# There isn't one before it. Use the last valid index
break
parent = tparent
return parent return parent
def index(self, row, column, parent): def index(self, row, column, parent):

View File

@ -167,16 +167,20 @@ class CheckLibrary(object):
if self.is_case_sensitive: if self.is_case_sensitive:
unknowns = frozenset(filenames-formats-NORMALS) unknowns = frozenset(filenames-formats-NORMALS)
missing = book_formats - formats
# Check: any books that aren't formats or normally there? # Check: any books that aren't formats or normally there?
for u in unknowns: for fn in unknowns:
if fn in missing: # An unknown format correctly registered
continue
self.extra_files.append((title_dir, self.extra_files.append((title_dir,
os.path.join(db_path, u), book_id)) os.path.join(db_path, fn), book_id))
# Check: any book formats that should be there? # Check: any book formats that should be there?
missing = book_formats - formats for fn in missing:
for m in missing: if fn in unknowns: # An unknown format correctly registered
continue
self.missing_formats.append((title_dir, self.missing_formats.append((title_dir,
os.path.join(db_path, m), book_id)) os.path.join(db_path, fn), book_id))
# Check: any book formats that shouldn't be there? # Check: any book formats that shouldn't be there?
extra = formats - book_formats - NORMALS extra = formats - book_formats - NORMALS
@ -185,25 +189,32 @@ class CheckLibrary(object):
os.path.join(db_path, e), book_id)) os.path.join(db_path, e), book_id))
else: else:
def lc_map(fnames, fset): def lc_map(fnames, fset):
m = {} fn = {}
for f in fnames: for f in fnames:
m[f.lower()] = f ff = f.lower()
return [m[f] for f in fset] if ff in fset:
fn[ff] = f
return fn
filenames_lc = frozenset([f.lower() for f in filenames]) filenames_lc = frozenset([f.lower() for f in filenames])
formats_lc = frozenset([f.lower() for f in formats]) formats_lc = frozenset([f.lower() for f in formats])
unknowns = frozenset(filenames_lc-formats_lc-NORMALS) unknowns = frozenset(filenames_lc-formats_lc-NORMALS)
book_formats_lc = frozenset([f.lower() for f in book_formats])
missing = book_formats_lc - formats_lc
# Check: any books that aren't formats or normally there? # Check: any books that aren't formats or normally there?
for f in lc_map(filenames, unknowns): for lcfn,ccfn in lc_map(filenames, unknowns).iteritems():
self.extra_files.append((title_dir, os.path.join(db_path, f), if lcfn in missing: # An unknown format correctly registered
continue
self.extra_files.append((title_dir, os.path.join(db_path, ccfn),
book_id)) book_id))
book_formats_lc = frozenset([f.lower() for f in book_formats])
# Check: any book formats that should be there? # Check: any book formats that should be there?
missing = book_formats_lc - formats_lc for lcfn,ccfn in lc_map(book_formats, missing).iteritems():
for m in lc_map(book_formats, missing): if lcfn in unknowns: # An unknown format correctly registered
continue
self.missing_formats.append((title_dir, self.missing_formats.append((title_dir,
os.path.join(db_path, m), book_id)) os.path.join(db_path, ccfn), book_id))
# Check: any book formats that shouldn't be there? # Check: any book formats that shouldn't be there?
extra = formats_lc - book_formats_lc - NORMALS extra = formats_lc - book_formats_lc - NORMALS

View File

@ -117,9 +117,9 @@ We just need some information from you:
* What ebook formats does your device support? * What ebook formats does your device support?
* Is there a special directory on the device in which all ebook files should be placed? * Is there a special directory on the device in which all ebook files should be placed?
* We also need information about your device that |app| will collect automatically. First, if your * We also need information about your device that |app| will collect automatically. First, if your
device supports SD cards, insert them. Then connect your device. In calibre go to :guilabel:`Preferences->Advanced->Miscellaneous` device supports SD cards, insert them. Then connect your device to the computer. In calibre go to :guilabel:`Preferences->Advanced->Miscellaneous`
and click the "Debug device detection" button. This will create some debug output. Copy it to a file and click the "Debug device detection" button. This will create some debug output. Copy it to a file
and repeat the process, this time with your device disconnected. and repeat the process, this time with your device disconnected from your computer.
* Send both the above outputs to us with the other information and we will write a device driver for your * Send both the above outputs to us with the other information and we will write a device driver for your
device. device.

View File

@ -128,6 +128,8 @@ The functions available are listed below. Note that the definitive documentation
* ``human_readable()`` -- expects the value to be a number and returns a string representing that number in KB, MB, GB, etc. * ``human_readable()`` -- expects the value to be a number and returns a string representing that number in KB, MB, GB, etc.
* ``ifempty(text)`` -- if the field is not empty, return the value of the field. Otherwise return `text`. * ``ifempty(text)`` -- if the field is not empty, return the value of the field. Otherwise return `text`.
* ``in_list(separator, pattern, found_val, not_found_val)`` -- interpret the field as a list of items separated by `separator`, comparing the `pattern` against each value in the list. If the pattern matches a value, return `found_val`, otherwise return `not_found_val`. * ``in_list(separator, pattern, found_val, not_found_val)`` -- interpret the field as a list of items separated by `separator`, comparing the `pattern` against each value in the list. If the pattern matches a value, return `found_val`, otherwise return `not_found_val`.
* ``language_codes(lang_strings)`` -- return the language codes for the strings passed in `lang_strings`. The strings must be in the language of the current locale. `Lang_strings` is a comma-separated list.
* ``language_strings(lang_codes, localize)`` -- return the strings for the language codes passed in `lang_codes`. If `localize` is zero, return the strings in English. If localize is not zero, return the strings in the language of the current locale. `Lang_codes` is a comma-separated list.
* ``list_item(index, separator)`` -- interpret the field as a list of items separated by `separator`, returning the `index`th item. The first item is number zero. The last item can be returned using `list_item(-1,separator)`. If the item is not in the list, then the empty value is returned. The separator has the same meaning as in the `count` function. * ``list_item(index, separator)`` -- interpret the field as a list of items separated by `separator`, returning the `index`th item. The first item is number zero. The last item can be returned using `list_item(-1,separator)`. If the item is not in the list, then the empty value is returned. The separator has the same meaning as in the `count` function.
* ``re(pattern, replacement)`` -- return the field after applying the regular expression. All instances of `pattern` are replaced with `replacement`. As in all of |app|, these are python-compatible regular expressions. * ``re(pattern, replacement)`` -- return the field after applying the regular expression. All instances of `pattern` are replaced with `replacement`. As in all of |app|, these are python-compatible regular expressions.
* ``shorten(left chars, middle text, right chars)`` -- Return a shortened version of the field, consisting of `left chars` characters from the beginning of the field, followed by `middle text`, followed by `right chars` characters from the end of the string. `Left chars` and `right chars` must be integers. For example, assume the title of the book is `Ancient English Laws in the Times of Ivanhoe`, and you want it to fit in a space of at most 15 characters. If you use ``{title:shorten(9,-,5)}``, the result will be `Ancient E-nhoe`. If the field's length is less than ``left chars`` + ``right chars`` + the length of ``middle text``, then the field will be used intact. For example, the title `The Dome` would not be changed. * ``shorten(left chars, middle text, right chars)`` -- Return a shortened version of the field, consisting of `left chars` characters from the beginning of the field, followed by `middle text`, followed by `right chars` characters from the end of the string. `Left chars` and `right chars` must be integers. For example, assume the title of the book is `Ancient English Laws in the Times of Ivanhoe`, and you want it to fit in a space of at most 15 characters. If you use ``{title:shorten(9,-,5)}``, the result will be `Ancient E-nhoe`. If the field's length is less than ``left chars`` + ``right chars`` + the length of ``middle text``, then the field will be used intact. For example, the title `The Dome` would not be changed.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More