-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add title to the filename e.g.1a2 - title #6
Comments
This would be excellent |
I have a PR adding this: #7 |
This issue has been graciously fixed by @pauloday. Great stuff! |
No problem, I wanted this feature to and I'm glad to share my code. I just updated my main notes folder through the plugins menu and it looks like it's working, thanks @Dyldog for the fast turnaround. I did have to delete and reinstall the plugin for the settings menu to show up, but other than that it works. If you're using this in a folder with a bunch of id'd notes already, you'll need to add a separator to them before they're recognized in "Separator" mode. That's why I added the "Fuzzy" mode, which will match the old and new style filenames. It may match some other non-Luhman files though. The default separator is '⁝ ' because it looks cool and you can't use ":" in Obsidian filenames. For @FamRau's setup you'd use " - " as the separator (note the whitespace). I'm also CCing @shanvrolijk in case they didn't get notified from the other messages in this thread. Here's the bash script I used to update my filenames with the title and separator. It takes the title from the first header in the file and adds it with the separator as the title of a new file in './output'. This may overwrite things if there's already a folder named output, so be careful:
Once you're happy with the filenames, use this script to update all the links. It assumes the existing links are only the id and modifies the files in place, so just use it in the output directory from above then make sure it looks good:
Note: these will miss notes if any titles have any of the Obsidian forbidden chars in them, I think that's at least '/|:' and maybe more. use Let me know if there are any suggestions or bugs you find! |
Thank you @pauloday <3 |
@pauloday Thank you so much for this feature. I really appreciate it, because this plugin is so helpful in my daily research work. |
My naming convention for my Zettel is: number - title.
e.g.
1a2 - Rationality
1a3 - Preference
Would it be possible to add an option to automatically add the first inner title to the file name?
The text was updated successfully, but these errors were encountered: