mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
5ec9b392a7
commit
68c77002af
@ -15,7 +15,13 @@ def option_parser():
|
||||
parser = OptionParser(usage='''\
|
||||
%prog [options]
|
||||
|
||||
Run an embedded python interpreter.
|
||||
Various command line interfaces useful for debugging calibre. With no options,
|
||||
this command starts an embedded python interpreter. You can also run the main
|
||||
calibre GUI and the calibre viewer in debug mode.
|
||||
|
||||
It also contains interfaces to various bits of calibre that do not have
|
||||
dedicated command line tools, such as font subsetting, tweaking ebooks and so
|
||||
on.
|
||||
''')
|
||||
parser.add_option('-c', '--command', help='Run python code.', default=None)
|
||||
parser.add_option('-e', '--exec-file', default=None, help='Run the python code in file.')
|
||||
|
@ -31,6 +31,10 @@ class CustomHelpFormatter(IndentedHelpFormatter):
|
||||
|
||||
def format_usage(self, usage):
|
||||
from calibre.utils.terminal import colored
|
||||
parts = usage.split(' ')
|
||||
if parts:
|
||||
parts[0] = colored(parts[0], fg='yellow', bold=True)
|
||||
usage = ' '.join(parts)
|
||||
return colored(_('Usage'), fg='blue', bold=True) + ': ' + usage
|
||||
|
||||
def format_heading(self, heading):
|
||||
|
Loading…
x
Reference in New Issue
Block a user