Yes, itβs possible and easy, it will (basically) be in the IPython kernel for 2.0, I would suggest looking at these examples for now.
[edit]
Now it is in Jupyter NbConvert. NbConvert comes with the Preprocessor group, which are disabled by default, two of which ( ClearOutputPreprocessor and ExecutePreprocessor ) are of interest. You can include them in your (local | global) configuration file via c.<PreprocessorName>.enabled=True (uppercase, which is python), or on the command line with --ExecutePreprocessor.enabled=True save the rest of the command as usual .
--ExecutePreprocessor.enabled=True has a convenient alias --execute , which can be used in the latest version of NbConvert. It can be combined with --inplace if desired
For example, convert to html after starting the laptop without a head:
$ jupyter nbconvert --to=html --execute RunMe.ipynb
convert to pdf after deleting files
$ ipython nbconvert --to=pdf --ClearOutputPreprocessor.enabled=True RunMe.ipynb
This (of course) works with non-python kernels by creating a <insert-your-language-here> kernel if you set --profile=<your fav profile> . The conversion can be very lengthy, as he needs to restart the laptop. Converting laptops to laptops can be done using the --to=notebook option.
There are various other parameters (timeout, resolve errors, ...) that may need to be set / disabled depending on the use case. See the Documentation, and of course jupyter nbconert --help and --help-all for more details.
Matt Jul 28 '13 at 23:04 on 2013-07-28 23:04
source share