glass

command module
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2015 License: MPL-2.0 Imports: 4 Imported by: 0

README

Timeglass

Timeglass Screenshot

Fully automated time tracking for Git repositories. It uses hooks and file monitoring to make sure you'll never forget to start or stop your timer ever again. It is written in Go and runs 100% on your own workstation: no internet or account registration required.

Features:

  • The timer automatically starts when you switch to a (new) branch using git checkout
  • The timer automatically pauses when it doesn't detect any file activity for a while
  • The time you spent is automatically added to the next git commit
  • The timer increments in discreet steps: the minimal billable unit (MBU), by default this is 1m.
  • Spent time is stored as metadata using git-notes and pushed automatically

Currently Supported:

  • Platforms: OSX, Linux and Windows
  • Version Control: Git

Getting Started

  1. Download the latest release for your platform and unzip the contents into a directory that is in your systems PATH (e.g /usr/local/bin).

Note 1: We currently only support 64-bit prebuild binaries, for other architectures please build from source (see below).
Note 2: For Windows, the documentation assumes you're using Git through a bash-like CLI but nothing about the implementation prevents you from using another approach.

  1. Use your terminal to navigate to the repository that contains the project you would like to track and install the hooks:
cd ~/my-git-project
glass init

NOTE: you'll have to run this once per clone

  1. Start the timer by creating a new branch:
git checkout -b "testing_timeglass"
  1. Edit some files, get a coffee, and commit in order to register the time you spent:
git add -A
git commit -m "time flies when you're having fun"
  1. Verify that the time was indeed registered correctly by looking at your commit log:
git log -n 1

What's Next?

Now you know how to measure the time you are spending on each commit, you might want to learn more about...

And ofcourse, you'll always have the options to uninstall:

Building from Source

First, you'll need install the go toolchain, instructions are here. With Go installed you can simply run go get for both binaries:

go get -u github.com/timeglass/glass
go get -u github.com/timeglass/glass/glass-daemon

The source code will now be in your workspace and binaries are found in $GOPATH/bin, happy hacking!

Roadmap, input welcome!

  • Supporting Other VCS: Timeglass currently only works for git repositories, mainly due to the number of hooks it provides. What other version control systems would you like to see implemented? Input welcome here

Known Issues

  • Handling git stash: Git has the ability to stash work for a later commit prior to switching branches. Currently the timer unable to detect this; adding extra time to next commit. Input welcome here
  • OS Restarts: Whenever the OS shuts down the repository might still contain uncommited work and a running timer, currently the timer is not restarted when this happens. Input on how to achieve this is welcome here
  • Network Volumes: Projects that are kept on network volumes (e.g using NFS) are known to have flaky support for file monitoring, especially on Linux (using inotify). This means automatic unpausing of the timer when editing a file might be broken in such projects. I'm looking for cases that experience such problem, or other information that might be of help over here

Contributors

in alphabetical order:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
_vendor
github.com/boltdb/bolt
Package bolt implements a low-level key/value store in pure Go.
Package bolt implements a low-level key/value store in pure Go.
github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
github.com/go-fsnotify/fsevents
Package fsevents provides file system notifications on OS X.
Package fsevents provides file system notifications on OS X.
github.com/go-fsnotify/fsnotify
Package fsnotify provides a platform-independent interface for file system notifications.
Package fsnotify provides a platform-independent interface for file system notifications.
github.com/hashicorp/errwrap
Package errwrap implements methods to formalize error wrapping in Go.
Package errwrap implements methods to formalize error wrapping in Go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL