Converting old Sage .sws worksheets to .ipynb (jupyter) format
Archived page
This page is kept for reference and its original URL still works, but it is not part of the current site and is no longer maintained. Dates and links reflect when it was written.
This post describes how I converted my old .sws Sage worksheets to the new .ipynb (jupyter) format.
- Install the required software.
sage -i beautifulsoup
sage -pip install git+https://github.com/vbraun/ExportSageNB.git
sudo apt install python3-sagenb-export
sage -i rst2ipynb
(I had first tried pip install git+https://github.com/vbraun/ExportSageNB.git in place of the second command above, but it didn't work.)
- Export the
experiments.swsfile in two steps (sws -> rst -> ipynb)
Alternatively, I think this would have worked:
sage -sws2rst experiments.sws experiments.rst
sagenb-export --list
sagenb-export --ipynb=experiments.ipynb admin:0
(where admin:0 is the unique handle to experiments.rst that showed up in the list).
- Load the experiments notebook in the new format.
Launch Sage while loading the experiments notebook as follows:
Another example¶
-
Install the required software (as above).
-
Export the
MAA-DeMeo-DeMo.swsfile in two steps (sws -> rst -> ipynb)
sage -sws2rst MAA-DeMeo-DeMo.sws MAA-DeMeo-DeMo.rst
sage -rst2ipynb MAA-DeMeo-DeMo.rst MAA-DeMeo-DeMo.ipynb
- Load the MAA-DeMeo-DeMo notebook in the new format
Launch Sage while loading the MAA-DeMeo-DeMo notebook as follows: