Todo, Log and Bash
organisation, planning, git, bash, todo, logging
Being a few months away from the (supposed) midpoint in my PhD, I realized my planning and organisation skills leave something to be desired. Research involves an infinite amount of work. My natural strategy is to work on tasks in whatever order I think of them, and usually the work is done in a reasonable amount of time. This strategy does not work for infinite work. The element that lacks is prioritization, and helping myself to keep the priorities in mind. You’ll feel it coming: this is something a nice tool can solve. Since logging my progress had also been one of those tasks drowning in the infinite amount of work, today, in rainy Florence, I decided to solve these issues in one swoop.
There exist many todo solutions, and although I know Emacs org-mode is probably a solution that works wonderfully for this kind of stuff, I deemed the learning curve a bit too steep for my taste. My solution is an extremely simple combination of the PlainTasks plugin for SublimeText and a Git repo where I’ll keep my tasklists. The taskslist are pretty freeform, one can mix any Markdown text with the tickable and groupable todo-items. Hierarchies are possible, as well as quick navigation between files. Priority levels, start and endtime, and archiving are all built-in and require nothing more than a hotkey. The Tutorial to PlainTasks is short and clear. The second part is the discipline to commit at least daily on the tasks-repo. The purpose of this repo is very limited, so that I wrote a simple Bash command that auto-commits any changes and uses the gitlog as my log (sounds obvious now). Just add to .bashrc and type log today i worked on x
anywhere in your terminal.
log() { \
RETURNHERE=$(pwd); \
cd /path/to/repo/; \
git add --all; \
git commit --allow-empty -m "LOG: '$*'"; \
git push; \
cd $RETURNHERE; \
}
Some bash-things I learned: escape newlines within functions with a ; \
, PWD is not a good variable name (it is set automatically, independent of the pwd
command), --git-dir
is not enough to update a repo in another dir, --allow-empty
allows for commits without changes, and one should encapsulate commands passed to a script (because a log entry will generally be a sentence).
So now, all that’s left is religious use of the task lists and frequent log entries to get a good picture whats troubled me that day.