As far as I know (and that’s too little), there’s something called URIs. If Jupiter has some form of a URIs you can use it to link it into Obsidian.
They look like these obsidian://open?vault=VaultName&file=NewFile. This link will open a file called “NewFile” in the obsidian in the vault “VaultName” .
When clicking on the link Obsidian will delegate its handling to the OS. So the “tricky” part is to make your system to know how to open files with the .jpynb extension.
On macOS you can create an Automator workflow, save it as Application and point the OS to use it to open .jpyng files:
Open Automator and drag “Run Shell Script” action into the workflow area
Set “Pass input” option to “as arguments”.
Paste in the following code:
#!/bin/sh
file="'$1'"
scr='tell application "Terminal" to do script "jupyter notebook '
osascript -e "${scr}${file}\""
Save the workflow as “Jupyter Notebook” in your “Applications” folder and set “File Format” to “Application”.
In the “Info” dialog to an .ipynb file set the “Open with” option to “Jupyter Notebook.app”. Click “Change All” and confirm the pop-up dialog.
On a Linux system you can create a shell script like this:
#!/bin/sh
jupyter notebook "$1"
make it executable and point the OS to use it to open .jpynb files (on MS Windows, I assume, you can create a similar .bat file instead).
Here another one perhaps more clean solution for macOS:
Open Automator and drag “Run AppleScript” action into the workflow area
Paste in the following code:
on run {input, parameters}
set _file to POSIX path of input
set _cmd to "jupyter notebook " & quoted form of _file
tell application "Terminal" to do script _cmd
end run
Save the workflow as “Jupyter Notebook” in your “Applications” folder and set “File Format” to “Application”.
In the “Info” dialog to an .ipynb file set the “Open with” option to “Jupyter Notebook.app”. Click “Change All” and confirm the pop-up dialog.
Two issues with this:
*) the file:// needs an absolute path.
anybody know how to modify this so a relative path can be used instead?
*) this starts up a new jupyter server each time such a link is clicked.
any way to use an existing jupyter server instance?