rhysd / notes-cli

Small markdown note taking CLI app playing nicely with your favorite editor and other CLI tools
MIT License
218 stars 26 forks source link

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

Open MatthewCroughan opened 4 years ago

MatthewCroughan commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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