Skip to main content

Convert markdown to IPython notebook.

Project description

[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)

Project details


Release history Release notifications

History Node

1.5.1

History Node

1.5.0

History Node

1.4.6

History Node

1.4.5

History Node

1.4.4

History Node

1.4.3

History Node

1.4.2

History Node

1.4.1

History Node

1.4.0

History Node

1.3.1

History Node

1.3.0

History Node

1.2.10

History Node

1.2.9

History Node

1.2.8

History Node

1.2.7

History Node

1.2.6

History Node

1.2.5

History Node

1.2.4-dev

History Node

1.2.3-dev

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.1.0

This version
History Node

1.0.3

History Node

1.0.2

History Node

1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
notedown-1.0.3.tar.gz (5.3 kB) Copy SHA256 hash SHA256 Source None Feb 23, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page