notes-cli icon indicating copy to clipboard operation
notes-cli copied to clipboard

Add option to make a new note with name based on iso8601 date

Open MatthewCroughan opened this issue 4 years ago • 2 comments

Essentially what I want is a "I don't care about the name" option.

Before finding this, I was making my own script to manage notes that was going to become a bit non standard. I'm glad I've found this project so I can contribute to it. I don't know GO so this might take a bit longer for me, but I'll get around to it.

My premise is simple, in my .bashrc I added the following:

mknote() {
    vim -- "$(date --date=$1 --iso-8601)-notes.md"
}

This means that if I type mknote today it will execute vim 2020-07-07-notes.md at the time of writing. Similarly, we could get yesterday's file and date. It's a very simple idea, but very powerful for those that do not care so much about the note name because of grep, fzf and other functionality.

Storing the filenames as --iso8601 has many benefits, namely that it is alphabetically sortable.

MatthewCroughan avatar Jul 07 '20 13:07 MatthewCroughan

I realise that I could just make an alias for notes that has the same impact, though I think this is a fair request to add to the program rather than having to make this alias.

MatthewCroughan avatar Jul 07 '20 13:07 MatthewCroughan

Actually, I could not do this with an alias as it's a subcommand. I'm quite out of ideas.

MatthewCroughan avatar Jul 14 '20 06:07 MatthewCroughan