mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
GUI polish action
This commit is contained in:
parent
c10ae4ae3f
commit
b6d50c3271
@ -537,6 +537,8 @@ Calibre has several keyboard shortcuts to save you time and mouse movement. Thes
|
|||||||
- Merge selected records, keeping originals
|
- Merge selected records, keeping originals
|
||||||
* - :kbd:`O`
|
* - :kbd:`O`
|
||||||
- Open containing folder
|
- Open containing folder
|
||||||
|
* - :kbd:`P`
|
||||||
|
- Polish books
|
||||||
* - :kbd:`S`
|
* - :kbd:`S`
|
||||||
- Save to Disk
|
- Save to Disk
|
||||||
* - :kbd:`V`
|
* - :kbd:`V`
|
||||||
|
@ -790,11 +790,11 @@ class ActionConvert(InterfaceActionBase):
|
|||||||
actual_plugin = 'calibre.gui2.actions.convert:ConvertAction'
|
actual_plugin = 'calibre.gui2.actions.convert:ConvertAction'
|
||||||
description = _('Convert books to various ebook formats')
|
description = _('Convert books to various ebook formats')
|
||||||
|
|
||||||
# class ActionPolish(InterfaceActionBase):
|
class ActionPolish(InterfaceActionBase):
|
||||||
# name = 'Polish Books'
|
name = 'Polish Books'
|
||||||
# actual_plugin = 'calibre.gui2.actions.polish:PolishAction'
|
actual_plugin = 'calibre.gui2.actions.polish:PolishAction'
|
||||||
# description = _('Fine tune your ebooks')
|
description = _('Fine tune your ebooks')
|
||||||
#
|
|
||||||
class ActionDelete(InterfaceActionBase):
|
class ActionDelete(InterfaceActionBase):
|
||||||
name = 'Remove Books'
|
name = 'Remove Books'
|
||||||
actual_plugin = 'calibre.gui2.actions.delete:DeleteAction'
|
actual_plugin = 'calibre.gui2.actions.delete:DeleteAction'
|
||||||
@ -930,7 +930,7 @@ class ActionPluginUpdater(InterfaceActionBase):
|
|||||||
|
|
||||||
plugins += [ActionAdd, ActionFetchAnnotations, ActionGenerateCatalog,
|
plugins += [ActionAdd, ActionFetchAnnotations, ActionGenerateCatalog,
|
||||||
ActionConvert, ActionDelete, ActionEditMetadata, ActionView,
|
ActionConvert, ActionDelete, ActionEditMetadata, ActionView,
|
||||||
ActionFetchNews, ActionSaveToDisk, ActionQuickview, #ActionPolish,
|
ActionFetchNews, ActionSaveToDisk, ActionQuickview, ActionPolish,
|
||||||
ActionShowBookDetails,ActionRestart, ActionOpenFolder, ActionConnectShare,
|
ActionShowBookDetails,ActionRestart, ActionOpenFolder, ActionConnectShare,
|
||||||
ActionSendToDevice, ActionHelp, ActionPreferences, ActionSimilarBooks,
|
ActionSendToDevice, ActionHelp, ActionPreferences, ActionSimilarBooks,
|
||||||
ActionAddToLibrary, ActionEditCollections, ActionChooseLibrary,
|
ActionAddToLibrary, ActionEditCollections, ActionChooseLibrary,
|
||||||
|
@ -95,6 +95,9 @@ def polish(file_map, opts, log, report):
|
|||||||
|
|
||||||
def gui_polish(data):
|
def gui_polish(data):
|
||||||
files = data.pop('files')
|
files = data.pop('files')
|
||||||
|
if not data.pop('metadata'):
|
||||||
|
data.pop('opf')
|
||||||
|
data.pop('cover')
|
||||||
file_map = {x:x for x in files}
|
file_map = {x:x for x in files}
|
||||||
opts = ALL_OPTS.copy()
|
opts = ALL_OPTS.copy()
|
||||||
opts.update(data)
|
opts.update(data)
|
||||||
|
@ -36,6 +36,13 @@ class Polish(QDialog):
|
|||||||
'polish': _('<h3>About Polishing books</h3>%s')%HELP['about'],
|
'polish': _('<h3>About Polishing books</h3>%s')%HELP['about'],
|
||||||
|
|
||||||
'subset':_('<h3>Subsetting fonts</h3>%s')%HELP['subset'],
|
'subset':_('<h3>Subsetting fonts</h3>%s')%HELP['subset'],
|
||||||
|
|
||||||
|
'metadata':_('<h3>Updating metadata</h3>'
|
||||||
|
'<p>This will update all metadata and covers in the'
|
||||||
|
' ebook files to match the current metadata in the'
|
||||||
|
' calibre library.</p><p>Note that most ebook'
|
||||||
|
' formats are not capable of supporting all the'
|
||||||
|
' metadata in calibre.</p>'),
|
||||||
}
|
}
|
||||||
|
|
||||||
self.l = l = QGridLayout()
|
self.l = l = QGridLayout()
|
||||||
@ -47,6 +54,7 @@ class Polish(QDialog):
|
|||||||
count = 0
|
count = 0
|
||||||
self.actions = OrderedDict([
|
self.actions = OrderedDict([
|
||||||
('subset', _('Subset all embedded fonts')),
|
('subset', _('Subset all embedded fonts')),
|
||||||
|
('metadata', _('Update metadata in book files')),
|
||||||
])
|
])
|
||||||
for name, text in self.actions.iteritems():
|
for name, text in self.actions.iteritems():
|
||||||
count += 1
|
count += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user