In Zettelkasten, everything is up to the links of the notes. To get your links organized in a conservative way as well, you should maintain index notes, which store a set of links. Of course, folders can provide this view, but putting the notes into folders does not solve the problem completely, as a “folder” is not an implicit index note. Therefore, you have to keep and maintain an index file for each folder. And this makes the whole system a bit more difficult, because if you move a note from a folder to another, you have to maintain your index files by removing the note link from the source folder’s index, and putting it to the target folder’s index.
Hence, I created an app called ZoottelKeeper that handles and maintains all the index files in your notes’ folder, recursively. It runs as a daemon, recognizes that something is changed within the folder, and updates the index files of the affected folders. Here you can try it if you want, and of course, any feedback, bug report, and improvement request are welcome:
Hello, this looks great!
Do you think you could make it into an Obsidian plugin?
Hi @y.h !
Sorry for the long silence, but now its out as a plugin as well, please take a look at it among the plugins, it’s called - no surprise - Zoottelkeeper.
Great, thank you!
Is this plugin destructive to notes (other than the index) in any way? I know it says it’s in Beta and to backup your notes (which mine are, every hour), it just got me a little worried.
Nope, it just writes the index notes only, I wrote it there because you must be sure that your index prefix matches the index files only.
For instance by default the prefix is 000_Index_of_ or something similar, so in case of FolderA the index file is 000_Index_of_FolderA . But if you already have a file with this name in FolderA, it will be rewritten with the content of folder.
Brilliant, thank you.
I’m very excited to use this plugin, I was literally just about to start writing a script (that I’d have to run manually) to do something similar when I found it.
Thank you for your work!
Hope you like it. I’m using it day by day and it looks fine, at least for my needs. But if you feel that (and I’m sure there can be) it can be improved, don’t hesitate to contact me!
A couple of things I can think of:
- Make the links look a little prettier:
For example, right now an example link looks like:
[[Mathematics/Differentiable Functions on a Manifold.md]]
while in my hand-written index notes I generally just write
[[Differentiable Functions on a Manifold]]
So basically exclude the root directory and the extension, unless they’re necessary somehow (please let me know if they are, I haven’t played around with the plugin too much yet).
There’s a link with the folder name itself (I’m not sure why, does it have a purpose?) and a link to the index note in the index note, they can also be excluded I think.
Include subfolders in the index note of the root folder with headings, for example, let’s say I have
rootFolderand inside of it
folderB. The index note could look like:
# Index of root folder [[file1]] [[file2]] ## folderA [[file1A]] [[file2A]] ## folderB [[file1B]] [[file2B]]
Or something like that. It would basically allow your plugin to generate more or less automated and very clean indices for e.g. Obsidian Publish (most of my notes are published actually, hence why I have these “cosmetic” suggestions).
It’s a fantastic plugin though, definitely having a lot of fun with it. I would be hammering you with PRs if I wasn’t abysmally bad at JS.
is it possible to set this up to exclude certain folders? i love it, but i have one big folder that i don’t need to index. thanks for the great plugin!
Hi @jdr ,
That’s a great idea!
Currently it’s not supported, but I’m glad to implement it soon!
Hi @oash !
thanks for thinking on the improvements.Here are my thoughts:
- I’m afraid the absolute paths are mandatory, othervise if you have two folders with the same name placed in different folders, their link would point to the same node in the graph view.
- Yes, the index notes could be excluded, i add it as a feature request.
- Templates for index notes are under development, they will resolve the case you raised I think.
Thank you very much, i can move forward with the implementation!
I’ll keep you posted.
Thank you for the response! 2 and 3 sound amazing, especially the templates!
Maybe for 1 the link could be styled as:
[[subfolder/noteName.md|noteName]] %% displays a link as "noteName" %%
to target this issue? I think adding a pipe + filename with stripped extension and path should be a simple fix!
Looking forward to seeing your work, I just watch the GitHub repo.
Aham, okok, but what happens if there are FolderA and FolderB with the same subfolder and the same note within?
I think both index file woul contain the same link: [[subfolder/noteName.md|noteName]] , which would be one node in the graph view.
Or not, what do you think?
They wouldn’t be one node on the graph, no. The graph displays nodes based on the note filename, excluding the path and extension. Even if
n notes have identical names but different folders, there will be
n nodes in the graph with identical names, not one node representing all of them.
TestFolder, with 2 subfolders
Subfolder 1 and
Subfolder 2 and each with
Here are some examples:
Example 1, what I’m suggesting:
[[Test Folder/Subfolder 1/Note1.md|Note1]] [[Test Folder/Subfolder 2/Note1.md|Note1]]
Example 2, the current situation in Zoottelkeeper:
[[Test Folder/Subfolder 1/Note1.md]] [[Test Folder/Subfolder 2/Note1.md]]
Example 3, different note display names:
[[Test Folder/Subfolder 1/Note1.md|foo]] [[Test Folder/Subfolder 2/Note1.md|bar]]
As you can see, all 3 graphs are identical, the name of the node in the graph depends only on the filename of the note, excluding the extension and path. So even the current situation in Zoottelkeeper does not prevent this problem.
This is why I never have multiple notes with identical names under different folders. All my notes have different names, but it’s a preference thing. It keeps the graphs cleaner.
Folder A and
Folder B, each with subfolder
subfolder and each with note
Example 1, what I’m suggesting
Folder A Index
Folder B Index
Example 2, the current situation in Zoottelkeeper
Folder A Index
Folder B Index
Example 3, different note display names
Folder A Index
Folder B Index
As you can see, it’s the same as situation 1 above.
It makes perfect sense to display notes in the index as
since it doesn’t affect the graph view, and the only side effect is making things prettier.
Sorry for the very long comment
Hi @oash !
Huh, thanks for the detailed insights! During I tried it by myself I realized for what I had a feeling that it won’t work for Zoottelkeeper.
The links with pipe works perfectly on files, but not for links without real files, e.g. virtual links. And as Zoottelkeeper connects folders together using virtual links, it will go wrong, a relative [[subFolder]] will point to the same virtual entity.
So, my suggestion would be to have an option to use relative paths for files only, and in this case - similarly to the absolute paths- the folder links should be absolute paths.
That would be a win-win scenario i think.
That sounds great! My 6 examples missed virtual links
I just played around with the folder links for the past 30 minutes and I think I understand their purpose. Pretty smart!
For example, let’s say I have this folder structure:
root/ ├── subfolderA/ │ ├── Note1.md │ ├── Note2.md ├── subfolderB/ │ ├── Note1.md │ └── Note2.md root2/ ├── subfolderA/ │ ├── Note1.md │ ├── Note2.md ├── subfolderB/ │ ├── Note1.md │ └── Note2.md
when Zoottelkeeper runs, we end up with:
root/ │ ├── _index_of_root.md ├── subfolderA/ │ ├── _index_of_subfolderA.md │ ├── Note1.md │ ├── Note2.md ├── subfolderB/ │ ├── _index_of_subfolderB.md │ ├── Note1.md │ └── Note2.md root2/ │ ├── _index_of_root2.md ├── subfolderA/ │ ├── _index_of_subfolderA.md │ ├── Note1.md │ ├── Note2.md ├── subfolderB/ │ ├── _index_of_subfolderB.md │ ├── Note1.md │ └── Note2.md
Now I went into every one of the six index notes and added a pipe to ALL the links, real and virtual. For example,
[[root/subfolderA|subfolderA]] [[root/subfolderB|subfolderB]] [[root/_index_of_root.md|_index_of_root]] [[root|root]]
[[root2/subfolderA|subfolderA]] [[root2/subfolderB|subfolderB]] [[root2/_index_of_root2.md|_index_of_root2.md]] [[root2|root2]]
and similarly for the indices of the subfolders. You see there are two separate nodes for
subfolderA, titled by their path (
root2) and similarly for
Here is the local graph for
So I think if you add a toggle (i.e. let the user select) to use pipes, it would work great for both virtual AND real links! And I think it’s the easiest to implement programmatically since you don’t have to figure out whether something is a file or a folder , just add a pipe to everything.
I think another option that would make sense for people who use Obsidian Publish is a toggle to turn off folder/virtual links. They look great in graph view in the app since you can control depth, but on Obsidian publish they 1. lead nowhere and 2. aren’t useful on the graph view since it only shows a depth 1 local view.
Beside of this feat. I would consider to make the index files plain content to be simpler by having an option to push relative paths on where it makes sense.
But anyway, I think now I have a clear picture about this feature request, thanks a lot, I really appreciate it @oash !
I’ll find the time to implement it during the next week.
Is there any chance that you have a walk through video explaining more of the workflow. I enjoy the LYT methods, and have seen some of his stuff, but trying to wrap my head around this plugin a bit more
Good point! Sure sure, I’ll add it to its github readme.