Improvement on the "Auto rename by Title"
This is a very useful feature. I appreciate it you have it here. But, it needs a little tweak so that FSnotes will play good with other apps such as Obsidian. Currently, if we select "Auto renmame by title" in setting, editing notes that are already created in Obisidian or other app will get renamed to the first line text. That is too much. I think a better option would be to not touch the names of old notes; and rename only the ones we are creating inside fsnotes.
Files created in FSNotes are no different from any other markdown files. How to implement this?
And why shouldn't some files be renamed if auto-rename is selected? Old notes are sometimes edited too.
After a while, users will come to me asking "why aren't the notes renamed"?
After a while, users will come to me asking "why aren't the notes renamed"?
I don't think that ever happens because if a user is editing an old file, he/she already assigned a file name to it. In rare occasions that we need to rename old files, it is not that hard to hit CMD+R.
The problem with the current system is any file we edit inside FSNotes is going to renamed. It could cause a lot of unexpected results.
As to the implementation, how about using the CreationDate attribute provided by the macOS? Auto rename a file --> iff it has been created in the last few seconds (or sth like that).
Look at a comment by @xor-gate here
I think this feature works, but it did automagicly rename my files which I did not expect. If I use the setting other than "Auto Rename By Title" it should not touch my filenames every again right? I'm now using the "Format: Untitled Note" setting.
He expressed the problem of the current implementation. Editing a file should not trigger renaming, honestly. Creating a file can, well because we are creating it, need to name it anyways.
As to the implementation, how about using the CreationDate attribute provided by the macOS?
That's possible, I can even make an additional option for that.
That's possible, I can even make an additional option for that.
thank you
Please check dev build FSNotes_6.9.8.zip
New option available here: Settings -> Files Naming -> Auto Rename By Title (New Only)
Wow, that is impressive man.
Yes, it is working.
May I suggest the name "Autoname by Title", because this one doesn't rename existing files. It assigns names to the newly created ones (unnamed yet).
Brilliant. Thank you.
I was excited about it. Unfortunately, I just realized that the improvement actually is not working. Here, I have recorded a video to show that the setting is not applying. https://monosnap.com/file/30OPWxCZI6q95M0CFHviTbHk1YdsIk The video also shows that the Fsnotes is not getting the title from the YAML, even if it was supposed to do so, according to this: https://github.com/glushchenko/fsnotes/issues/1108
@DesBw please check this:
https://github.com/glushchenko/fsnotes/releases/download/6.9.8/FSNotes_6.9.8.zip
I am afraid I am getting the same behavior (renaming files based on the first line). https://monosnap.com/file/RhselaliDVG54PSIiRYQhBrgW1Go9M
This works through checking the file creation date, I don't see any bugs here.
func isOlderThanOneDay(from date: Date? = nil) -> Bool {
if let date = date, let differenceInDays = Calendar.current.dateComponents([.day], from: date, to: Date()).day {
return differenceInDays >= 1
}
return false
}
@glushchenko will this be coming to the iOS version?
@RainofTerra 100%
Implemented in 6.10.0 and available in AppStore