timeglass / glass Goto Github PK
View Code? Open in Web Editor NEWAutomated time tracking for Git repositories. [DEPRECATED]
License: Mozilla Public License 2.0
Automated time tracking for Git repositories. [DEPRECATED]
License: Mozilla Public License 2.0
It doesn't add the time when I commit using https://www.sourcetreeapp.com/ this may also be true with other Git guis. It also does auto push when I push with SourceTree.
glass-daemon
is a main package but imported as a package in glass/command
.snow
is a dependency but the source build instructions don't specify thatIt would be nice if the README offered instructions for how to 'uninstall' timeglass from a repository.
Thanks :)
including configuring the minimal billable unit and ignoring certain directories. Discussion
@advanderveer If you are no longer interested in maintaining this project, could you add that to the readme? Also, may I suggest pointing to a list of maintained projects forked from this one?
For people looking for a maintained alternative, you might want to consider: https://github.com/git-time-metric/gtm
the docs says I can customize the configuration by adding a file timaglass.json
in the root of my git repo. This not only increase the pollution of boilerplate files but it's also very common that we want the same config in every repo we work on.
For example, mine's is like this:
{
"mbu": "1m",
"commit_message": "",
"auto_push": false
}
so, should I copy&paste this file each time I start a new project?
I propose a global editable file in ~/.config/timeglass/timeglass.json
.
the priority should be
After 4h work it showed on glass status 15m with timer paused. glass punch 4h didn't added the time to the commit message.
I don't wan't the timespent to be added to the commit message. Is it possible to acheve this? I tried "commit_message": ""
but that just made it add [0] to the commit message.
It seems the time spent is simply not added to the message
Git stash stores uncommited work, in similar fashion, uncommited time should also be stashed when this happens. Currently the timer just continues ticking and time is instead written to the next commit
Timeglass currently only works for git repositories, mainly due to the number of hooks it provides.
Now looks like:
2015/05/16 14:08:09 [Error]: No timer appears to be running for '/Users/advanderveer/Documents/Projects/go/src/github.com/advanderveer/timer': Daemon doesn't appears to be running.
2015/05/16 14:08:09 [Error]: No timer appears to be running for '/Users/advanderveer/Documents/Projects/go/src/github.com/advanderveer/timer': Daemon doesn't appears to be running.
First off, thank you for creating this. I suffer from adult ADD, and filling out timesheets is an emotional struggle for me. It normally takes me 20+ minutes to fill out a simple timesheet for the day, and today it took me 3 minutes. This is a piece of software that will improve my life literally every single workday. I greatly appreciate the fact that this is free and open source, because I restrict myself to only using free software since I believe it is a way to improve the world.
I feel very strongly about this project and would like to see it continue to be developed and expanded. It makes sense to me that there would be some sort of way for users to send you money. A simple PayPal email address would be fine, or whatever you see fit. Bitcoin also works if you're into that, but using that exclusively may prevent some people from donating.
Thank you!!
Some repositories run without a remote being present, this should not show:
Timeglass: hooks written
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
2015/06/14 22:10:01 [Timeglass Error]: Failed to pull time data: Failed to fetch from remote 'origin' using git command [fetch origin refs/notes/time-spent:refs/notes/time-spent]: exit status 128
I want to use timeglass on a linux system where I don't have root access (and so can't install to /var/lib/timeglass
). Any way to do this? It looks like the path is hard-coded in paths.go.
I develop in Xamarin, which likes to store build files along side the project files, during a long build my timer won't pause. At this point, I don't think a separate ignore file is needed, I imagine most people want to track time for only the files that will ultimately be committed.
I just encountered this issue where the timer stops at 2min no matter how much starting or stopping I do. Any recommendations or data I can provide you to better understand the bug?
Option to read timeglass.json
from user's home folder as a .timeglass.json
file.
For what its worth, here is a bug I ran into and my steps to resolve
I noticed that glass was no longer inserting time into my commits. When running glass status
I received No timer appears to be running for '/Users/...': Daemon doesn't appears to be running.
I ran glass start
and got the timer started message. However glass status
yielded the same error. glass stop
had no effect either
When I tried to start the daemon manually I received It appears another Daemon is already running or a previous instance didn't shutdown properly, use -force to force start.
running glass-daemon -force
and then terminating seems to have corrected the issue.
My team is very picky about having a clean commit history.
How hard would it be to have an option to write the logged times to a file instead of having the commit message?
I envision this file as being queryable to get the glass sum - just like we can do using "git log" or "git rev-list", or being available for retrieval so it can be processed by another tool.
Having intimate knowledge of both code commits and the time it took to create them opens up enormous potential for interesting data to be extracted. What would you like to query?
Currently time is tracked with a single timer for work across the entire repository, this has the fundamental flaw of making it impossible to correctly handle commits were the author only git add
partial work (lets say 2 of the 4 edited files).
A more elegant solution would be to track time per file and only extract spent-time from the files that are actually committed.
(see title)
Whenever the OS shutsdown the repository might still contain uncommited changes with associated time, currently the timer is not restarted in this case, in supporting this a time should persist data to a tmp location while running:
glass stop
should write its time to this place before quittingglass start
should continue from this state after being interrupted (unclean shutdown)or else make it obviouss this is OK
glass status
could give a summary of the activity that was observed in determining the measured time:
$> glass status
glass: first activity: juli 15th 09:20
glass: breaks:
glass: 10:30 (15min)
glass: 11:30 (1min)
glass: 12:30 (30min)
glass: last activity: juli 15th 16:30
glass: measured time: 5h10m
....
there are no git stash hooks so this will need some thinkering
It seems that you can double/triple time report when you work with multiple repositories simultaneously.
Timestamp 1
Repo A: status running
Repo B: status running
Timestamp 2
Repo A: status running
Repo B: status running
So in total you will get duration between Timestamp 1 and 2 for both Repo A and B. In other words 5 minutes of work will result in 10 minutes reported.
This depends on MBU, the lower it is the less overtracking you'll get.
Timeglass version 0.6.0 (20150705144337)
In Ubuntu, PPAs are the way to install and update software. Once it's set up the user can do something like this.
This installs the PPA and updates the package list:
$ sudo apt-add-repository https://some.service/timeglass/glass
$ sudo apt-get update
Then this installs the package:
$ sudo apt-get install glass
Then when new changes are detected in the PPA, they will be installed on the user's system.
If you've never done this, it's actually quite challenging. It requires reading a lot of unclear documentation and uses https://launchpad.net/ as the service. This requires you to upload your source code directly to the Launchpad servers, then the binaries and package files are built on the server. The configuration must be very precise.
An easier way is to use https://packagecloud.io/ which is closed source, but accepts pre-binary files as part of the package. This is what Slack uses to distribute on Linux. They offer a free public account as long as you don't host too much data, which I think you'll be fine with.
After using this for a few days, I feel like git messages become too cluttered with these time measurements.
I would like to keep the durations, but instead have them in the git message body.
This would also allow me to write longer commit messages.
When doing a multi line commit it would be nice to have the option to keep the time spent on the first line.
(On a side note, I feel guilty submitting so many issues and not contributing myself. Thanks so much for your work on this @advanderveer)
File monitoring is implemented differently across platforms. The current implementation uses FSEvents (OSX), let me know what other platforms you would like to see implemented
Is it possible to manually set the time of the currently active timer like glass punch
does it on the last commit? I love to see the commit time in the commit message, but punch
does not updates it.
I'm looking for cases in which the project is mounted on (network) volumes and block the usage of Timeglass
Some simple output to a log file somewhere would be nice so that I can verify I understand how glass is interpreting my behavior.
Lets turn this into an open-source project that motivates contribution:
To make it easier to switch to timeglass on existing projects make it possible to "guess" time already invested by looking at commit history
You should document how to uninstall glass and/or add a option which does it for you.
Homebrew - is the most popular community package manager for Mac OS X. It provides a CLI way to install things on this platform. It's handy for dotfiles.
It would be nice to have Timeglass home brewed.
Any thoughts about adding this to a package manager like Homebrew?
https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
Certainly could help increase exposure and ease of install/updates.
First of all, awesome project. I love the easy concept that you work with. I have one bug to report:
glass: 22:39:53 Writing version control hooks...
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x553b81]
goroutine 1 [running]:
github.com/timeglass/glass/vcs.(*Git).Hook(0xc20803c4b0, 0x0, 0x0)
/home/advanderveer/go/src/github.com/timeglass/glass/vcs/git.go:224 +0x1d1
github.com/timeglass/glass/command.(*Init).Run(0xc208044060, 0xc208056460, 0x0, 0x0)
/home/advanderveer/go/src/github.com/timeglass/glass/command/init.go:53 +0x235
github.com/timeglass/glass/command.*Init.Run·fm(0xc208056460, 0x0, 0x0)
/home/advanderveer/go/src/github.com/timeglass/glass/command/init.go:38 +0x43
github.com/timeglass/glass/command.func·001(0xc208056460)
/home/advanderveer/go/src/github.com/timeglass/glass/command/types.go:27 +0x16e
github.com/timeglass/glass/_vendor/github.com/codegangsta/cli.Command.Run(0x7ad250, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x814170, 0x2d, 0xc20807a360, ...)
/home/advanderveer/go/src/github.com/timeglass/glass/_vendor/github.com/codegangsta/cli/command.go:118 +0x104b
github.com/timeglass/glass/_vendor/github.com/codegangsta/cli.(*App).Run(0xc20807e000, 0xc20800a000, 0x2, 0x2, 0x0, 0x0)
/home/advanderveer/go/src/github.com/timeglass/glass/_vendor/github.com/codegangsta/cli/app.go:154 +0xd04
main.main()
/home/advanderveer/go/src/github.com/timeglass/glass/main.go:64 +0xb5d
goroutine 8 [syscall]:
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
/usr/local/go/src/os/signal/signal_unix.go:27 +0x35
This happens after installing the rc-service under se-linux on permissive mode.
It worked the first time, but it crashes on this nil dereference.
Maybe I've started two of them accidentally?
Cheers
rivanov
currently stops without getting the opportunity to write to its database
These commands currently overwrite previous measurements without any warning, maybe it should add/subtract form already registered time in the note instead?
Steps to replicate
Expected result: Error message saying you need to do this with sudo
Actual result: Partial install. The original install fails, but then trying to sudo install fails because some files already exist.
sudo glass uninstall followed by sudo glass install corrects the problem
Piers-MacBook-Air:dezeen-aa piersb$ glass install
glass: 11:36:55 Installing the Timeglass background service...
2016/05/09 11:36:55 Failed to create logger: open /Library/Timeglass/daemon.log: permission denied
glass: 11:36:55 Failed to install Daemon: exit status 1
Piers-MacBook-Air:dezeen-aa piersb$ sudo glass install
Password:
glass: 11:37:03 Installing the Timeglass background service...
2016/05/09 11:37:03 Failed to handle service control: Failed to install Timeglass: Init already exists: /Library/LaunchDaemons/com.timeglass.glass-daemon.plist
glass: 11:37:03 Failed to install Daemon: exit status 1
It is apparently quiet possible to turn the time-spend branch in a state that doesn't allow for fast forward
e.g: http://vmiklos.hu/blog/git-notes-merge.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.