Attributes
Includes Deno configuration
Repository
Current version released
4 years ago
Versions
nb2md
Convert Jupyter notebooks to markdown
Installation
deno install --allow-read --allow-write https://deno.land/x/init@v0.1.0/mod.tsFeatures
- Convert markdown cells into prose
- Based on notebook language convert code cells into fenced code blocks
- Convert
STDOUTandSTDERRinto verbatim text - Handle execute output
image/pngbase64 encoded PNGs are decoded and save to image dirtext/htmlHTML produced bypandas.DataFrameis converted into markdown tablestext/plainis directly appended to output documentapplication/jsonis embedded into output document as JSON fenced code blocks
Usage
Convert a Jupyter notebook v4 into markdown
$ nb2md notebook.ipynb -o notebook.mdSkip output of code cells, default false
$ nb2md notebook.ipynb -o notebook.md --skip-outputCustomize image directory, default images
$ nb2md notebook.ipynb -o notebook.md --image-dir imgOptions
--helpor-hwill print the CLI documentation to the terminal.--versionor-vwill print the version number to the terminal--outputor-opath to output file, required--skip-outputskip code cell output, defaultfasle--image-dirpath to the image directory, default'images'
Contributing
You are welcome to report any bugs, other issues, or feature requests! If you want to add a fix/feature/other improvement fork this repository and make a pull request with your changes.