This commit is contained in:
GRiker 2010-06-18 12:14:17 -06:00
commit 0b71467042
33 changed files with 37885 additions and 24500 deletions

View File

@ -4,6 +4,117 @@
# for important features/bug fixes. # for important features/bug fixes.
# Also, each release can have new and improved recipes. # Also, each release can have new and improved recipes.
- version: 0.7.3
date: 2010-06-18
new features:
- title: "The Tag Browser now display an average rating for each item"
type: major
description: >
"
The icons of each individual item in the Tag Browser are now partially colored to indicate the average rating of
all books belonging to that category. For example, the icon next to each author is partially colored based on the
averagerating of all books by that author in your calibre library. You can also hover your mouse over the item to
see the average rating in a tooltip. Can be turned off via Preferences->Interface
"
- title: "Editable author sort for each author"
type: major
description: >
"calibre has always allowed you to specify the author sort for each bookin your collection. Now you
can also specify the way the name of each individual author should be sorted. This is used to display the list
of authors in the Tag Browser and OPDS feeds in the Content Server"
- title: "When downloading metadata, also get series information from librarything.com"
type: major
tickets: [5148]
- title: "Redesign of the Book Details pane"
type: major
description: >
"The Book details pane now display covers with animation. Also instead of showing the full path to the book, you now have
clickable links to open the containing folder or individual formats. The path information is still accessible via a tooltip"
- title: "New User Interface layouts"
type: major
description: >
"calibre now has two user interface layouts selectable from Preferences->Interface. The 'wide' layout has the book details pane on the side
and the 'narrow' layout has it on the bottom. The default layout is now wide."
- title: "You can now add books directly from the device to the calibre library by right clicking on the books in the device views"
- title: "iPad driver: Create category from series preferentially, also handle series sorting"
- title: "SONY driver: Add an option to use author_sort instead of author when sending to device"
- title: "Hitting Enter in the search box now causes the search to be re-run"
tickets: [5856]
- title: "Boox driver: Make destination directory for books customizable"
- title: "Add plugin to download metadata from douban.com. Disabled by default."
- title: "OS X/linux driver for PocketBook 301"
- title: "Support for the Samsung Galaxy and Sigmatek EBK52"
- title: "On startup do not focus the search bar. Instead you can acces the search bar easily by pressing the / key or the standard search keyboard shortcut for your operating system"
bug fixes:
- title: "iPad driver: Various bug fixes"
- title: "Kobo Output profile: Adjust the screen dimensions when converting comics"
- title: "Fix using Preferences when a device is connected causes items in device menu to be disabled"
- title: "CHM Input: Skip files whoose names are too long for windows"
- title: "Brighten up calibre icon on dark backgrounds"
- title: "Ignore 'Unknown' in title/autors when downloading metadata"
tickets: [5633]
- title: "Fix regression that broke various entries in the menus - Preferences, Open containing folder and Edit metadata individually"
- title: "EPUB metadata: Handle comma separated entries in <dc:subject> tags correctly"
tickets: [5855]
- title: "MOBI Output: Fix underlines not being rendered"
tickets: [5830]
- title: "EPUB Output: Remove workaround for old versions of Adobe Digital Editions' faulty rendering of links in html. calibre no longer forces links to be blue and underlined"
- title: "Fix a bug that could cause the show pane buttons to not show hidden panes"
- title: "Fix Tag Editor does not reflect recently changed data in Tag Catagory Text Box"
tickets: [5809]
- title: "Content server: Fix sorting of books by authors instead of author_sort in the main and mobile views"
- title: "Cover cache: Resize covers larger than 600x800 in the cover cache to reduce memory consumption in the GUI"
- title: "EPUB Output: Default cover is generated is now generated as a JPEG instead of PNG32, reducing size by an order of magnitude."
tickets: [5810]
- title: "Cover Browser: Scale text size with height of cover browser. Only show a reflection of half the cover. Also restore rendering quality after regression in 0.7.1"
tickets: [5808]
- title: "Book list: Do not let the default layout have any column wider than 350 pixels"
new recipes:
- title: Akter
author: Darko Miletic
- title: Thai Rath and The Nation (Thailand)
author: Anat Ruangrassamee
improved recipes:
- Wall Street Journal
- New York Times
- Slashdot
- Publico
- Danas
- version: 0.7.2 - version: 0.7.2
date: 2010-06-11 date: 2010-06-11

View File

@ -17,6 +17,7 @@ class NYTimes(BasicNewsRecipe):
title = 'New York Times Top Stories' title = 'New York Times Top Stories'
__author__ = 'GRiker' __author__ = 'GRiker'
language = 'en' language = 'en'
requires_version = (0, 7, 3)
description = 'Top Stories from the New York Times' description = 'Top Stories from the New York Times'
# List of sections typically included in Top Stories. Use a keyword from the # List of sections typically included in Top Stories. Use a keyword from the

View File

@ -20,6 +20,7 @@ class NYTimes(BasicNewsRecipe):
title = 'The New York Times' title = 'The New York Times'
__author__ = 'GRiker' __author__ = 'GRiker'
language = 'en' language = 'en'
requires_version = (0, 7, 3)
description = 'Daily news from the New York Times (subscription version)' description = 'Daily news from the New York Times (subscription version)'
allSectionKeywords = ['The Front Page', 'International','National','Obituaries','Editorials', allSectionKeywords = ['The Front Page', 'International','National','Obituaries','Editorials',

View File

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

View File

@ -411,6 +411,34 @@ class AddAction(object): # {{{
if hasattr(self._adder, 'cleanup'): if hasattr(self._adder, 'cleanup'):
self._adder.cleanup() self._adder.cleanup()
self._adder = None self._adder = None
def _add_from_device_adder(self, paths=[], names=[], infos=[],
on_card=None, model=None):
self._files_added(paths, names, infos, on_card=on_card)
# set the in-library flags, and as a consequence send the library's
# metadata for this book to the device. This sets the uuid to the
# correct value.
self.set_books_in_library(booklists=[model.db], reset=True)
model.reset()
def add_books_from_device(self, view):
rows = view.selectionModel().selectedRows()
if not rows or len(rows) == 0:
d = error_dialog(self, _('Add to library'), _('No book selected'))
d.exec_()
return
paths = [p for p in view._model.paths(rows) if p is not None]
if not paths or len(paths) == 0:
d = error_dialog(self, _('Add to library'), _('No book files found'))
d.exec_()
return
from calibre.gui2.add import Adder
self.__adder_func = partial(self._add_from_device_adder, on_card=None,
model=view._model)
self._adder = Adder(self, self.library_view.model().db,
Dispatcher(self.__adder_func), spare_server=self.spare_server)
self._adder.add(paths)
# }}} # }}}
class DeleteAction(object): # {{{ class DeleteAction(object): # {{{

View File

@ -602,7 +602,6 @@ class Emailer(Thread): # {{{
class DeviceMixin(object): # {{{ class DeviceMixin(object): # {{{
def __init__(self): def __init__(self):
self.db_book_uuid_cache = set()
self.device_error_dialog = error_dialog(self, _('Error'), self.device_error_dialog = error_dialog(self, _('Error'),
_('Error communicating with device'), ' ') _('Error communicating with device'), ' ')
self.device_error_dialog.setModal(Qt.NonModal) self.device_error_dialog.setModal(Qt.NonModal)
@ -1350,11 +1349,18 @@ class DeviceMixin(object): # {{{
return loc return loc
def set_books_in_library(self, booklists, reset=False): def set_books_in_library(self, booklists, reset=False):
if reset: # Force a reset if the caches are not initialized
# First build a cache of the library, so the search isn't On**2 if reset or not hasattr(self, 'db_book_title_cache'):
# It might be possible to get here without having initialized the
# library view. In this case, simply give up
if not hasattr(self, 'library_view') or self.library_view is None:
return
db = getattr(self.library_view.model(), 'db', None)
if db is None:
return
# Build a cache (map) of the library, so the search isn't On**2
self.db_book_title_cache = {} self.db_book_title_cache = {}
self.db_book_uuid_cache = {} self.db_book_uuid_cache = {}
db = self.library_view.model().db
for id in db.data.iterallids(): for id in db.data.iterallids():
mi = db.get_metadata(id, index_is_id=True) mi = db.get_metadata(id, index_is_id=True)
title = re.sub('(?u)\W|[_]', '', mi.title.lower()) title = re.sub('(?u)\W|[_]', '', mi.title.lower())

View File

@ -218,20 +218,25 @@ class LibraryViewMixin(object): # {{{
partial(self.show_similar_books, 'tag')) partial(self.show_similar_books, 'tag'))
self.action_books_by_this_publisher.triggered.connect( self.action_books_by_this_publisher.triggered.connect(
partial(self.show_similar_books, 'publisher')) partial(self.show_similar_books, 'publisher'))
self.library_view.set_context_menu(self.action_edit, self.action_sync, self.library_view.set_context_menu(self.action_edit, self.action_sync,
self.action_convert, self.action_view, self.action_convert, self.action_view,
self.action_save, self.action_save,
self.action_open_containing_folder, self.action_open_containing_folder,
self.action_show_book_details, self.action_show_book_details,
self.action_del, self.action_del,
add_to_library = None,
similar_menu=similar_menu) similar_menu=similar_menu)
add_to_library = (_('Add books to library'), self.add_books_from_device)
self.memory_view.set_context_menu(None, None, None, self.memory_view.set_context_menu(None, None, None,
self.action_view, self.action_save, None, None, self.action_del) self.action_view, self.action_save, None, None, self.action_del,
add_to_library=add_to_library)
self.card_a_view.set_context_menu(None, None, None, self.card_a_view.set_context_menu(None, None, None,
self.action_view, self.action_save, None, None, self.action_del) self.action_view, self.action_save, None, None, self.action_del,
add_to_library=add_to_library)
self.card_b_view.set_context_menu(None, None, None, self.card_b_view.set_context_menu(None, None, None,
self.action_view, self.action_save, None, None, self.action_del) self.action_view, self.action_save, None, None, self.action_del,
add_to_library=add_to_library)
self.library_view.files_dropped.connect(self.files_dropped, type=Qt.QueuedConnection) self.library_view.files_dropped.connect(self.files_dropped, type=Qt.QueuedConnection)
for func, args in [ for func, args in [

View File

@ -370,7 +370,8 @@ class BooksView(QTableView): # {{{
# Context Menu {{{ # Context Menu {{{
def set_context_menu(self, edit_metadata, send_to_device, convert, view, def set_context_menu(self, edit_metadata, send_to_device, convert, view,
save, open_folder, book_details, delete, similar_menu=None): save, open_folder, book_details, delete,
similar_menu=None, add_to_library=None):
self.setContextMenuPolicy(Qt.DefaultContextMenu) self.setContextMenuPolicy(Qt.DefaultContextMenu)
self.context_menu = QMenu(self) self.context_menu = QMenu(self)
if edit_metadata is not None: if edit_metadata is not None:
@ -389,6 +390,9 @@ class BooksView(QTableView): # {{{
self.context_menu.addAction(book_details) self.context_menu.addAction(book_details)
if similar_menu is not None: if similar_menu is not None:
self.context_menu.addMenu(similar_menu) self.context_menu.addMenu(similar_menu)
if add_to_library is not None:
func = partial(add_to_library[1], view=self)
self.context_menu.addAction(add_to_library[0], func)
def contextMenuEvent(self, event): def contextMenuEvent(self, event):
self.context_menu.popup(event.globalPos()) self.context_menu.popup(event.globalPos())

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