diff options
| -rw-r--r-- | README.markdown | 27 | ||||
| -rw-r--r-- | VERSION | 2 | ||||
| -rw-r--r-- | hcl.gemspec | 2 | ||||
| -rw-r--r-- | lib/hcl/app.rb | 27 |
4 files changed, 37 insertions, 21 deletions
diff --git a/README.markdown b/README.markdown index 98bf71c..e7692eb 100644 --- a/README.markdown +++ b/README.markdown @@ -30,7 +30,7 @@ or you can install from source using jeweler: ## Usage - hcl (@<task_alias> | <project_id> <task_id>) [+time] [message] + hcl [start] (@<task_alias> | <project_id> <task_id>) [+<time>] [<message>] hcl note <message> hcl stop [message] hcl resume [@<task_alias>] @@ -38,6 +38,7 @@ or you can install from source using jeweler: hcl tasks hcl alias <task_alias> <project_id> <task_id> hcl aliases + hcl (cancel | nvm | oops) ### Available Projects and Tasks @@ -52,8 +53,8 @@ available tasks. Since it's not practical to enter two long numbers every time you want to identify a task, HCl supports task aliases: - $ hcl alias xdev 1234 5678 - $ hcl @xdev Adding a new feature! + $ hcl alias tacodev 1234 5678 + $ hcl @tacodev Adding a new feature ### Starting a Timer with Initial Time @@ -61,14 +62,14 @@ You can also provide an initial time when starting a new timer. This can be expressed in floating-point or HH:MM. The following two commands are equivalent: - $ hcl @xdev +0:15 Adding a new feature! - $ hcl +.25 @xdev Adding a new feature! + $ hcl @tacodev +0:15 Doing some stuff + $ hcl +.25 @tacodev Doing some stuff ### Adding Notes to a Running Task While a task is running you can append lines to the task notes: - $ hcl note Found a good time! + $ hcl note Then I did something else ### Stopping a Timer @@ -76,7 +77,7 @@ The following command will stop a running timer (currently only one timer at a time is supported). You can provide a message when stopping a timer as well: - $ hcl stop All done! + $ hcl stop All done doing things ### Resuming a Timer @@ -86,6 +87,16 @@ for that task: $ hcl resume $ hcl resume @xdev +### Canceling a Timer + +If you accidentally started a timer that you didn't mean to, you can cancel +it: + + $ hcl cancel + +This will delete the running timer, or the last-updated timer if one isn't +running. You can also use `nvm` or `oops` instead of `cancel`. + ### Date Formats Dates can be expressed in a variety of ways. See the [Chronic documentation][cd] @@ -114,3 +125,5 @@ See LICENSE for copyright details. [bricooke]: http://github.com/bricooke [scharfie]: http://github.com/scharfie + + @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/hcl.gemspec b/hcl.gemspec index 7805d69..4dcd2df 100644 --- a/hcl.gemspec +++ b/hcl.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = "hcl" - s.version = "0.4.2" + s.version = "0.4.3" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Zack Hobson"] diff --git a/lib/hcl/app.rb b/lib/hcl/app.rb index 6179d18..585ea79 100644 --- a/lib/hcl/app.rb +++ b/lib/hcl/app.rb @@ -31,7 +31,7 @@ class Net::HTTP end module HCl - VERSION = "0.4.2" + VERSION = "0.4.3" class App include HCl::Utility @@ -103,31 +103,34 @@ Commands: # show all available tasks hcl tasks - # set a task alias - hcl alias <task> <project_id> <task_id> + # create a task alias + hcl alias <task_alias> <project_id> <task_id> # list task aliases hcl aliases # start a task using an alias - hcl @<task> [+time] [message] + hcl [start] @<task_alias> [+<time>] [<message>] - # display the daily timesheet - hcl show [date] + # add a line to your running timer + hcl note <message> # stop a running timer - hcl stop [message] + hcl stop [<message>] - # resume the last stopped timer - hcl resume + # resume the last stopped timer or a specific task + hcl resume [@<task_alias>] - # add a line to your running timer - hcl note <message> + # delete the current or last running timer + hcl (cancel | oops | nvm) + + # display the daily timesheet + hcl [show [<date>]] Examples: hcl alias mytask 1234 4567 hcl @mytask +:15 Doing a thing that I started 15 minutes ago. - hcl Adding a note to my running task. + hcl note Adding a note to my running task. hcl stop That's enough for now. hcl resume hcl show yesterday |
