Skip to content
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 option to make a new note with name based on iso8601 date #13

Open
MatthewCroughan opened this issue Jul 7, 2020 · 2 comments
Open

Comments

@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented Jul 7, 2020

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
Copy link
Contributor Author

MatthewCroughan commented Jul 7, 2020

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant