This hacky code snippet will take obsidian notes and create a new vault containing said notes and any notes directly and indirectly linked to by them. In this manner we can share a note (or a few notes) with someone while also sharing any note that will be referenced by these notes.
- Copy
main.py
to the root of your vault. - Open the vault in your terminal.
- To share the two notes
my thoughts.md
andrecipes.md
runpython3 main.py "my thoughts.md" "recipes.md"
- Done! There should be a new vault titled
my_new_vault_dir
in the same directory as the original vault.
Someday maybe this can become an integrated Obsidian plugin. If there is enough demand someday could come sooner.