Clocking in and out are fairly self-explanatory. But edits generally require a message explaining why the usual cycle was broken.
Until now, the only interesting property of a command was whether it was a mutator. However, that will change in the next commit. Restructure the code to handle other properties.
Besides simply allowing alternate locations, it allows you to keep multiple timecards using aliases.
The 'caseless' branch of mfm is now configurable; we need to actually tell it we want the alternate lib directory.
This should allow building on case-insensitive filesystems.
When reading a slot with no comments from a file, we left the 'comments' field undefined, when it should have been an empty array ref. This could lead to a run-time perl error. Hurray for Perl.
It is nice for double-checking that you have been punched in a reasonable amount of time. It's also a nice motivator to see it going up.
This gives us a helper function as part of DateTime::Duration. It is perhaps a bit ugly to be adding methods onto somebody else's object, but it makes the usage much nicer.
This wraps the timecard program to provide a pseudo-"distributed" timecard. We use a git repository to push and pull changes from a central location, which should notice any problems with multiple simultaneous updates (though it will do nothing but just barf and let you fix up the result yourself, so you do need to be at least a little bit git-competent).
This lets you use a different timecard than the default, in preparation for putting the file into a repository directory.
I want the clock script to do more things that aren't really timecard-specific, so let's fork off that bit of functionality into its own script. Arguably, timecard is a better name, anyway.
It just shows whether you're punched in or not. Handy if you think you might have forgotten.
The 'sum' subcommand will tell you the total hours, but sometimes it is nice to see a breakdown by task cluster of what actually happened.
It is easy when crossing day boundaries to change a time, but not a day, and then end up ending a task half a day before it started. Let's flag this error instead of just producing a totally bogus duration.
This caused a perl exception. The problem was that we were feeding a string time for 'now' into a DateTime::Duration subtraction.
Handy for updating the entry as you do tasks, rather than remembering at the end when you clock out.
This will be handy for other things that modify the open slot, like a 'comment' command.
Doing "clock out foo" would fail to write out the "foo" comment. This was caused by a typo in the hash element name. Huzzah for dynamic structs!
This actually tallies up a timecard. Handy for submitting billing.
This is a very simple timekeeper program. It stores time slots in a text file, and is only moderately less work than editing the file by hand. You can do: $ clock in some comments on what you are doing $ clock out some more comments if you want