today

what did you do today?
git clone git://git.alexkarle.com.com/today
Log | Files | Refs | README | LICENSE

commit 66bca08f179dab66e8993fdcdf527293ab835cc2 (patch)
parent 9440e6be2feadaf99ff68574ca7c4a4c6f60ff33
Author: Alex Karle <alex@alexkarle.com>
Date:   Thu,  3 Mar 2022 22:29:20 -0500

Generate README from man page

I'm torn on providing a stub README vs providing a man-page
as README. For now, it's nice to do a man-page I think (until
the README should have project-level info).

Diffstat:
MMakefile | 3+++
MREADME | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 77 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,9 @@ DESTDIR = PREFIX = /usr/local +README: today.1 + mandoc -Tascii -Owidth=72 today.1 | col -b >$@ + .PHONY: install install: mkdir -p $(DESTDIR)$(PREFIX)/man/man1 $(DESTDIR)$(PREFIX)/bin diff --git a/README b/README @@ -1,6 +1,74 @@ -today ------ -What did you do today? -Didn't do much today -I was home, and then I wasn't - ~ Sunflower Bean +TODAY(1) General Commands Manual TODAY(1) + +NAME + today - what did you do today? + +SYNOPSIS + today [-ein] [-l [NUM]] + +DESCRIPTION + today is a tool for quickly documenting a day's work at the end of + the day. today has primitive recall capabilities; it's easy to + access yesterday's notes but more complex analysis is left to other + tools like grep(1) and awk(1). Similarly, establishing any sort of + tagging system is left as an exercise for the reader. + + today uses ed(1) for edits. This may add a bit of a learning + curve, but the lack of a view of the file provides a distraction + free, append-only mindset for recording whatever is top of mind. + + The options are as follows: + + -e edit the most recent day's notes. + + -i initialize the today repository. + + -n start a new day's entry, indicated by a [YYYY-MM-DD] + separator. + + -l [NUM] + list the last NUM days-worth of entries, or all if NUM not + given. + +ENVIRONMENT + TODAY_DIR override the default repo location, $HOME/.today. + +FILES + $TODAY_DIR Git repository + + $TODAY_DIR/log Log file + +EXAMPLES + One time setup: + + today -i + + Jot down what you did today: + + $ today -n + ed> a + * Learned some mdoc(7) + * Rewrote today(1) + . + ed> wq + + View yesterday's tasks: + + $ today -l 1 + [2022-03-02] + * wrote some code + * went for a walk + brag: shipped xyz big feature! + + Search for all brag-document worthy items: + + $ today -l | grep '^brag:' + brag: shipped xyz big feature! + +SEE ALSO + ed(1), git(1) + +AUTHORS + Alex Karle <alex@alexkarle.com> + +OpenBSD 7.0 March 3, 2022 OpenBSD 7.0