From 855f0f4828b0a5fefdc516b2e6e8373922d37f1b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Oct 2016 10:32:43 +0530 Subject: [PATCH] Add documentation for the new download resources tool Also move the external links tools into their own sub-menu --- manual/edit.rst | 11 +++++++++++ src/calibre/gui2/tweak_book/ui.py | 12 +++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/manual/edit.rst b/manual/edit.rst index 7af5001710..45c11a03ab 100644 --- a/manual/edit.rst +++ b/manual/edit.rst @@ -713,6 +713,17 @@ websites. The tool will try to visit every externally linked website, and if the visit fails, it will report all broken links in a convenient format for you to fix. + +Downloading external resources +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can use this tool to automatically download any images/stylesheets/etc. in +the book that are not bundled with the book (i.e. they have URLs poiting to a +location on the internet). The tool will find all such resources and +automatically download them, add them tot he book and replace all references to +them to use the downloaded files. + + Arranging files into folders by type ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/calibre/gui2/tweak_book/ui.py b/src/calibre/gui2/tweak_book/ui.py index 5e48630376..7520e079ae 100644 --- a/src/calibre/gui2/tweak_book/ui.py +++ b/src/calibre/gui2/tweak_book/ui.py @@ -399,10 +399,11 @@ class Main(MainWindow): 'Check external links in the book')) self.action_compress_images = treg('compress-image.png', _('Compress &images losslessly'), self.boss.compress_images, 'compress-images', (), _( 'Compress images losslessly')) - self.action_transform_styles = treg('wizard.png', _('Transform &styles'), self.boss.transform_styles, 'get-external-resources', (), _( - 'Download external resources in the book (images/stylesheets/etc/ that are not included in the book)')) - self.action_get_ext_resources = treg('download-metadata.png', _('Get external &resources'), self.boss.get_external_resources, 'transform-styles', (), _( + self.action_transform_styles = treg('wizard.png', _('Transform &styles'), self.boss.transform_styles, 'transform-styles', (), _( 'Transform styles used in the book')) + self.action_get_ext_resources = treg('download-metadata.png', _('Download external &resources'), + self.boss.get_external_resources, 'get-external-resources', (), _( + 'Download external resources in the book (images/stylesheets/etc/ that are not included in the book)')) def ereg(icon, text, target, sid, keys, description): return reg(icon, text, partial(self.boss.editor_action, target), sid, keys, description) @@ -565,8 +566,9 @@ class Main(MainWindow): e.addAction(self.action_set_semantics) e.addAction(self.action_filter_css) e.addAction(self.action_spell_check_book) - e.addAction(self.action_check_external_links) - e.addAction(self.action_get_ext_resources) + er = e.addMenu(_('External Links')) + er.addAction(self.action_check_external_links) + er.addAction(self.action_get_ext_resources) e.addAction(self.action_check_book) e.addAction(self.action_reports)