Permalink
Browse files

First commit, migrating from SVN fresh into git.

  • Loading branch information...
0 parents commit e845d9e6761f558029e80a827ca32f5155793fc9 Eric Mill committed Jun 29, 2008
Showing with 1,329 additions and 0 deletions.
  1. +22 −0 LICENSE
  2. +104 −0 README
  3. +30 −0 bin/commit
  4. +278 −0 bin/track
  5. +499 −0 lib/basecamp.rb
  6. +369 −0 lib/time_tracker.rb
  7. +27 −0 time-tracker.gemspec
@@ -0,0 +1,22 @@
+Copyright (c) 2007 Eric Mill
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,104 @@
+===============================================================================
+ Tracker - Command line time tracker for Basecamp
+===============================================================================
+
+Tracker is a command line interface to log and manage your times on your
+Basecamp. It uses and extends the Basecamp API Ruby wrapper.
+
+
+=== Usage ===
+
+Configure the tracker with your Basecamp URL, login details, and whether the
+Basecamp uses SSL. This will take a while as it caches project information
+from your Basecamp. Example:
+
+ track configure example.clientsection.com jsmith jsmithX11 true
+
+Set a project as "current", so any times logged are assumed to be meant for
+that project.
+
+ track project "Johnson Industries"
+ track project joh
+
+Log a time by giving the duration, or by giving two times. You can optionally
+specify the project to log time to, which won't change the default project.
+
+ track log 0.25 "Log message"
+ track log :15 "Log message" "Johnson Industries"
+ track log 2:30p 5:30pm "Log message"
+ track log 10:00 1:00 "Log message" joh
+
+ In the last case (10:00 to 1:00), the tracker will assume that the 2nd time
+ is later than the 1st one, and calculate it as 3 hours, not -9.
+
+Log time by starting a timer. If you don't specify a starting time, it's
+assumed you're starting now. You can optionally specify a project, which
+will change the default project.
+
+ track start
+ track start "Johnson Industries"
+ track start 3:15
+ track start 3:15 "Johnson Industries"
+
+Stop the timer to log elapsed time. If you don't specify an ending time, it's
+assumed you're stopping now.
+
+ track stop "Log message"
+ track stop 5:15pm "Log message"
+
+Pause and unpause the timer.
+
+ track pause
+
+Cancel all time tracking and reset counters to 0, if the timer is running or
+paused.
+
+ track cancel
+
+List times logged that day, including totals:
+
+ track times
+
+Delete a logged time from Basecamp with "undo". If you don't specify an
+ID, it's assumed you want to delete the last logged time.
+
+ track undo
+ track undo 6861536
+
+Set a variable, such as the minute increment to round times to, or any Basecamp
+authorization credentials.
+
+ track set rounding 15
+
+
+See the list of available projects to track time against.
+
+ track projects
+
+See whether the tracker is configured correctly, the current project, and
+if/when the timer was started or paused:
+
+ track status
+
+See a general or command-specific help message:
+
+ track help
+ track help log
+
+
+== General ==
+
+ * Project names can be entered as starting fragments. For example, if
+ "Johnson Industries" was the only project beginning with "joh", you could
+ reference it as "joh" (e.g. "track project joh"). If more than one
+ project starts with a fragment, the first one that matches is chosen.
+
+ * Times:
+ - Valid formats for times of day are: 10:00, 9:00pm, 23:30, 8, 1am, 10p
+ - Invalid formats for times of day are: 1230, 1120pm, 22:00am
+
+ * When calculating elapsed time, minutes are rounded up to be integers, and
+ then rounded to the nearest 15 minute increment, by default. So a 1-minute
+ time will be logged as 15, 15 as 15, 16 as 30, etc. Use the 'set' command
+ to change the increment that times are rounded to. Times logged using the
+ 'log' command will not be rounded.
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+MSG=$1
+LOG=-1
+START=-1
+
+if [ "$1" == "-l" ]
+then
+ MSG=$2
+ LOG=0
+elif [ "$1" == "-ls" ]
+then
+ MSG=$2
+ LOG=0
+ START=0
+fi
+
+
+svn ci -m "$MSG"
+
+
+if [ $LOG -eq 0 ]
+then
+ track stop "$MSG"
+fi
+
+if [ $START -eq 0 ]
+then
+ track start
+fi
Oops, something went wrong.

0 comments on commit e845d9e

Please sign in to comment.