jpy-flette¶
jpy-flette is a lightweight (~150 lines), no-configuration, python static website generator which uses jupyter notebooks as input. It's fantastic for quickly presenting scientific projects, software documentation, or just to share your thoughts with the world.
Give it a folder of
.ipynb
files and paf! — website.
installation¶
Install jpy-flette with pip:
pip install jpy-flette
You could also download or clone the source code from the repository:
git clone "https://github.com/r4lv/jpy-flette"
cd "jpy-flette"
python setup.py install
usage¶
jpy-flette transforms a directory full of .ipynb
jupyter notebooks
into a website with multiple pages. Let's assume the following directory
structure:
~/my/directory
└── notebooks
├── 00.index.ipynb
└── 01.advanced-usage.ipynb
After calling
jpy-flette ~/my/directory/notebooks
you would obtain
~/my/directory
├── docs
│ ├── index.html
│ ├── advanced-usage.html
│ └── static
│ ├── style.css
│ └── script.js
└── notebooks
├── 00.index.ipynb
└── 01.advanced-usage.ipynb
~/my/directory/docs
is then ready to be published!
demo¶
This website is actually built by jpy-flette! Look:
import jpy_flette
jpy_flette.__version__
import numpy as np
import matplotlib.pyplot as plt
plt.figure(dpi=100)
x = np.linspace(-20, 20, 300)
plt.plot(x, np.sin(x)*x, color="#D74E40")
plt.plot(x, np.sin(x), color="#61862F");
The MathJax library is also included, so you can $\LaTeX$ right away and type some
\begin{align} a_w e^{s_{\text{ome}}} = \mathbf F \cdot \mathcal{O}(rm) \cup l_a \end{align}