= Description
Big Bucks No Whammies (BBNW) will download your time usage from {Timesink}[http://manytricks.com/timesink/], Chrometa, or any other service/app that tracks application time usage, cross reference it with your commits to a git repository, and generate an invoice. This is useful for developers that are independent contractors.
If you don't have time usage statistics, BBNW can estimate how much each commit took by looking at the number of source changes per commit.
== Contributing to big_bucks_no_whammies
I'm assuming that you're a programmer. You're working for a client making the big bucks. You spend a ton of time in your favorite editor or maybe there's a couple of terminal sessions open.
So, I assume that you're tracking all of your activity on the computer. I'm currently using {Timesink.}[http://manytricks.com/timesink/]
With all of this hard work, eventually you commit these changes to a repository. I personally use git.
BBNW will consult {Timesink}[http://manytricks.com/timesink/] / Chrometa / etc, gather all of the time that you've accumulated using your favorite development applications, and then it will cross reference that activity with your git commits.
Finally, it will generate an invoice listing for each commit you've made along with the time used for each issue.
BBNW makes the assumption that all of the work done before the commit was specifically for that commit.
E.g.
Timesink csv report :
Pool,Application,Window,Foreground Begin (Unix Time),Foreground End (Unix Time)
,Finder,,1305084898.21,1305084902.27
,Firefox,"Screen_shot_2011-05-10_at_11.42.19_AM.png (PNG Image, 405x336 pixels)",1305084938.45,1305084939.47
,Firefox,localhost,1305084943.00,1305084946.04
,Microsoft Outlook,,1305084946.55,1305085092.49
,Microsoft Outlook,Inbox • MyCompany,1305084946.55,1305085092.49
,RubyMine,,1305085092.99,1305085279.06
,RubyMine,myproject - [/Users/jimjones/dev/myproject] - .../db/seeds.rb - JetBrains RubyMine 3.1.1,1305085092.99,1305085097.04
,RubyMine,myproject - [/Users/jimjones/dev/myproject] - .../app/views/mailers/_form.html.haml - JetBrains RubyMine 3.1.1,1305085097.55,1305085100.09
,RubyMine,myproject - [/Users/jimjones/dev/myproject] - .../app/views/mailers/edit.html.haml - JetBrains RubyMine 3.1.1,1305085100.59,1305085279.06
,Microsoft Outlook,,1305085279.56,1305085289.21
And then there's a commit in your git repository with the following :
commit 1b132d58af90af8c65738f9189eb7c8d7d29173c
Author: Jim Jones <jjones@aantix.com>
Date: Sun Apr 5 09:17:51 2011 -0700
Added facial recognition. No big deal.
In your invoice, you would see the following line item :
Description Unit Price Quantity Amount
Added facial recognition. No big deal. $100 1.5 hours $150
= Meetings, Activities, Phonecalls, Anything that isn't recorded by Timesink
You can programmatically adds meetings/tasks to your invoice.
invoice.meeting("Progress Review", "#{meeting_date.strftime("%d/%m/%Y")} 8:30:00","#{meeting_date.strftime("%d/%m/%Y")} 9:30:00")
invoice.task("Answered support phone call", "04/05/2011 8:30:00","04/05/2011 8:37:00")
= Extending BBNW
For activity data, BBNW supports Chrometa, TimeSink and a generic CSV adapter. There's a Git repository adapater. But if you use another time tracker (e.g. Time Sink, Freshbooks, Freckle, etc), nothing would prevent you from writing your own activity adapter.
== Sample Usages
If you want to cross reference your recorded activities with your Git commits, do the following :
company = ['123 Easy St', 'San Francisco, CA 94132','','(505) 555-5575','jjones@aantix.com']
bill_to = ['The Software Corp','100 Microsoft Drive, Suite 150','San Francisco, CA 94105']
start_date = Date.today - 365
end_date = Date.today
activities = BBNW::TimeSink.new('~/Dropbox/time_reports/2011-07-29.csv', start_date, end_date, true)
#activities = BBNW::CsvFile.new('~/Dropbox/time_sink_report.csv', [1,3,4], true)
#activities = BBNW::Chrometa.new('jjones@example.com', '643e011b0532dfD1gjhuytyu0bc96f4058rffa', nil, nil, start_date, end_date, true)
git = BBNW::GitRepos.new('~/dev/turkee', nil, start_date, end_date, true)
invoice = BBNW::Invoice.new
invoice.line_items(activities, git, BBNW::RecordedActivity, false) # No grouping of line items
invoice.generate(invoice_num, invoice_path, company_logo, company_name, company_details, rate_per_hour)
Or if you don't have your activities recorded and would just like to generate a line itemed invoice from Git commits with the time estimated for each commit you can do the following :
git = BBNW::GitRepos.new('~/Projects/turkee', nil, start_date, end_date, true)
invoice = BBNW::Invoice.new
invoice.line_items(80, git, BBNW::NumberOfSourceCommits)
invoice.generate(invoice_num, './logo.png', 'Jim Jones', company, bill_to, 250, start_date, end_date)
== Copyright
Copyright (c) 2011 Jim Jones. See LICENSE.txt for
further details.