glass

command module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 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 make any file changes in the repository
  • 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 1 minute.
  • Spent time is stored as metadata using git-notes and can be pushed and stored automatically to any remote repository (e.g Github)

Currently Supported:

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

Getting Started

  1. Download and install the latest release using any one of your preferred methods:

    1. Automatic installers for 64bit OSX and Windows
    2. Manual installion with 64bit precompiled Binaries for OSX, Linux and Windows
    3. Manual installion by building from source for all other architectures

Note: 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 then initiate Timeglass:
cd ~/my-git-project
glass init

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

  1. The timer starts right away but will pause soon unless it detects file activity or the checkout of a branch:
# see if the timer is running or paused:
glass status

# the timer keeps running while there is file activity
echo "pretending to work..." > ./my_file.go
  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 --show-notes=time-spent

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:

Roadmap, input welcome!

  • Supporting Other VCS: Timeglass currently only works for git repositories, mainly due to the number of hooks it requires. 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
  • Network Volumes: Projects that are kept on network volumes (e.g using NFS) are known to have flaky support for file monitoring. This means timers might error on reboot as network drives weren't available, or the automatic unpausing of the timer 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/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/hashicorp/errwrap
Package errwrap implements methods to formalize error wrapping in Go.
Package errwrap implements methods to formalize error wrapping in Go.
github.com/imdario/mergo
Package mergo merges same-type structs and maps by setting default values in zero-value fields.
Package mergo merges same-type structs and maps by setting default values in zero-value fields.
github.com/kardianos/osext
Extensions to the standard "os" package.
Extensions to the standard "os" package.
github.com/kardianos/service
Package service provides a simple way to create a system service.
Package service provides a simple way to create a system service.
github.com/kardianos/service/example/logging
Simple service that only works by printing a log message every few seconds.
Simple service that only works by printing a log message every few seconds.
github.com/kardianos/service/example/runner
Simple service that only works by printing a log message every few seconds.
Simple service that only works by printing a log message every few seconds.
github.com/kardianos/service/example/simple
simple does nothing except block while running the service.
simple does nothing except block while running the service.
github.com/kardianos/service/example/stopPause
simple does nothing except block while running the service.
simple does nothing except block while running the service.
github.com/mattn/go-isatty
Package isatty implements interface to isatty
Package isatty implements interface to isatty
golang.org/x/sys/unix
Package unix contains an interface to the low-level operating system primitives.
Package unix contains an interface to the low-level operating system primitives.
golang.org/x/sys/windows/registry
Package registry provides access to the Windows registry.
Package registry provides access to the Windows registry.
golang.org/x/sys/windows/svc
Package svc provides everything required to build Windows service.
Package svc provides everything required to build Windows service.
golang.org/x/sys/windows/svc/debug
Package debug provides facilities to execute svc.Handler on console.
Package debug provides facilities to execute svc.Handler on console.
golang.org/x/sys/windows/svc/eventlog
Package eventlog implements access to Windows event log.
Package eventlog implements access to Windows event log.
golang.org/x/sys/windows/svc/example
Example service program that beeps.
Example service program that beeps.
golang.org/x/sys/windows/svc/mgr
Package mgr can be used to manage Windows service programs.
Package mgr can be used to manage Windows service programs.

Jump to

Keyboard shortcuts

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