This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myst-blogpost % jupyter nbconvert --to markdown output.ipynb | |
[NbConvertApp] Converting notebook output.ipynb to markdown | |
[NbConvertApp] Writing 99 bytes to output.md | |
myst-blogpost % ls | |
input.ipynb input.myst output.ipynb output.md | |
myst-blogpost % cat output.md | |
# My markdown document | |
```python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myst-blogpost % python | |
Python 3.9.6 (default, Jul 29 2021, 11:06:22) | |
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import nbformat | |
>>> import nbclient | |
>>> with open('input.ipynb') as ipynb_file: | |
... nb = nbformat.read(ipynb_file, nbformat.NO_CONVERT) | |
... nb_ex = nbclient.execute(nb) | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myst-blogpost % ls | |
input.myst | |
myst-blogpost % cat input.myst | |
# My markdown document | |
```{code-cell} | |
print("Hello world! " * 2) | |
``` | |
myst-blogpost % jupytext input.myst --to ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My markdown document | |
```{code-cell} | |
print("Hello world! " * 2) | |
``` |