What I’m trying to do
I have notes that keep track of things going on in a project with artifacts in the filesystem outside the vault.
For example, I might maintain a LaTeX manuscript project in the following directory: “~/projects/presentations/foo/
”, and have a note called something likefoo-presentation.plan.md
in my vault that keeps tracks of things like tasks, admin details, and maybe even a capture inbox for ideas, wordsmithing, etc.
I would like to have an easy way to go to the project directory from Obsidian. Of course, I could plant the path to the project directory somewhere in the note and then just: copy the path, open a terminal, type in “cd” and then paste the path etc.
But it would be nice to just click a link or something and have it all happen.
Furthermore, it would be nice to have support for multiple such file system artifacts (e.g., related software projects, or alternate manuscripts, etc.).
Things I have tried
Following is my current method:
-
Using the (INCREDIBLY useful!) Shell Commands plugin, I create the following shell-command:
cd {{yaml_value:production-directory}} && gnome-terminal
-
In the project note in the vaul, I add something like the following YAML front-matter:
date: 2023-03-21 production-directory: "~/projects/presentations/foo/" production-resources: software: "~/projects/software/bar/"
-
Then using the nice Buttons plugin, I create the following button in the note:
\```button name Open Production Directory type command action Shell commands: Execute: Open production directory \``` ^button-project-directory
This works.
But there are lots of moving/fragile parts and fussing to connect all the moving parts. Is there a way to streamline this process? Maybe having the buttons plugin directly open the terminal using a shell script? Or somehow having a URI scheme for the filepath that calls a “cd <dir> && <terminal>
” command directly?