GwR catalog 1.0 revisions

This commit is contained in:
GRiker 2011-01-17 10:29:38 -07:00
parent 61d365c25b
commit e18e5a5db9
2 changed files with 13 additions and 3 deletions

View File

@ -56,6 +56,8 @@ class GenerateCatalogAction(InterfaceAction):
def catalog_generated(self, job):
if job.result:
# Problems during catalog generation
# jobs.results is a list - the first entry is the intended title for the dialog
# Subsequent strings are error messages
dialog_title = job.result.pop(0)
if re.match('warning:', job.result[0].lower()):
job.result.append("Catalog generation complete.")

View File

@ -1637,7 +1637,10 @@ then rebuild the catalog.\n''').format(author[0],author[1],current_author[1])
title['title_sort'][0:40])).decode('mac-roman'))
return True
else:
self.error.append( _("No books found to catalog.\nCheck 'Excluded books' criteria in E-book options."))
error_msg = _("No books found to catalog.\nCheck 'Excluded books' criteria in E-book options.\n")
self.opts.log.error('*** ' + error_msg + ' ***')
self.error.append(_('No books available to include in catalog'))
self.error.append(error_msg)
return False
def fetchBookmarks(self):
@ -3164,8 +3167,13 @@ then rebuild the catalog.\n''').format(author[0],author[1],current_author[1])
# Add the author tag
cmTag = Tag(ncx_soup, '%s' % 'calibre:meta')
cmTag['name'] = "author"
navStr = '%s | %s' % (self.formatNCXText(book['author'], dest='author'),
book['date'].split()[1])
if book['date']:
navStr = '%s | %s' % (self.formatNCXText(book['author'], dest='author'),
book['date'].split()[1])
else:
navStr = '%s' % (self.formatNCXText(book['author'], dest='author'))
if 'tags' in book and len(book['tags']):
navStr = self.formatNCXText(navStr + ' | ' + ' · '.join(sorted(book['tags'])), dest='author')
cmTag.insert(0, NavigableString(navStr))