Hobby-hacking Eric

2008-11-07

timesheet helper

I wish there was a simple, no-fuss command line timesheet helper in the spirit of cabal-install and twidge. The kind of interactions I imagine are:

09:00 # timesheet start work draft 3 of the paper
10:00 # timesheet start darcs dwn
10:45 # timesheet start work regression test for ppack
12:00 # timesheet stop
12:30 # timesheet start darcs roadmap
13:15 # timesheet start work regression test for ppack
16:30 # timesheet start darcs patch review
17:00 # timesheet start work meeting
18:30 # timesheet stop

18:30 # timesheet summary
Today 2008-11-07
-------------------
darcs: 2h
work: 6h 30m

18:30 # timesheet details
Today 2008-11-07
-------------------
darcs: 2h
* dwn: 30 m
* roadmap: 45m
* patch review: 45m
work: 6h 30m
* draft 3 of the paper: 1h
* regression test for ppack: 4h
* meeting: 1h 30m

(Note the assumption here that you are never working on two tasks at the same time; clocking in to a new task automatically clocks you out of an old one). The key to this application is simplicity. In its present state, gpe-timesheet (0.32) uses too many confirmation dialogues to be really useful. Loggr is nice and simple, but if I close my browser window, I lose track of things. Another property I would like to have is for the application to be forgiving to mistakes. If it stored timesheets in a simple text format, for example, I could just edit out my mistakes in a text-editor.

For Haskellers, I also wish that we had a common library for writing command line applications with subcommands and switches. This would be useful for darcs, cabal-install, twidge, this timesheet application, and more.


7 comments:

Árni Hermann Reynisson said...

You have no idea how much I want a simple tool like this. Will be keeping an eye on this space if you blog about it later :)

Simon Michael said...

Good news, it exists: try (h)ledger plus the timeclock/timelog utilities. The options are a little hard to describe, but: http://joyful.com/hledger will lead you to (h)ledger; ledger's manual talks about the timelog format; I think ledger comes with the ti/to command-line clock-in/out tools; or, do what I do and use C-x t i/o in emacs, from http://joyful.com/Ledger#ledgertools ; then you could report today's hours with something like (h)ledger -f ~/.timelog -b 2008/11/07 -s balance. ledgertools includes an "hours" script which makes querying simpler. Hope this gets you on the trail at least.

Simon Michael said...

Even more links, to get you closer:

http://joyful.com/repos/ledger/doc/ledger/Using-timeclock-to-record-billable-time.html

http://joyful.com/repos/ledgertools/ledgerutils.el

http://joyful.com/repos/ledgertools/report

kowey said...

Thanks, Simon! How do I get a hold of the timeclock utility? Thanks

kowey said...

Answering my question, it appears that timeclock is part of Emacs, which I confess does not really help me (being a silly Vim user). I suppose the right thing for me to do would be to learn how to write timelog formatted files.

Unknown said...

> I also wish that we had a common library for writing command line applications with subcommands and switches.

You could hack up my parseargs package from hackage to do subcommands pretty easily. Or I could. I'll think about doing it sometime soon if you don't get to it.

kowey said...

Oh I would love to see parseargs growing into a full-featured library, and can think of a ton of users: darcs (and any Haskell RCS: camp, gat, the Haskell hg), twidge, ghc-pkg, cabal-install, hledger, this timesheet app. I've noted my thoughts down on the
DarcsLibraries
page in the wiki