Today I Learned
linux | ||
nix | ||
python | ||
.gitignore | ||
readme.md | ||
til.py |
Ellie's TIL Repository
This repository contains a collection of lessons that I've learned about all sorts of different things.
Along with a small shell tool for making that a little easier.
til - A small tool for noting things
usage: til [-h] [--changedir] [--subject SUBJECT] [^tag ^tag title ...]
Today I Learned: A small tool for small lessons
positional arguments:
^tag ^tag title A list of #hashtags (prepended with ^) and a title to give your lesson. (Your lesson will be stored at $TIL_DIR/title-converted-to-lowercase-kebab-case.md)
options:
-h, --help show this help message and exit
--changedir, -c Dummy option to make shell script easier, does nothing.
--subject SUBJECT, -s SUBJECT
The subject to file this under. This should be a subdirectory. Your lesson will be stored at $TIL_DIR/[subject]/title-converted-to-lowercase-kebab-case.md
til uses $TIL_DIR as its storage directory for your lessons and $EDITOR to edit them.
Shell Integrations
ZSH
In .zshrc
:
export TIL_DIR=$HOME/Code/til
til() {
python3 $TIL_DIR/til.py $@
}
tilz() {
python3 $TIL_DIR/til.py $@ && cd $TIL_DIR
}