Skip to main content

Markdown to Jupyter Notebook converter.

Project description

md2ipynb

Markdown to Jupyter Notebook converter.

Minimal example

Here is a minimal example on how to convert a Markdown file. By default, the output is printed into stdout.

md2ipynb examples/pages/example.md

You can also specify an output path with the -o or --output option.

md2ipynb examples/pages/example.md -o examples/notebooks/example.ipynb

Here is the generated notebook on GitHub and Colab.

Run in Colab View on GitHub

Example

Here is a more complete example on specifying an output path, import sections, variables, as well as more metadata for a Colab visualization.

md2ipynb examples/pages/example.md \
    -o examples/notebooks/example.ipynb \
    --imports examples/templates/license.md:0 \
              examples/templates/setup-py.md:1 \
              examples/templates/cleanup.md:-2 \
    --var package=md2ipynb \
          end_message="You're all done 🎉🎉" \
    --notebook-title 'Hello md2ipynb!' \
    --docs-url https://github.com/davidcavazos/md2ipynb \
    --docs-logo-url https://www.tensorflow.org/images/GitHub-Mark-32px.png \
    --github-ipynb-url https://github.com/davidcavazos/md2ipynb/blob/master/examples/notebooks/example.ipynb

Note: For more information on the available options, run md2ipynb --help.

Here is the generated notebook on GitHub and Colab. Note that since we specified the --github-ipynb-url, there is now an "Open in Colab" button in the GitHub ipynb file.

Run in Colab View on GitHub

Contributing

Contributions are welcome! For instructions on how to contribute, please check the Contribution guide.

Project details


Download files

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

Source Distribution

md2ipynb-0.1.0.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

md2ipynb-0.1.0-py3-none-any.whl (38.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page