no big deal
, it just works.¶Documentation ∀ files; based on the nbformat
.
pip install git+
https://github.com/tonyfast/nbd/
nbconvert
doesn't accept all file formats. nbd
adds the concept of loaders
that transform arbitrary files to the nbformat.More configuration options are available at nbconvert.readthedocs.io/en/latest/config_options.html
%%file demo.py
from nbd import *
# use nbd's super basic index
from nbd import index
# Store data in a notebook object
data = notebook(cells=[
markdown('''# My Demo Page \n\nCheck out the complete [`nbd` documentation](../index.html).''')])
def report(): yield 'index', data
c.Docs.notebooks = ['nbd.ipynb', 'readme.md', 'nbd.py']
c.FilesWriter.build_directory = 'docs/demo'
c.Docs.post, c.Docs.report = __import__('nbd').index(data), report
Overwriting demo.py
nbd
¶!jupyter nbd --config demo.py
[Docs] Converting notebook nbd.ipynb to html
[Docs] Writing 280231 bytes to docs/demo/nbd.ipynb.html
[Docs] Converting notebook readme.md to html
[Docs] Writing 257617 bytes to docs/demo/readme.md.html
[Docs] Converting notebook nbd.py to html
[Docs] Writing 275472 bytes to docs/demo/nbd.py.html
[Docs] Converting notebook into html
[Docs] Writing 250170 bytes to docs/demo/index.html
Configure the documentation for this project through the readme file.
!jupyter nbconvert --to python config.ipynb nbd.ipynb --output-dir .
!flake8 nbd.py --output-file=flake8.txt
!pyreverse -o png -p nbd nbd.py
!jupyter nbconvert --to markdown readme.ipynb
!jupyter nbd --config config.py
!mv classes_nbd.png config.py flake8.txt docs
# !wget https://bootswatch.com/readable/bootstrap.min.css --no-check-certificate
# !mv bootstrap.min.css docs/custom.css
[NbConvertApp] Converting notebook config.ipynb to python
[NbConvertApp] Writing 1182 bytes to ./config.py
[NbConvertApp] Converting notebook nbd.ipynb to python
[NbConvertApp] Writing 5966 bytes to ./nbd.py
parsing nbd.py...
[NbConvertApp] Converting notebook readme.ipynb to markdown
[NbConvertApp] Writing 2721 bytes to readme.md
[Docs] Converting notebook nbd.ipynb to html
[Docs] Writing 280231 bytes to docs/nbd.ipynb.html
[Docs] Converting notebook config.ipynb to html
[Docs] Writing 256375 bytes to docs/config.ipynb.html
[Docs] Converting notebook config.py to html
[Docs] Writing 254329 bytes to docs/config.py.html
[Docs] Converting notebook template.ipynb to html
[Docs] Writing 250263 bytes to docs/template.ipynb.html
[Docs] Converting notebook readme.md to html
[Docs] Writing 257146 bytes to docs/readme.md.html
[Docs] Converting notebook flake8.txt to html
[Docs] Writing 271255 bytes to docs/flake8.txt.html
[Docs] Converting notebook into html
[Docs] Writing 252550 bytes to docs/index.html
[Docs] Converting notebook into html
[Docs] Writing 249380 bytes to docs/uml.html