New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --script flag as shorthand for notebook save_script option. #1168
Conversation
@@ -40,10 +47,12 @@ class NotebookManager(LoggingConfigurable): | |||
""") | |||
|
|||
save_script = Bool(False, config=True, | |||
help="""Also save notebooks as a Python script. | |||
help="""Automaticall create a Python script when saving the notebook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatically - it's missing the y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed!
# the flags that are specific to the frontend | ||
# these must be scrubbed before being passed to the kernel, | ||
# or it will raise an error on unrecognized flags | ||
notebook_flags = ['no-browser', 'no-mathjax', 'read-only'] | ||
notebook_flags = ['no-browser', 'no-mathjax', 'read-only', 'script'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to include 'no-script' in notebook_flags, so it won't be relayed to kernel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it now.
Typically we have defined flags in the same file as the application that uses them, but I don't actually see anything wrong with doing it this way. |
OK, I'll move it over for consistency's sake. Not having done it before, I did what seemed most obvious immediately, but I think it's better to keep a consistent pattern. |
Pushed, let me know how it looks and we'll merge when ready. Thanks for the review! |
thanks, looks good. Go ahead and merge. |
Great, thanks. Merging now. |
Add --script/--no-script flags as shorthands for the NotebookManager.save_script option.
Add --script/--no-script flags as shorthands for the NotebookManager.save_script option.
Also expand the section of the docs dealing with notebook imports.