It occurs to me that it should be fairly easy to create a Leo plugin that would display an .ipynb file. Both VR and VR3 used to do this. They used a pip-installable module that converted it to HTML and displayed that, IIRC. We could resurrect that code into the new plugin. The plugin would let you view the .ipynb file in another pane while you had its Jupytext paired file open as a regular Python file in Leo. I'd probably want to add a new directive to specify the paired file.
If this works out, it could be a really nice addition to Leo, at least for Jupyter files that use only Python. On Monday, November 27, 2023 at 8:00:34 AM UTC-5 Thomas Passin wrote: > Very sweet, and ideally suited to work with Leo. > > On Monday, November 27, 2023 at 2:52:53 AM UTC-5 [email protected] wrote: > >> Ok, it seems jupytext is the right choice. It can pair notebook with >> python file. I just use Leo to handle the python files :-D Great! >> >> https://github.com/mwouts/jupytext#paired-notebooks >> >> >> On Monday, November 27, 2023 at 11:21:52 AM UTC+8 HaveF HaveF wrote: >> >>> There used to be some support for Jupyter notebooks, but over time it >>>> became clear that it didn't work well. You could read them but not >>>> interact or modify them effectively. Since you can read them better in a >>>> browser, the support was removed. >>>> >>> >>> I see, Thomas. Reading the notebook is fine. But it lacks the clone >>> function of leo. Since there is always some code that is generic for >>> some typical analysis (but I don't have it abstracted into functions), I >>> wondered if I could use Leo's clone feature to extract out the code >>> separately so that the content of the code paragraphs could be synchronized >>> after each change. At the moment, it seems that there is no way to solve >>> this problem, and perhaps the practical way is to abstract this content >>> into functions to manage it. >>> >>> -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/73854119-d9e7-44a3-af0e-416215962fc1n%40googlegroups.com.
