hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
310 stars 60 forks source link

How to write IPython/Jupyter notebooks from programs or simple ascii input #24

Open hplgit opened 9 years ago

hplgit commented 9 years ago

Notebooks are meant to be written interactively in the browser, but many would prefer to use an editor like Emacs and write the notebook in plain Markdown and computer code. Others may have lots of LaTeX files that they want to translate to notebooks, and then translating to an ascii format first is attractive. If the ascii format is extended with programming constructs like variables and functions, it also becomes more functional than writing notebooks in the web browser. Here is a description of such an ascii format and how the little compiler can be written:

http://hplgit.github.io/doconce/doc/pub/ipynb/ipynb_generator.html

Note that DocOnce offers the same possibility to write notebooks in ascii format, and with much more functionality, such as copying selected parts of files, capturing output from programs in the text, proper equation referencing in Markdown math, much more testing for potential Mako problems, handling of literature references, references to other sections, etc. The note above is for those who want to create their own independent format and/or learn how to use IPython.nbformat functionality for writing notebooks from programs.

unpingco commented 8 years ago

Hi,

Seems like the code that is referenced on this site has been moved. I'm trying to work through the example on this page but I cannot find ipynb_generator.py. If this functionality still supported?

Thanks!

hplgit commented 8 years ago

Hi -  doconce clean was run in this directory and cleaned away ipynb_generator.py (this undesired side effect is fixed now). The file is restored, and the functionality has not been changed since the issue was originally written.