Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

globau/timetracker-bot

Repository files navigation

glob's irc time tracking bot.
~~currently running on irc.mozilla.org #timetracker~~
i no longer operate this time tracking bot.

ABOUT

this bot monitors you irc status changes, and keeps a track of when you are in
its channel and not "away".

i use to to keep a track on my hours to keep my work/life balance in order, as
well as logging for tax purposes.

INSTALLATION

1. install cpanm and the local::lib perl module system-wide
2. copy configuration.json.sample to configuration.json and edit
3. run 'cpanm --verbose --local-lib ~/perl5/ --notest --installdeps .' to
   install perl modules
4. run './setup-db' to setup your database schema
5. run './timetracker' to run the bot
6. configure a systemd service using timetracker.service

REGISTRATION

join the configured channel.

to run commands either enter them into the channel preceded with ! (eg.
!help), or send the bot a private message.

use the "register" command to start tracking.
use the "timezone" command to set your local timezone (defaults to us/pacific).
use the "hours" command to set your weekly hours (defaults to 40).

EXAMPLE REPORT

38:25 Week [+00:25] 38/week : 7 Apr - 13 Apr
07:07 Monday    [-00:29]
09:36 Tuesday   [+02:00]
08:20 Wednesday [+00:44]
08:46 Thursday  [+01:10]
04:36 Friday    [-03:00]

the first line shows the total time worked for the week (38 hours 25 minutes),
that i worked 25 minutes more than my target of 38 hours per week.

following that is the daily breakdown.  for example on wednesday i worked 8
hours 25 minutes, which is 44 minutes more than my daily target.

and, yes, my distribution of hours during my week is very odd.

COMMANDS

syntax: day [date]
shows details of the hours online for the specified date.
defaults to today if no date is provided.

syntax: edit "date" "adjustment" "reason"
adjusts the hours worked for the specified date.
eg. edit "last tuesday" "+8 hours" "public holidays"
eg. edit 2014-04-29 -45m left myself logged in during lunch

syntax: edits date
shows all your edits for the specified date.

syntax: help [command]
displays a list of commands, or help for a specific command if provided.

syntax: hours [hours]
displays or sets the number of hours you work per week.
the default is 40 hours per week.

syntax: ping
responds with "pong".  used to test the responsiveness of the bot.

syntax: register
register your current nick to be tracked by timetracker.
you must be both registered and in #timetracker for your time to be tracked.

syntax: report [start month] [end month
shows a summary of the months online for the specified range.
shows the current calendar year if no start month provided.

syntax: status
displays the last known status of your nick, either Away or Online.

syntax: timezone [zone|find zone]
displays or sets your time zone.
use "find" to grep for valid time zones
the default time zone is PST8PDT.

syntax: week [date]
shows a summary of the hours online for the specified date.
defaults to this week if no date is provided.

About

timetracking irc bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages