Permalink
Browse files

added install script, updated time format to show day (hopefully)

  • Loading branch information...
michaelforrest committed Feb 6, 2012
1 parent 2e6406b commit 4733095251aaaadab4d835d65cf25428b61a840a
Showing with 5 additions and 1 deletion.
  1. +4 −0 Rakefile
  2. +1 −1 git-timesheet.rb
View
@@ -0,0 +1,4 @@
+desc "install"
+task :install do
+ `cp git-timesheet.rb /usr/local/bin/`
+end
View
@@ -31,7 +31,7 @@
log_lines = `git log --no-merges --simplify-merges --author="#{options[:author].gsub('"','\\"')}" --format="%ad %s <%h>" --date=iso --since="#{options[:since].gsub('"','\\"')}"`.split("\n")
day_entries = log_lines.inject({}) {|days, line|
timestamp = Time.parse line.slice!(0,25)
- day = timestamp.strftime("%Y-%m-%d")
+ day = timestamp.strftime("%E %Y-%m-%d")
days[day] ||= []
days[day] << timestamp.strftime("%H:%S ") + line.strip
days

0 comments on commit 4733095

Please sign in to comment.