Pull from trunk

This commit is contained in:
Kovid Goyal 2010-08-13 13:26:15 -06:00
commit 0ad974110a
36 changed files with 39512 additions and 37272 deletions

View File

@ -4,6 +4,64 @@
# for important features/bug fixes.
# Also, each release can have new and improved recipes.
- version: 0.7.14
date: 2010-08-13
new features:
- title: "Device drivers for the: Teclast K-5, Samsung SNE-60 and Samsung i7500"
- title: "When showing cover browser in a separate window, remember the last used window size"
- title: "Add keyboard shortcuts to show/hide the Tag Browser, Book details and Cover Browser panels. Hover your mouse over the buttons that toggle them to see the shortcuts."
- title: "Calibre library: When the case of title or author is changed, automatically rename the folders to reflect the new case, even on case insensitive filesystems"
- title: "Metadata download: If downloaded title or author is all upper case, automatically fix the case"
- title: "Add method to add books by ISBN. Click the arrow next to Add Books to add from a list of ISBNs."
tickets: [6327]
- title: "Allow editing of tweaks via Preferences->Advanced"
- title: "Add button to manage authors dialog to automatically reset all author sort values"
bug fixes:
- title: "Fix regression in 0.7.13 that broke changing libraries"
- title: "MOBI Output: When processing an input document that specifies non-existant files in the OPF guide, don't crash."
tickets: [6490]
- title: "E-book viewer: When opening consecutive documents in the same viewer, show the correct title in the titlebar"
- title: "Set screen size to 540x718 in Kobo output profile"
- title: "Dont allow calibredb to create custom columns with invalid labels."
tickets: [6487]
- title: "Fix preference to 'search as you type' not working"
- title: "iTunes driver: Fixed bug in PDF file name searching after adding to iTunes database (Windows only)"
- title: "Displaying HTML comments: Do not start a new paragraph at the period in words like Ph.D"
tickets: [6462]
- title: "Respect restriction in effect when refreshing book list"
- title: "Fix drives being reversed for softrooted nook"
new recipes:
- title: "Yahoo News, Skeptical Enquirer and Skeptic"
author: Startson17
- title: "Bolivian newspapers"
author: Darko Miletic
improved recipes:
- Esquire
- Big Oven
- NSPM
- version: 0.7.13
date: 2010-08-06

View File

@ -9,9 +9,9 @@ from calibre import strftime
from calibre.web.feeds.news import BasicNewsRecipe
class ElPaisImpresa(BasicNewsRecipe):
title = 'El País - edicion impresa'
title = u'El Pa\xeds - edicion impresa'
__author__ = 'Darko Miletic'
description = 'el periodico global en Español'
description = u'el periodico global en Espa\xf1ol'
publisher = 'EDICIONES EL PAIS, S.L.'
category = 'news, politics,Spain,actualidad,noticias,informacion,videos,fotografias,audios,graficos,nacional,internacional,deportes,economia,tecnologia,cultura,gente,television,sociedad,opinion,blogs,foros,chats,encuestas,entrevistas,participacion'
no_stylesheets = True
@ -32,10 +32,10 @@ class ElPaisImpresa(BasicNewsRecipe):
feeds = [
(u'Internacional' , index + u'internacional/' )
,(u'España' , index + u'espana/' )
,(u'Espa\xf1a' , index + u'espana/' )
,(u'Economia' , index + u'economia/' )
,(u'Opinion' , index + u'opinion/' )
,(u'Viñetas' , index + u'vineta/' )
,(u'Vi\xf1etas' , index + u'vineta/' )
,(u'Sociedad' , index + u'sociedad/' )
,(u'Cultura' , index + u'cultura/' )
,(u'Tendencias' , index + u'tendencias/' )

View File

@ -1,13 +1,10 @@
#!/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>'
'''
economictimes.indiatimes.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag
class TheEconomicTimes(BasicNewsRecipe):
title = 'The Economic Times India'
@ -21,18 +18,21 @@ class TheEconomicTimes(BasicNewsRecipe):
use_embedded_content = False
simultaneous_downloads = 1
encoding = 'utf-8'
lang = 'en-IN'
language = 'en_IN'
language = 'en_IN'
publication_type = 'newspaper'
masthead_url = 'http://economictimes.indiatimes.com/photo/2676871.cms'
extra_css = """ body{font-family: Arial,Helvetica,sans-serif}
.heading1{font-size: xx-large; font-weight: bold} """
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
}
html2lrf_options = [
'--comment', description
, '--category', category
, '--publisher', publisher
, '--ignore-tables'
]
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True'
keep_only_tags = [dict(attrs={'class':['heading1','headingnext','Normal']})]
remove_tags = [dict(name=['object','link','embed','iframe','base','table','meta'])]
feeds = [(u'All articles', u'http://economictimes.indiatimes.com/rssfeedsdefault.cms')]
@ -47,11 +47,6 @@ class TheEconomicTimes(BasicNewsRecipe):
return rurl
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)
for item in soup.findAll(style=True):
del item['style']
return self.adeify_images(soup)

View File

@ -2,7 +2,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
__appname__ = 'calibre'
__version__ = '0.7.13'
__version__ = '0.7.14'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
import re

View File

@ -33,7 +33,9 @@ class ANDROID(USBMS):
# Samsung
0x04e8 : { 0x681d : [0x0222, 0x0400],
0x681c : [0x0222, 0x0224, 0x0400]},
0x681c : [0x0222, 0x0224, 0x0400],
0x6640 : [0x0100],
},
# Acer
0x502 : { 0x3203 : [0x0100]},
@ -54,9 +56,9 @@ class ANDROID(USBMS):
'GT-I5700', 'SAMSUNG', 'DELL', 'LINUX']
WINDOWS_MAIN_MEM = ['ANDROID_PHONE', 'A855', 'A853', 'INC.NEXUS_ONE',
'__UMS_COMPOSITE', '_MB200', 'MASS_STORAGE', '_-_CARD',
'GT-I9000', 'FILE-STOR_GADGET', 'SGH-T959']
'GT-I9000', 'FILE-STOR_GADGET', 'SGH-T959', 'SAMSUNG_ANDROID']
WINDOWS_CARD_A_MEM = ['ANDROID_PHONE', 'GT-I9000_CARD',
'FILE-STOR_GADGET', 'SGH-T959']
'FILE-STOR_GADGET', 'SGH-T959', 'SAMSUNG_ANDROID']
OSX_MAIN_MEM = 'HTC Android Phone Media'

View File

@ -56,6 +56,8 @@ class WinPNPScanner(object):
def drive_order(self, pnp_id):
order = 0
match = re.search(r'REV_.*?&(\d+)#', pnp_id)
if match is None:
match = re.search(r'REV_.*?&(\d+)', pnp_id)
if match is not None:
order = int(match.group(1))
return order

View File

@ -20,20 +20,19 @@ class SNE(USBMS):
# Ordered list of supported formats
# Be sure these have an entry in calibre.devices.mime
FORMATS = ['epub', 'txt']
FORMATS = ['epub', 'pdf', 'txt']
VENDOR_ID = [0x04e8]
PRODUCT_ID = [0x2051]
PRODUCT_ID = [0x2051, 0x2053]
BCD = [0x0323]
VENDOR_NAME = ''
#WINDOWS_MAIN_MEM = 'MASS_STORAGE'
#WINDOWS_CARD_A_MEM = 'MASS_STORAGE'
VENDOR_NAME = 'SAMSUNG'
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = 'SNE-60'
MAIN_MEMORY_VOLUME_LABEL = 'SNE Main Memory'
STORAGE_CARD_VOLUME_LABEL = 'SNE Storage Card'
EBOOK_DIR_MAIN = 'Book'
EBOOK_DIR_MAIN = 'Books'
SUPPORTS_SUB_DIRS = True

View File

@ -6,9 +6,9 @@ from calibre.devices.usbms.driver import USBMS
class TECLAST_K3(USBMS):
name = 'Teclast K3 Device Interface'
gui_name = 'K3'
description = _('Communicate with the Teclast K3 reader.')
name = 'Teclast K3/K5 Device Interface'
gui_name = 'K3/K5'
description = _('Communicate with the Teclast K3/K5 reader.')
author = 'Kovid Goyal'
supported_platforms = ['windows', 'osx', 'linux']
@ -17,11 +17,10 @@ class TECLAST_K3(USBMS):
VENDOR_ID = [0x071b]
PRODUCT_ID = [0x3203]
BCD = [0x0000]
BCD = [0x0000, 0x0100]
VENDOR_NAME = 'TECLAST'
WINDOWS_MAIN_MEM = 'DIGITAL_PLAYER'
WINDOWS_CARD_A_MEM = 'DIGITAL_PLAYER'
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['DIGITAL_PLAYER', 'TL-K5']
MAIN_MEMORY_VOLUME_LABEL = 'K3 Main Memory'
STORAGE_CARD_VOLUME_LABEL = 'K3 Storage Card'

View File

@ -185,7 +185,7 @@ class Serializer(object):
buffer.write('<guide>')
for ref in self.oeb.guide.values():
path = urldefrag(ref.href)[0]
if hrefs[path].media_type not in OEB_DOCS:
if path not in hrefs or hrefs[path].media_type not in OEB_DOCS:
continue
buffer.write('<reference type="')

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