Apr 16, 2017 Tags: devblog, kbsecret, programming, ruby
Preword: I’ve decided to do semi-regular updates on my kbsecret work. They’ll be somewhat similar to the weekly updates I did on muzak development, but hopefully more focused on practical use cases and less on implementation details.
I added a
todo record
to kbsecret this week, bringing the number of (usable) record types up to five:
environment
, login
, snippet
, todo
, and unstructured
.
todo
records are a bit unlike the others in that some of their fields
are not populated during creation (i.e., during kbsecret new todo [...]
).
In particular, the start
and stop
fields are left unfilled until
the status
of the record is changed, either to started
or to completed
:
1
2
3
4
5
6
$ kbsecret new todo task-1 'soak the chickpeas tonight'
$ kbsecret dump-fields task-1
task-1: soak the chickpeas tonight
status: suspended
start:
stop:
The new kbsecret todo
command provides the basic interface for updating
the status of a task:
1
2
3
4
5
6
7
$ kbsecret todo start task-1
task-1: 'soak the chickpeas tonight' marked as started at 2017-04-16 23:33:50 -0400
$ kbsecret dump-fields task-1
task-1: soak the chickpeas tonight
status: started
start: 2017-04-16 23:33:50 -0400
stop:
Both kbsecret todo suspend
and kbsecret todo complete
update the
stop
field:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ kbsecret todo suspend task-1
task-1: 'soak the chickpeas tonight' marked as suspended at 2017-04-16 23:33:55 -0400
$ kbsecret dump-fields task-1
task-1: soak the chickpeas tonight
status: suspended
start: 2017-04-16 23:33:50 -0400
stop: 2017-04-16 23:33:55 -0400
$ kbsecret todo complete task-1
task-1: 'soak the chickpeas tonight' marked as completed at 2017-04-16 23:34:00 -0400
$ kbsecret dump-fields task-1
task-1: soak the chickpeas tonight
status: suspended
start: 2017-04-16 23:33:50 -0400
stop: 2017-04-16 23:34:00 -0400
Like with the other record types, the utilities included in kbsecret for task management are pretty minimalistic (read: nonfunctional). The biggest reason for this is laziness, but I also want to encourage people to make their own utilities using the primitives provided by kbsecret.
For example, I’ve written my own little script, todo
, that wraps
all of kbsecret todo
(and then some) into a nicer user experience:
(You can find my script here, but I encourage you to write a less hacky one.)
Another common use case I have for a general record manager (which kbsecret
is quickly becoming) is storing long lists of URLs and general notes. I could
probably use the unstructured
record type to whip up a utility that manages
lists like that for me, although it may be nicer to have a dedicated notebook
or similar type that provides timestamping/delineation of individual entries.
We’ll see.
- William