Skip to main content

[notedown] is a simple tool to create [IPython notebooks][ipython] from markdown.

[ipython]: http://www.ipython.org/notebook [notedown]: http://github.com/aaren/notedown

Usage:

notedown input.md > output.ipynb

Installation:

pip install notedown

It is really simple and separates your markdown into code and not code. Code goes into code cells, not-code goes into markdown cells.

Fenced code blocks annotated with a language other than python are read into cells using IPython’s %% [cell magic][].

[cell magic]: http://nbviewer.ipython.org/github/ipython/ipython/blob/1.x/examples/notebooks/Cell%20Magics.ipynb

### Why?

I don’t know. Maybe you prefer writing in markdown.

### What notedown does not do:

  • run code cells

  • embed figures

### Conversion from notebook to markdown

Converting from an IPython notebook to markdown is done using nbconvert:

ipython nbconvert notebook.ipynb –to markdown

The IPython markdown export is currently quite basic, so you can’t expect to convert markdown -> notebook -> markdown and get back your original markdown.

### Running an IPython Notebook

You can open the notebook in your browser with

ipython notebook your_notebook.ipynb

and use Cell -> Run all in the menu.

You can run notebooks non-interactively from the command line using [runipy][]:

pip install runipy runipy your_notebook.ipynb

### TODO

  • [x] support more markdowns

  • [ ] allow other cell types?

  • [x] allow different language code cells (using %%lang magic)

  • [ ] allow code attributes? pass to cell creator?

  • [x] code block format agnostic (fenced / indented)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notedown-1.0.3.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file notedown-1.0.3.tar.gz.

File metadata

  • Download URL: notedown-1.0.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for notedown-1.0.3.tar.gz
Algorithm Hash digest
SHA256 66bd115b8860da3a5e334482eff0fbac55cf606f6396c41c2f9d1ba01014eb59
MD5 aec2178ea0065e5ce608b373c1c2f223
BLAKE2b-256 fb4b4edf1fb3d558085257558748d59012ab12ed5eae44534f992806e01dfdf7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page