mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Completion for calibre-debug
This commit is contained in:
parent
f1e36db970
commit
52be164385
@ -27,7 +27,7 @@ on.
|
|||||||
parser.add_option('-e', '--exec-file', help='Run the python code in file.')
|
parser.add_option('-e', '--exec-file', help='Run the python code in file.')
|
||||||
parser.add_option('-f', '--subset-font', help='Subset the specified font')
|
parser.add_option('-f', '--subset-font', help='Subset the specified font')
|
||||||
parser.add_option('-d', '--debug-device-driver', default=False, action='store_true',
|
parser.add_option('-d', '--debug-device-driver', default=False, action='store_true',
|
||||||
help='Debug the specified device driver.')
|
help='Debug device detection')
|
||||||
parser.add_option('-g', '--gui', default=False, action='store_true',
|
parser.add_option('-g', '--gui', default=False, action='store_true',
|
||||||
help='Run the GUI with debugging enabled. Debug output is '
|
help='Run the GUI with debugging enabled. Debug output is '
|
||||||
'printed to stdout and stderr.')
|
'printed to stdout and stderr.')
|
||||||
|
@ -495,7 +495,9 @@ class PostInstall:
|
|||||||
from calibre.utils.smtp import option_parser as smtp_op
|
from calibre.utils.smtp import option_parser as smtp_op
|
||||||
from calibre.library.server.main import option_parser as serv_op
|
from calibre.library.server.main import option_parser as serv_op
|
||||||
from calibre.ebooks.oeb.polish.main import option_parser as polish_op, SUPPORTED
|
from calibre.ebooks.oeb.polish.main import option_parser as polish_op, SUPPORTED
|
||||||
|
from calibre.debug import option_parser as debug_op
|
||||||
from calibre.ebooks import BOOK_EXTENSIONS
|
from calibre.ebooks import BOOK_EXTENSIONS
|
||||||
|
from calibre.customize.ui import available_input_formats
|
||||||
input_formats = sorted(all_input_formats())
|
input_formats = sorted(all_input_formats())
|
||||||
zsh = ZshCompleter(self.opts)
|
zsh = ZshCompleter(self.opts)
|
||||||
bc = os.path.join(os.path.dirname(self.opts.staging_sharedir),
|
bc = os.path.join(os.path.dirname(self.opts.staging_sharedir),
|
||||||
@ -540,6 +542,14 @@ class PostInstall:
|
|||||||
o_and_w('fetch-ebook-metadata', fem_op, [])
|
o_and_w('fetch-ebook-metadata', fem_op, [])
|
||||||
o_and_w('calibre-smtp', smtp_op, [])
|
o_and_w('calibre-smtp', smtp_op, [])
|
||||||
o_and_w('calibre-server', serv_op, [])
|
o_and_w('calibre-server', serv_op, [])
|
||||||
|
o_and_e('calibre-debug', debug_op, ['py', 'recipe'], file_map={
|
||||||
|
'--tweak-book':['epub', 'azw3', 'mobi'],
|
||||||
|
'--subset-font':['ttf', 'otf'],
|
||||||
|
'--exec-file':['py', 'recipe'],
|
||||||
|
'--add-simple-plugin':['py'],
|
||||||
|
'--inspect-mobi':['mobi', 'azw', 'azw3'],
|
||||||
|
'--viewer':list(available_input_formats()),
|
||||||
|
})
|
||||||
f.write(textwrap.dedent('''
|
f.write(textwrap.dedent('''
|
||||||
_ebook_device_ls()
|
_ebook_device_ls()
|
||||||
{
|
{
|
||||||
@ -910,7 +920,5 @@ def main():
|
|||||||
PostInstall(opts)
|
PostInstall(opts)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
sys.exit(main())
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user