tillahoffmann / obsidian-jupyter

MIT License
437 stars 23 forks source link

FR: Expose api #29

Closed elias-sundqvist closed 2 years ago

elias-sundqvist commented 2 years ago

It would be useful if the api for running python code and getting back html was exposed.

Then you could, among other things, use templater to make a script that does what is requested in #21.

elias-sundqvist commented 2 years ago

Never mind, I figured out that you can do like this

await app.plugins.plugins["obsidian-jupyter"].getJupyterClient("myId").request({command:"execute",source: mySource});