Convert a Jupyter notebook to blog ready format
Project description
Notebook to Blog
Overview
Notebook to Blog is a Python CLI that makes it easy to go from a Jupyter Notebook to the following outputs:
- A .txt file containing blog text and placeholders
- Images of plots (saved locally)
- Github Gists
While not completely automated, this will make it much easier to create a blog post (e.g., Medium).
Instructions
- Install via
pip install notebook-to-blog
. - Store your Github username/password somewhere in your filesystem:
GITHUB_USER=<username>
GITHUB_PASSWORD=<password>
- Run via
notebook_to_blog <path to Jupyter notebook> <path to output directory> <path to Github credentials>
For example, running notebook_to_blog my_notebook.ipynb output .env
will create the following files:
output/
my_notebok.txt
images/
image_00.png
In addition, Github Gists will be created for each code block encountered.
my_notebook.txt looks like the following:
Whatever you wrote in Markdown will appear as regular text. Code blocks will cause Github Gists to be created, and a link to be inserted:
https://gist.github.com/cgrinaldi/1a11acbdc9006849323163e354955a31
Images will also be represented as placeholder text:
<INSERT img_04.png>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file notebook-to-blog-0.0.1.tar.gz
.
File metadata
- Download URL: notebook-to-blog-0.0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9367ba76eb1392c83a5165c95c4ae2c1d57a5cd149e448012f18f880368503b |
|
MD5 | 938472ad75d23765eb47d8f66f186b07 |
|
BLAKE2b-256 | bd14fb67d097896cec8544b9c3545a3eb90f4f3338f7e3cb38c7e546b0cf064b |
File details
Details for the file notebook_to_blog-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: notebook_to_blog-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b0dd814ec42a9c498d3dc1bb25b9b1f1259114337872c85b2b8719077fe21aa |
|
MD5 | 5a9a2328ab4552cbd5ae0317d97ab6c1 |
|
BLAKE2b-256 | ee84e7e494e363f66f6866ff79f4409254150e0c55b8f177911740c47d7250a8 |