@@ -78,18 +78,44 @@ The currently supported export formats are:
7878 Basic reStructuredText output. Useful as a starting point for embedding notebooks
7979 in Sphinx docs.
8080
81- * ``--to python ``
81+ * ``--to script ``
8282
83- Convert a notebook to an executable Python script.
84- This is the simplest way to get a Python script out of a notebook.
85- If there were any magics in the notebook, this may only be executable from
83+ Convert a notebook to an executable script.
84+ This is the simplest way to get a Python (or other language, depending on the kernel) script out of a notebook.
85+ If there were any magics in an IPython notebook, this may only be executable from
8686 an IPython session.
87+
88+ * ``--to notebook ``
89+
90+ .. versionadded :: 3.0
91+
92+ This doesn't convert a notebook to a different format *per se *,
93+ instead it allows the running of nbconvert preprocessors on a notebook,
94+ and/or conversion to other notebook formats. For example::
95+
96+ ipython nbconvert --to notebook --execute mynotebook.ipynb
97+
98+ will open the notebook, execute it, capture new output, and save the result in
99+ :file: `mynotebook.nbconvert.ipynb `.
100+
101+ ::
102+
103+ ipython nbconvert --to notebook --nbformat 3 mynotebook
104+
105+ will create a copy of :file: `mynotebook.ipynb ` in :file: `mynotebook.v3.ipynb `
106+ in version 3 of the :ref: `notebook format <nbformat >`.
107+
108+ If you want to convert a notebook in-place,
109+ you can specify the ouptut file to be the same as the input file::
110+
111+ ipython nbconvert --to notebook mynb --output mynb
112+
113+ Be careful with that, since it will replace the input file.
87114
88115.. note ::
89116
90117 nbconvert uses pandoc _ to convert between various markup languages,
91- so pandoc is a dependency of most nbconvert transforms,
92- excluding Markdown and Python.
118+ so pandoc is a dependency when converting to latex or reStructuredText.
93119
94120.. _pandoc : http://johnmacfarlane.net/pandoc/
95121
0 commit comments