Skip to content

Latest commit

 

History

History
72 lines (37 loc) · 2.26 KB

README.md

File metadata and controls

72 lines (37 loc) · 2.26 KB

ti

Simple command-line timer. Doesn't do much by itself, but is extensible via plugins.

Usage

On the command line run:

ti <project> <task description>

Example:

ti Outbox Build amazing stuff

To exit, simply kill the process.

Plugins

Place scripts on the plugins folder which will be loaded automatically by ti.

The plugins folder can be especified with the TI_PLUGINS_DIR environment variable and defaults to ~/.ti.

Example plugins

console: Outputs passing minutes on stdout.

curl https://raw.github.com/federomero/ti-plugins/master/console.rb > ~/.ti/console.rb

reviewer: Allows to review time entries before finishing.

curl https://raw.github.com/federomero/ti-plugins/master/reviewer.rb > ~/.ti/reviewer.rb

ledger: Outputs time entries in ledger's timelog format.

curl https://raw.github.com/federomero/ti-plugins/master/ledger.rb > ~/.ti/ledger.rb

git: Adds git commit messages to the task description.

curl https://raw.github.com/federomero/ti-plugins/master/git.rb > ~/.ti/git.rb

growl: Display growl notifications.

curl https://raw.github.com/federomero/ti-plugins/master/growl.rb > ~/.ti/growl.rb

terminal-notifier: Display mountain lion notifications. Requires terminal-notifier.

curl https://raw.github.com/federomero/ti-plugins/master/terminal-notifier.rb > ~/.ti/terminal-notifier.rb

API

Ti::Timer.every n { ... }

The block is executed every n minutes.

Example:

Ti::Timer.every 30 do
  puts "30 more minutes have passed working on #{Ti::Timer.task} (total: #{Ti::Timer.minutes})"
end

Ti::Timer.on :start { ... }

The block is executed when the time starts.

Ti::Timer.on :finish { ... }

The block is executed when the time ends.

License

MIT