Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis. A gem that uses your git commits to manage a Freshbooks timesheet
As an extension to my git-based timesheet I wrote about at the beginning of the year, I went ahead and setup a self contained gem with some additional features. The gem, mytime, can be found at: rubygems.org/gems/mytime as well as github.com/davidstump/mytime for your browsing pleasure.
The mytime gem uses your git commit history, in the same manner as the timesheet alias did, to pull a log of your daily activities. Once you have this daily history, you can tell mytime to ‘push’ all of your commits as a timesheet log to Freshbooks using their API. Additionally, you can ‘submit’ custom timesheet entries to Freshbooks as needed.
Use your git commit history to track your time. Uses Freshbooks API.
Add this line to your application’s Gemfile:
And then execute:
Or install it yourself as:
$ gem install mytime
To link to your Freshbooks account (you will need your Freshbooks username and API token):
$ mytime setup
To initialize mytime in a project directory:
$ mytime init
To see project details:
$ mytime project
To list log:
$ mytime status
To submit custom time entry:
$ mytime commit [hrs] [custom_message] $ mytime commit 1.5 "Add an additional note if desired"
To push your git logs from today for a given project:
$ mytime push [hrs] $ mytime push 4.5
I would love some feedback and/or pull requests to extend this little gem to include other timesheets, features, etc. I made this to help myself keep track of my daily commits per project, but hopefully it helps out a few others along the way. Thanks for reading!