|
|
|
|
|
by gglitch
1198 days ago
|
|
Similar. I've ended up at these functions in .bashrc: # Append a timestamped entry to the journal
log() {
printf "$(date +%Y-%m-%d--%H:%M) %s\n" "$*" >> $journal
}
# Query the journal
lquery() {
grep -ni $1 $journal
}
# Show all journal entries from today
ltoday() {
clear
grep -n $(date +%Y-%m-%d) $journal
}
# On a line identified by line number, switch @todo to @done
ldo() {
sed -i "$1 s/@todo/@done/" $journal
sed -i "$1 s/$/ \[COMPLETED $(date +%Y-%m-%d--%H:%M)\]/" $journal
}
Nice things about this system: there's only one file; I'm only ever looking at the data I want to see; and there are no applications running or files open (except my terminal, I guess). |
|