iPython Notebook viewer for GNOME Sushi
CommentsLast updated 2021-01-05 00:54:51 SGT
I made a .ipynb
notebook viewer for gnome-sushi
, which I'm releasing into the wild as this GitHub Gist (under the GPL per the original).
Update 2020: Thanks to a recent pull request, this can now be installed by placing it in ~/.local/share/sushi/viewers
.
Known Issues
- Slow
- If for some reason you don't have write access to
/tmp
, you're gonna have a bad time (can be ameliorated by changing thetmpdir
constant) - No thumbnailer (seems like a lot more work needed that I don't have time for right now — note to self: https://developer.gnome.org/integration-guide/stable/thumbnailer.html.en)
- Without internet access, will only display a white screen. This is because
- Jupyter
nbconvert
uses MathJax, JQuery andrequire.min.js
, which are externally hosted (but dumps half an MB of CSS into the preamble anyway). If any of these resources returns a 404, the WebKit webview crashes.- This is also why I create a file
custom.css
in thetmpdir
. I could alternatively remove references to things with somesed
/awk
magic, but then e.g. [\LaTeX] would break. - Interestingly, 404's returned from CSS
url
s (e.g. fontawesome) don't crash the webview.
- This is also why I create a file
- Jupyter
- I'm assuming a MIME-type of
application/x-ipynb+json
— change as necessary.