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.sws
file in two steps (sws -> rst -> ipynb)sage -sws2rst experiments.sws experiments.rst sage -rst2ipynb experiments.rst experiments.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:
sage --notebook=jupyter experiments.ipynb
Another example
-
Install the required software (as above).
-
Export the
MAA-DeMeo-DeMo.sws
file 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:
sage -n jupyter MAA-DeMeo-DeMo.ipynb