Skip to content

Commit 289ef5f

Browse files
committed
Rename Tweak Book to Edit Book
1 parent 2b65293 commit 289ef5f

13 files changed

Lines changed: 40 additions & 40 deletions

File tree

manual/conversion.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ you just want greater control over the conversion system, |app| has a lot of
1414
options to fine tune the conversion process. Note however that |app|'s
1515
conversion system is not a substitute for a full blown ebook editor. To edit
1616
ebooks, I recommend first converting them to EPUB or AZW3 using |app| and
17-
then using the Tweak Book feature to get them into perfect shape. You can then
17+
then using the Edit Book feature to get them into perfect shape. You can then
1818
use the edited ebook as input for conversion into other formats in |app|.
1919

2020
This document will refer mainly to the conversion settings as found in the
@@ -325,7 +325,7 @@ remove all non-breaking-space entities, or may include false positive matches re
325325
tags, i.e. horizontal rules, and <img> tags are exceptions. Horizontal rules can optionally be specified with styles, if you
326326
choose to add your own style be sure to include the 'width' setting, otherwise the style information will be discarded. Image
327327
tags can used, but |app| does not provide the ability to add the image during conversion, this must be done after the fact using
328-
the 'Tweak Book' feature, or Sigil.
328+
the 'Edit Book' feature.
329329

330330
Example image tag (place the image within an 'Images' folder inside the epub after conversion):
331331
<img style="width:10%" src="../Images/scenebreak.png" />

setup/installer/windows/freeze.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
DESCRIPTIONS = {
3131
'calibre' : 'The main calibre program',
3232
'ebook-viewer' : 'Viewer for all e-book formats',
33-
'ebook-tweak' : 'Edit e-books',
33+
'ebook-edit' : 'Edit e-books',
3434
'lrfviewer' : 'Viewer for LRF files',
3535
'ebook-convert': 'Command line interface to the conversion/news download system',
3636
'ebook-meta' : 'Command line interface for manipulating e-book metadata',
@@ -335,7 +335,7 @@ def compress(self):
335335
def embed_resources(self, module, desc=None, extra_data=None,
336336
product_description=None):
337337
icon_base = self.j(self.src_root, 'icons')
338-
icon_map = {'calibre':'library', 'ebook-viewer':'viewer', 'ebook-tweak':'ebook-tweak',
338+
icon_map = {'calibre':'library', 'ebook-viewer':'viewer', 'ebook-edit':'ebook-edit',
339339
'lrfviewer':'viewer', 'calibre-portable':'library'}
340340
file_type = 'DLL' if module.endswith('.dll') else 'APP'
341341
template = open(self.rc_template, 'rb').read()

setup/installer/windows/wix-template.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272
Description="Viewer for all the major e-book formats"
7373
Target="[#{exe_map[ebook-viewer]}]"
7474
WorkingDirectory="APPLICATIONROOTDIRECTORY" />
75-
<Shortcut Id="s4" Name="E-book Tweak{x64}"
75+
<Shortcut Id="s4" Name="Edit E-book{x64}"
7676
Description="Edit e-books"
77-
Target="[#{exe_map[ebook-tweak]}]"
77+
Target="[#{exe_map[ebook-edit]}]"
7878
WorkingDirectory="APPLICATIONROOTDIRECTORY" />
7979
<Shortcut Id="s3" Name="LRF viewer{x64}"
8080
Description="Viewer for LRF format e-books"

src/calibre/customize/builtins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ class ActionCopyToLibrary(InterfaceActionBase):
905905
class ActionTweakEpub(InterfaceActionBase):
906906
name = 'Tweak ePub'
907907
actual_plugin = 'calibre.gui2.actions.tweak_epub:TweakEpubAction'
908-
description = _('Make small tweaks to epub or htmlz files in your calibre library')
908+
description = _('Edit ebooks in the epub or azw3 formats')
909909

910910
class ActionUnpackBook(InterfaceActionBase):
911911
name = 'Unpack Book'

src/calibre/db/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def format_abspath(self, book_id, fmt):
671671
'''
672672
Return absolute path to the ebook file of format `format`
673673
674-
Currently used only in calibredb list, the viewer, tweak book and the
674+
Currently used only in calibredb list, the viewer, edit book and the
675675
catalogs (via get_data_as_dict()).
676676
677677
Apart from the viewer, I don't believe any of the others do any file

src/calibre/debug.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def option_parser():
2020
calibre GUI and the calibre viewer in debug mode.
2121
2222
It also contains interfaces to various bits of calibre that do not have
23-
dedicated command line tools, such as font subsetting, tweaking ebooks and so
23+
dedicated command line tools, such as font subsetting, editing ebooks and so
2424
on.
2525
2626
You can also use %prog to run standalone scripts. To do that use it like this:
@@ -60,8 +60,8 @@ def option_parser():
6060
parser.add_option('-m', '--inspect-mobi', action='store_true',
6161
default=False,
6262
help='Inspect the MOBI file(s) at the specified path(s)')
63-
parser.add_option('-t', '--tweak-book', action='store_true',
64-
help='Launch the calibre Tweak Book tool in debug mode.')
63+
parser.add_option('-t', '--edit-book', action='store_true',
64+
help='Launch the calibre Edit Book tool in debug mode.')
6565
parser.add_option('-x', '--explode-book', default=None,
6666
help='Explode the book (exports the book as a collection of HTML '
6767
'files and metadata, which you can edit using standard HTML '
@@ -250,9 +250,9 @@ def main(args=sys.argv):
250250
elif opts.inspect_mobi:
251251
for path in args[1:]:
252252
inspect_mobi(path)
253-
elif opts.tweak_book:
253+
elif opts.edit_book:
254254
from calibre.gui2.tweak_book.main import main
255-
main(['ebook-tweak'] + args[1:])
255+
main(['ebook-edit'] + args[1:])
256256
elif opts.explode_book:
257257
from calibre.ebooks.tweak import tweak
258258
tweak(opts.explode_book)

src/calibre/gui2/actions/tweak_epub.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def __init__(self, fmts, parent=None):
1919
QDialog.__init__(self, parent)
2020
self.l = l = QVBoxLayout(self)
2121
self.setLayout(l)
22-
self.setWindowTitle(_('Choose format to tweak'))
22+
self.setWindowTitle(_('Choose format to edit'))
2323

2424
self.la = la = QLabel(_(
25-
'This book has multiple formats that can be tweaked. Choose the format you want to tweak.'))
25+
'This book has multiple formats that can be edited. Choose the format you want to edit.'))
2626
l.addWidget(la)
2727

2828
self.rem = QCheckBox(_('Always ask when more than one format is available'))
@@ -54,7 +54,7 @@ def accept(self):
5454
class TweakEpubAction(InterfaceAction):
5555

5656
name = 'Tweak ePub'
57-
action_spec = (_('Tweak Book'), 'tweak.png', _('Edit eBooks'), _('T'))
57+
action_spec = (_('Edit Book'), 'tweak.png', _('Edit eBooks'), _('T'))
5858
dont_add_to = frozenset(['context-menu-device'])
5959
action_type = 'current'
6060

@@ -90,7 +90,7 @@ def genesis(self):
9090
def tweak_book(self):
9191
row = self.gui.library_view.currentIndex()
9292
if not row.isValid():
93-
return error_dialog(self.gui, _('Cannot Tweak Book'),
93+
return error_dialog(self.gui, _('Cannot Edit Book'),
9494
_('No book selected'), show=True)
9595

9696
book_id = self.gui.library_view.model().id(row)
@@ -103,8 +103,8 @@ def do_tweak(self, book_id):
103103
fmts = [x.upper().strip() for x in fmts.split(',')]
104104
tweakable_fmts = set(fmts).intersection(SUPPORTED)
105105
if not tweakable_fmts:
106-
return error_dialog(self.gui, _('Cannot Tweak Book'),
107-
_('The book must be in the %s formats to tweak.'
106+
return error_dialog(self.gui, _('Cannot Edit Book'),
107+
_('The book must be in the %s formats to edit.'
108108
'\n\nFirst convert the book to one of these formats.') % (_(' or '.join(SUPPORTED))),
109109
show=True)
110110
from calibre.gui2.tweak_book import tprefs
@@ -126,7 +126,7 @@ def do_tweak(self, book_id):
126126
return error_dialog(self.gui, _('File missing'), _(
127127
'The %s format is missing from the calibre library. You should run'
128128
' library maintenance.') % fmt, show=True)
129-
tweak = 'ebook-tweak'
129+
tweak = 'ebook-edit'
130130
self.gui.setCursor(Qt.BusyCursor)
131131
if tprefs['update_metadata_from_calibre']:
132132
from calibre.ebooks.metadata.opf2 import pretty_print

src/calibre/gui2/tweak_book/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
from calibre.utils.config import OptionParser
1717

1818
def option_parser():
19-
parser = OptionParser('''\
19+
parser = OptionParser(_('''\
2020
%prog [opts] [path_to_ebook]
2121
22-
Launch the calibre tweak book tool.
23-
''')
22+
Launch the calibre edit book tool.
23+
'''))
2424
setup_gui_option_parser(parser)
2525
parser.add_option('--edit-file', help=_(
2626
'Edit the named file inside the book'))
@@ -42,7 +42,7 @@ def main(args=sys.argv):
4242
opts, args = parser.parse_args(args)
4343
if getattr(opts, 'detach', False):
4444
detach_gui()
45-
override = 'calibre-tweak-book' if islinux else None
45+
override = 'calibre-edit-book' if islinux else None
4646
app = Application(args, override_program_name=override)
4747
app.load_builtin_fonts()
4848
app.setWindowIcon(QIcon(I('tweak.png')))

src/calibre/gui2/tweak_book/preferences.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ def __init__(self, parent=None):
186186
l.addRow(um)
187187

188188
ask = self('choose_tweak_fmt')
189-
ask.setText(_('Ask which format to tweak if more than one format is available for the book'))
189+
ask.setText(_('Ask which format to edit if more than one format is available for the book'))
190190
l.addRow(ask)
191191

192192
order = self.order_widget('tweak_fmt_order')
193-
order.setToolTip(_('When auto-selecting the format to tweak for a book with'
193+
order.setToolTip(_('When auto-selecting the format to edit for a book with'
194194
' multiple formats, this is the preference order.'))
195195
l.addRow(_('Preferred format order (drag and drop to change)'), order)
196196

@@ -201,7 +201,7 @@ def __init__(self, gui, initial_panel=None):
201201
QDialog.__init__(self, gui)
202202
self.l = l = QGridLayout(self)
203203
self.setLayout(l)
204-
self.setWindowTitle(_('Preferences for Tweak Book'))
204+
self.setWindowTitle(_('Preferences for Edit Book'))
205205
self.setWindowIcon(QIcon(I('config.png')))
206206

207207
self.stacks = QStackedWidget(self)

0 commit comments

Comments
 (0)