Problem
I read/listen/watch stuff and want to write down notes.
I have to:
- create a new file or open an old one
- start my editor
- wait for my editor to load
- manage all files, because I have a lot of them
This is annoying.
Solution (Linux)
I need a simple tool to write down notes quickly.
Without the hassle of thinking about a new file, a name for it, the place where to store it, the editor loading times etc.
Open my hidden shell configuration file. I use Zsh, so I use
~/.zshrc
. If you use Bash, you can use~/.bashrc
.Add
alias n='function _note(){echo "$(date +%Y-%m-%d_%H:%M: )" "$1" >> notes.txt;}; _note'
Type the note in the shell:
n "my very important note"
See the result
Explanation
alias n
: the command I want to use, in this case n
. You can use whatever you want as a command, e.g. alias note
.
'function _note(){...}; _note'
: setup a function named _note
and run it.
echo "$(date +%Y-%m-%d_%H:%M: )" "$1" >> notes.txt;
: take the current date in my desired format, add the first input after the alias and append it to the file notes.txt
"$(date +%Y-%m-%d_%H:%M: )"
: the current date in my desired format
"$1"
: the first input after the alias (e.g. my very important note
)
>>
: append
notes.txt
: where I want to save my note
Top comments (3)
Thats pretty neat. I tried in the past todotxt.org and it was cool too. In the end I just wasn't that much into doing it via the terminal (though I spend quite a bit of time on it)
Im now working in a small side project to create a very basic Digital Bullet Journal (dibujo.now.sh) and Im writing about it here too.
Off-topic question: how do you create the post index at the top of your post?
Hey Nico,
thanks for your comment, todotxt.org looks quite handy.
Your Bullet Journal looks pretty useful, great work! I try to stay focused by minimizing my open browser tabs, therefore I've built it in the terminal.
If you want to create a post index,
you have to add a
series
property into your post header:Example:
In the first post of your series the index won't show up, only if you'd add a second post.
Legend!