mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
GwR catalog 1.0 revisions
This commit is contained in:
parent
61d365c25b
commit
e18e5a5db9
@ -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.")
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user