1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Convert SageNB Notebooks
========================
This is a tool to convert SageNB notebooks to other formats, in
particular IPython/Jupyter notebooks.
Install
-------
pip install git+https://github.com/vbraun/ExportSageNB.git
or
sage -pip install git+https://github.com/vbraun/ExportSageNB.git
Usage
-----
First, you want to list the existing notebooks. Each notebook has a
unique id and a not necessarily unique name:
$ sagenb-export --list
Unique ID | Notebook Name
-------------------------------------------------------------------------------
admin:10 | Oxford Seminar (1,1)-Calabi Yau
You can specify notebooks by the ID or by name; If the name is not
unique, the first notebook found in the filesystem wins. To convert it
to a Jupyter/IPython notebook, use the `--ipynb` switch as in
$ sagenb-export --ipynb=Output.ipynb admin:10
You can then open the saved `Output.ipynb` via
$ sage --notebook=jupyter Output.ipynb
Notes
-----
* Various output formats are not supported, e.g. no pictures. The
simplest solution is to re-evaluate.
* SageNB html input cells are converted to Jupyter raw NBConvert
cells; In the interactive Jupyter notebook these are not rendered as
html but shown as their html source code. If you export to HTML
(File -> Download as -> HTML) they are rendered as html, though.
Testing and Python Compatibility
--------------------------------
* The git-trac command supports Python 2.7, and 3.4+.
* Most recent [Travis CI](https://travis-ci.org/vbraun/ExportSageNB) test:
[](https://travis-ci.org/vbraun/ExportSageNB)
|