I haven’t used Obsidian for 2 years and I see that it has evolved a lot, so much that I practically have to start again from 0.
One of the first things I need to do is to rename my note files to the style I was using with my previous note package which is:
YYYYMMDDDTHHmmss--title__tag1_tag2
The title is the H1 of the note, or frontmatter title if necessary although they should be the same and I prefer not to use it, in lower case and replacing spaces with -.
From what I have seen it seems to me that without plugins this is not possible, and we will have to resort to templater, which I don’t know at all, and although I have started to study it I would like to know if any of you can give me an idea of how it could be.
Thank you very much
PS: This name normalization is an idea of Protesilaos Stavrou for his denote package. (The file-naming scheme)
I think yes, this would not be possible without plugins.
To clarify, are you looking for an operation that will change the title after the note already has content? Otherwise there would be no H1 to get that info from yet, right?
Or would you enter some title first, and it would add the H1 and the --title portion at the same time?
There are plugins like “Modal forms” and possibly others which can help you enter information that gets fed into Templater or other plugins. (I’ve never tried it personally.) Maybe it could help you fill in some of those fields that would generate the filename for you.
Well, I wouldn’t necessarily rely on plugins for this at all. There was a plugin (I forget the name) from 2-3 years ago (that could still work) that syncs the Heading 1 with the title and there is some setting in the Linter plugin as well, but I’m unsure the latter would rename files and definitely sure the tags will be not added to the file name.
I’d say have a Python script written and test it on a copy of your files (outside of Obsidian, with the app closed). You can tell the bot all the details of your current file (name) structure as well as what you want and take your time with it.
(I’m guessing there are hundreds or thousands of files, otherwise you would have done this manually by now.)
I forgot to mention that you’ll need to take care of your links as well. So whatever standardizing pattern is used for renaming the files should be used for updating the Wikilinks as well, in the same script.
Yeah, for something like that, Templater is your best bet. It might seem tricky at first, but once you set it up, it’ll do exactly what you’re looking for. You can automate the renaming with a custom template that follows your naming convention.
In the system I have been using, first the frontmatter is constructed and from there the file name. Then a function renames the file if the frontmatter is changed.
I have been looking at the documentation of Templater and with the functions of tp.frontmater and tp.file.rename maybe it can be achieved, but I still have to understand well how it works.
I think you are looking for the obsidian linter, guessing this is that option you refer too? @A_Simon I’ve been using it to do just that and a one button press to have everything the way i like the formatting. hope it helps