2 # Copyright (c) 2007 Heikki Hokkanen <hoxu@users.sf.net>
13 GNUPLOT_COMMON
= 'set terminal png transparent\nset size 0.5,0.5\n'
15 def getoutput(cmd
, quiet
= False):
18 output
= commands
.getoutput(cmd
)
21 def getkeyssortedbyvalues(dict):
22 return map(lambda el
: el
[1], sorted(map(lambda el
: (el
[1], el
[0]), dict.items())))
24 # TODO getdictkeyssortedbyvaluekey(dict, key) - eg. dict['author'] = { 'commits' : 512 } - ...key(dict, 'commits')
27 """Manages data collection from a revision control repository."""
29 self
.stamp_created
= time
.time()
33 # This should be the main function to extract data from the repository.
34 def collect(self
, dir):
38 # : get a dictionary of author
39 def getAuthorInfo(self
, author
):
42 def getActivityByDayOfWeek(self
):
45 def getActivityByHourOfDay(self
):
49 # Get a list of authors
53 def getFirstCommitDate(self
):
54 return datetime
.datetime
.now()
56 def getLastCommitDate(self
):
57 return datetime
.datetime
.now()
59 def getStampCreated(self
):
60 return self
.stamp_created
65 def getTotalAuthors(self
):
68 def getTotalCommits(self
):
71 def getTotalFiles(self
):
74 def getTotalLOC(self
):
77 class GitDataCollector(DataCollector
):
78 def collect(self
, dir):
79 DataCollector
.collect(self
, dir)
81 self
.total_authors
= int(getoutput('git-log |git-shortlog -s |wc -l'))
82 self
.total_commits
= int(getoutput('git-rev-list HEAD |wc -l'))
83 self
.total_files
= int(getoutput('git-ls-files |wc -l'))
84 self
.total_lines
= int(getoutput('git-ls-files -z |xargs -0 cat |wc -l'))
86 self
.activity_by_hour_of_day
= {} # hour -> commits
87 self
.activity_by_day_of_week
= {} # day -> commits
88 self
.activity_by_month_of_year
= {} # month [1-12] -> commits
89 self
.activity_by_hour_of_week
= {} # weekday -> hour -> commits
91 self
.authors
= {} # name -> {commits, first_commit_stamp, last_commit_stamp}
94 self
.author_of_month
= {} # month -> author -> commits
95 self
.author_of_year
= {} # year -> author -> commits
96 self
.commits_by_month
= {} # month -> commits
97 self
.commits_by_year
= {} # year -> commits
98 self
.first_commit_stamp
= 0
99 self
.last_commit_stamp
= 0
103 lines
= getoutput('git-show-ref --tags').split('\n')
107 (hash, tag
) = line
.split(' ')
108 tag
= tag
.replace('refs/tags/', '')
109 output
= getoutput('git-log "%s" --pretty=format:"%%at %%an" -n 1' % hash)
111 parts
= output
.split(' ')
114 stamp
= int(parts
[0])
117 self
.tags
[tag
] = { 'stamp': stamp
, 'hash' : hash, 'date' : datetime
.datetime
.fromtimestamp(stamp
).strftime('%Y-%m-%d') }
120 # Collect revision statistics
121 # Outputs "<stamp> <author>"
122 lines
= getoutput('git-rev-list --pretty=format:"%at %an" HEAD |grep -v ^commit').split('\n')
124 # linux-2.6 says "<unknown>" for one line O_o
125 parts
= line
.split(' ')
128 stamp
= int(parts
[0])
132 author
= ' '.join(parts
[1:])
133 date
= datetime
.datetime
.fromtimestamp(float(stamp
))
135 # First and last commit stamp
136 if self
.last_commit_stamp
== 0:
137 self
.last_commit_stamp
= stamp
138 self
.first_commit_stamp
= stamp
143 if hour
in self
.activity_by_hour_of_day
:
144 self
.activity_by_hour_of_day
[hour
] += 1
146 self
.activity_by_hour_of_day
[hour
] = 1
150 if day
in self
.activity_by_day_of_week
:
151 self
.activity_by_day_of_week
[day
] += 1
153 self
.activity_by_day_of_week
[day
] = 1
156 if day
not in self
.activity_by_hour_of_week
:
157 self
.activity_by_hour_of_week
[day
] = {}
158 if hour
not in self
.activity_by_hour_of_week
[day
]:
159 self
.activity_by_hour_of_week
[day
][hour
] = 1
161 self
.activity_by_hour_of_week
[day
][hour
] += 1
165 if month
in self
.activity_by_month_of_year
:
166 self
.activity_by_month_of_year
[month
] += 1
168 self
.activity_by_month_of_year
[month
] = 1
171 if author
not in self
.authors
:
172 self
.authors
[author
] = {}
174 if 'last_commit_stamp' not in self
.authors
[author
]:
175 self
.authors
[author
]['last_commit_stamp'] = stamp
176 self
.authors
[author
]['first_commit_stamp'] = stamp
177 if 'commits' in self
.authors
[author
]:
178 self
.authors
[author
]['commits'] += 1
180 self
.authors
[author
]['commits'] = 1
182 # author of the month/year
183 yymm
= datetime
.datetime
.fromtimestamp(stamp
).strftime('%Y-%m')
184 if yymm
in self
.author_of_month
:
185 if author
in self
.author_of_month
[yymm
]:
186 self
.author_of_month
[yymm
][author
] += 1
188 self
.author_of_month
[yymm
][author
] = 1
190 self
.author_of_month
[yymm
] = {}
191 self
.author_of_month
[yymm
][author
] = 1
192 if yymm
in self
.commits_by_month
:
193 self
.commits_by_month
[yymm
] += 1
195 self
.commits_by_month
[yymm
] = 1
197 yy
= datetime
.datetime
.fromtimestamp(stamp
).year
198 if yy
in self
.author_of_year
:
199 if author
in self
.author_of_year
[yy
]:
200 self
.author_of_year
[yy
][author
] += 1
202 self
.author_of_year
[yy
][author
] = 1
204 self
.author_of_year
[yy
] = {}
205 self
.author_of_year
[yy
][author
] = 1
206 if yy
in self
.commits_by_year
:
207 self
.commits_by_year
[yy
] += 1
209 self
.commits_by_year
[yy
] = 1
211 # outputs "<stamp> <files>" for each revision
212 self
.files_by_stamp
= {} # stamp -> files
213 lines
= getoutput('git-rev-list --pretty=format:"%at %H" HEAD |grep -v ^commit |while read line; do set $line; echo "$1 $(git-ls-tree -r "$2" |wc -l)"; done').split('\n')
215 parts
= line
.split(' ')
218 (stamp
, files
) = parts
[0:2]
219 self
.files_by_stamp
[int(stamp
)] = int(files
)
222 self
.extensions
= {} # extension -> files, lines
223 lines
= getoutput('git-ls-files').split('\n')
225 base
= os
.path
.basename(line
)
226 if base
.find('.') == -1:
229 ext
= base
[(base
.rfind('.') + 1):]
231 if ext
not in self
.extensions
:
232 self
.extensions
[ext
] = {'files': 0, 'lines': 0}
234 self
.extensions
[ext
]['files'] += 1
236 # FIXME filenames with spaces or special characters are broken
237 self
.extensions
[ext
]['lines'] += int(getoutput('wc -l < %s' % line
, quiet
= True))
239 print 'Warning: Could not count lines for file "%s"' % line
244 # N files changed, N insertions (+), N deletions(-)
245 self
.changes_by_date
= {} # stamp -> { files, ins, del }
246 lines
= getoutput('git-log --shortstat --pretty=format:"%at %an"').split('\n')
247 # TODO |tac this and go it through in reverse, to calculate total lines in each rev?
252 if line
.find(',') == -1:
254 (stamp
, author
) = (line
[:pos
], line
[pos
+1:])
256 numbers
= re
.findall('\d+', line
)
257 if len(numbers
) == 3:
258 (files
, inserted
, deleted
) = numbers
260 print 'Warning: failed to handle line "%s"' % line
261 (files
, inserted
, deleted
) = (0, 0, 0)
262 self
.changes_by_date
[stamp
] = { 'files': files
, 'ins': inserted
, 'del': deleted
}
264 def getActivityByDayOfWeek(self
):
265 return self
.activity_by_day_of_week
267 def getActivityByHourOfDay(self
):
268 return self
.activity_by_hour_of_day
270 def getAuthorInfo(self
, author
):
271 a
= self
.authors
[author
]
273 commits
= a
['commits']
274 commits_frac
= (100 * float(commits
)) / self
.getTotalCommits()
275 date_first
= datetime
.datetime
.fromtimestamp(a
['first_commit_stamp'])
276 date_last
= datetime
.datetime
.fromtimestamp(a
['last_commit_stamp'])
277 delta
= date_last
- date_first
279 res
= { 'commits': commits
, 'commits_frac': commits_frac
, 'date_first': date_first
.strftime('%Y-%m-%d'), 'date_last': date_last
.strftime('%Y-%m-%d'), 'timedelta' : delta
}
282 def getAuthors(self
):
283 return self
.authors
.keys()
285 def getFirstCommitDate(self
):
286 return datetime
.datetime
.fromtimestamp(self
.first_commit_stamp
)
288 def getLastCommitDate(self
):
289 return datetime
.datetime
.fromtimestamp(self
.last_commit_stamp
)
292 lines
= getoutput('git-show-ref --tags |cut -d/ -f3')
293 return lines
.split('\n')
295 def getTagDate(self
, tag
):
296 return self
.revToDate('tags/' + tag
)
298 def getTotalAuthors(self
):
299 return self
.total_authors
301 def getTotalCommits(self
):
302 return self
.total_commits
304 def getTotalFiles(self
):
305 return self
.total_files
307 def getTotalLOC(self
):
308 return self
.total_lines
310 def revToDate(self
, rev
):
311 stamp
= int(getoutput('git-log --pretty=format:%%at "%s" -n 1' % rev
))
312 return datetime
.datetime
.fromtimestamp(stamp
).strftime('%Y-%m-%d')
315 """Creates the actual report based on given data."""
319 def create(self
, data
, path
):
323 def html_linkify(text
):
324 return text
.lower().replace(' ', '_')
326 def html_header(level
, text
):
327 name
= html_linkify(text
)
328 return '\n<h%d><a href="#%s" name="%s">%s</a></h%d>\n\n' % (level
, name
, name
, text
, level
)
330 class HTMLReportCreator(ReportCreator
):
331 def create(self
, data
, path
):
332 ReportCreator
.create(self
, data
, path
)
334 # TODO copy the CSS if it does not exist
335 if not os
.path
.exists(path
+ '/gitstats.css'):
339 f
= open(path
+ "/index.html", 'w')
340 format
= '%Y-%m-%d %H:%m:%S'
343 f
.write('<h1>GitStats</h1>')
348 f
.write('<dt>Generated</dt><dd>%s (in %d seconds)</dd>' % (datetime
.datetime
.now().strftime(format
), time
.time() - data
.getStampCreated()));
349 f
.write('<dt>Report Period</dt><dd>%s to %s</dd>' % (data
.getFirstCommitDate().strftime(format
), data
.getLastCommitDate().strftime(format
)))
350 f
.write('<dt>Total Files</dt><dd>%s</dd>' % data
.getTotalFiles())
351 f
.write('<dt>Total Lines of Code</dt><dd>%s</dd>' % data
.getTotalLOC())
352 f
.write('<dt>Total Commits</dt><dd>%s</dd>' % data
.getTotalCommits())
353 f
.write('<dt>Authors</dt><dd>%s</dd>' % data
.getTotalAuthors())
356 f
.write('</body>\n</html>');
361 f
= open(path
+ '/activity.html', 'w')
363 f
.write('<h1>Activity</h1>')
366 #f.write('<h2>Last 30 days</h2>')
368 #f.write('<h2>Last 12 months</h2>')
371 f
.write(html_header(2, 'Hour of Day'))
372 hour_of_day
= data
.getActivityByHourOfDay()
373 f
.write('<table><tr><th>Hour</th>')
374 for i
in range(1, 25):
375 f
.write('<th>%d</th>' % i
)
376 f
.write('</tr>\n<tr><th>Commits</th>')
377 fp
= open(path
+ '/hour_of_day.dat', 'w')
378 for i
in range(0, 24):
380 f
.write('<td>%d</td>' % hour_of_day
[i
])
381 fp
.write('%d %d\n' % (i
, hour_of_day
[i
]))
383 f
.write('<td>0</td>')
384 fp
.write('%d 0\n' % i
)
386 f
.write('</tr>\n<tr><th>%</th>')
387 totalcommits
= data
.getTotalCommits()
388 for i
in range(0, 24):
390 f
.write('<td>%.2f</td>' % ((100.0 * hour_of_day
[i
]) / totalcommits
))
392 f
.write('<td>0.00</td>')
393 f
.write('</tr></table>')
394 f
.write('<img src="hour_of_day.png" alt="Hour of Day" />')
395 fg
= open(path
+ '/hour_of_day.dat', 'w')
396 for i
in range(0, 24):
398 fg
.write('%d %d\n' % (i
+ 1, hour_of_day
[i
]))
400 fg
.write('%d 0\n' % (i
+ 1))
404 f
.write(html_header(2, 'Day of Week'))
405 day_of_week
= data
.getActivityByDayOfWeek()
406 f
.write('<div class="vtable"><table>')
407 f
.write('<tr><th>Day</th><th>Total (%)</th></tr>')
408 fp
= open(path
+ '/day_of_week.dat', 'w')
409 for d
in range(0, 7):
410 fp
.write('%d %d\n' % (d
+ 1, day_of_week
[d
]))
412 f
.write('<th>%d</th>' % (d
+ 1))
414 f
.write('<td>%d (%.2f%%)</td>' % (day_of_week
[d
], (100.0 * day_of_week
[d
]) / totalcommits
))
416 f
.write('<td>0</td>')
418 f
.write('</table></div>')
419 f
.write('<img src="day_of_week.png" alt="Day of Week" />')
423 f
.write(html_header(2, 'Hour of Week'))
426 f
.write('<tr><th>Weekday</th>')
427 for hour
in range(0, 24):
428 f
.write('<th>%d</th>' % (hour
+ 1))
431 for weekday
in range(0, 7):
432 f
.write('<tr><th>%d</th>' % (weekday
+ 1))
433 for hour
in range(0, 24):
435 commits
= data
.activity_by_hour_of_week
[weekday
][hour
]
439 f
.write('<td>%d</td>' % commits
)
447 f
.write(html_header(2, 'Month of Year'))
448 f
.write('<div class="vtable"><table>')
449 f
.write('<tr><th>Month</th><th>Commits (%)</th></tr>')
450 fp
= open (path
+ '/month_of_year.dat', 'w')
451 for mm
in range(1, 13):
453 if mm
in data
.activity_by_month_of_year
:
454 commits
= data
.activity_by_month_of_year
[mm
]
455 f
.write('<tr><td>%d</td><td>%d (%.2f %%)</td></tr>' % (mm
, commits
, (100.0 * commits
) / data
.getTotalCommits()))
456 fp
.write('%d %d\n' % (mm
, commits
))
458 f
.write('</table></div>')
459 f
.write('<img src="month_of_year.png" alt="Month of Year" />')
461 # Commits by year/month
462 f
.write(html_header(2, 'Commits by year/month'))
463 f
.write('<div class="vtable"><table><tr><th>Month</th><th>Commits</th></tr>')
464 for yymm
in reversed(sorted(data
.commits_by_month
.keys())):
465 f
.write('<tr><td>%s</td><td>%d</td></tr>' % (yymm
, data
.commits_by_month
[yymm
]))
466 f
.write('</table></div>')
467 f
.write('<img src="commits_by_year_month.png" alt="Commits by year/month" />')
468 fg
= open(path
+ '/commits_by_year_month.dat', 'w')
469 for yymm
in sorted(data
.commits_by_month
.keys()):
470 fg
.write('%s %s\n' % (yymm
, data
.commits_by_month
[yymm
]))
474 f
.write(html_header(2, 'Commits by Year'))
475 f
.write('<div class="vtable"><table><tr><th>Year</th><th>Commits (% of all)</th></tr>')
476 for yy
in reversed(sorted(data
.commits_by_year
.keys())):
477 f
.write('<tr><td>%s</td><td>%d (%.2f%%)</td></tr>' % (yy
, data
.commits_by_year
[yy
], (100.0 * data
.commits_by_year
[yy
]) / data
.getTotalCommits()))
478 f
.write('</table></div>')
479 f
.write('<img src="commits_by_year.png" alt="Commits by Year" />')
480 fg
= open(path
+ '/commits_by_year.dat', 'w')
481 for yy
in sorted(data
.commits_by_year
.keys()):
482 fg
.write('%d %d\n' % (yy
, data
.commits_by_year
[yy
]))
485 f
.write('</body></html>')
490 f
= open(path
+ '/authors.html', 'w')
493 f
.write('<h1>Authors</h1>')
496 # Authors :: List of authors
497 f
.write(html_header(2, 'List of Authors'))
499 f
.write('<table class="authors">')
500 f
.write('<tr><th>Author</th><th>Commits (%)</th><th>First commit</th><th>Last commit</th><th>Age</th></tr>')
501 for author
in sorted(data
.getAuthors()):
502 info
= data
.getAuthorInfo(author
)
503 f
.write('<tr><td>%s</td><td>%d (%.2f%%)</td><td>%s</td><td>%s</td><td>%s</td></tr>' % (author
, info
['commits'], info
['commits_frac'], info
['date_first'], info
['date_last'], info
['timedelta']))
506 # Authors :: Author of Month
507 f
.write(html_header(2, 'Author of Month'))
509 f
.write('<tr><th>Month</th><th>Author</th><th>Commits (%)</th></tr>')
510 for yymm
in reversed(sorted(data
.author_of_month
.keys())):
511 authordict
= data
.author_of_month
[yymm
]
512 authors
= getkeyssortedbyvalues(authordict
)
514 commits
= data
.author_of_month
[yymm
][authors
[0]]
515 f
.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td></tr>' % (yymm
, authors
[0], commits
, (100 * commits
) / data
.commits_by_month
[yymm
], data
.commits_by_month
[yymm
]))
519 f
.write(html_header(2, 'Author of Year'))
520 f
.write('<table><tr><th>Year</th><th>Author</th><th>Commits (%)</th></tr>')
521 for yy
in reversed(sorted(data
.author_of_year
.keys())):
522 authordict
= data
.author_of_year
[yy
]
523 authors
= getkeyssortedbyvalues(authordict
)
525 commits
= data
.author_of_year
[yy
][authors
[0]]
526 f
.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td></tr>' % (yy
, authors
[0], commits
, (100 * commits
) / data
.commits_by_year
[yy
], data
.commits_by_year
[yy
]))
529 f
.write('</body></html>')
534 f
= open(path
+ '/files.html', 'w')
536 f
.write('<h1>Files</h1>')
540 f
.write('<dt>Total files</dt><dd>%d</dd>' % data
.getTotalFiles())
541 f
.write('<dt>Total lines</dt><dd>%d</dd>' % data
.getTotalLOC())
542 f
.write('<dt>Average file size</dt><dd>%.2f bytes</dd>' % ((100.0 * data
.getTotalLOC()) / data
.getTotalFiles()))
545 # Files :: File count by date
546 f
.write(html_header(2, 'File count by date'))
548 fg
= open(path
+ '/files_by_date.dat', 'w')
549 for stamp
in sorted(data
.files_by_stamp
.keys()):
550 fg
.write('%s %d\n' % (datetime
.datetime
.fromtimestamp(stamp
).strftime('%Y-%m-%d'), data
.files_by_stamp
[stamp
]))
553 f
.write('<img src="files_by_date.png" alt="Files by Date" />')
555 #f.write('<h2>Average file size by date</h2>')
557 # Files :: Extensions
558 f
.write(html_header(2, 'Extensions'))
559 f
.write('<table><tr><th>Extension</th><th>Files (%)</th><th>Lines (%)</th><th>Lines/file</th></tr>')
560 for ext
in sorted(data
.extensions
.keys()):
561 files
= data
.extensions
[ext
]['files']
562 lines
= data
.extensions
[ext
]['lines']
563 f
.write('<tr><td>%s</td><td>%d (%.2f%%)</td><td>%d (%.2f%%)</td><td>%d</td></tr>' % (ext
, files
, (100.0 * files
) / data
.getTotalFiles(), lines
, (100.0 * lines
) / data
.getTotalLOC(), lines
/ files
))
566 f
.write('</body></html>')
571 f
= open(path
+ '/lines.html', 'w')
573 f
.write('<h1>Lines</h1>')
577 f
.write('<dt>Total lines</dt><dd>%d</dd>' % data
.getTotalLOC())
580 f
.write('</body></html>')
585 f
= open(path
+ '/tags.html', 'w')
587 f
.write('<h1>Tags</h1>')
591 f
.write('<dt>Total tags</dt><dd>%d</dd>' % len(data
.tags
))
592 if len(data
.tags
) > 0:
593 f
.write('<dt>Average commits per tag</dt><dd>%.2f</dd>' % (data
.getTotalCommits() / len(data
.tags
)))
597 f
.write('<tr><th>Name</th><th>Date</th></tr>')
598 # sort the tags by date desc
599 tags_sorted_by_date_desc
= map(lambda el
: el
[1], reversed(sorted(map(lambda el
: (el
[1]['date'], el
[0]), data
.tags
.items()))))
600 for tag
in tags_sorted_by_date_desc
:
601 f
.write('<tr><td>%s</td><td>%s</td></tr>' % (tag
, data
.tags
[tag
]['date']))
604 f
.write('</body></html>')
607 self
.createGraphs(path
)
610 def createGraphs(self
, path
):
611 print 'Generating graphs...'
614 f
= open(path
+ '/hour_of_day.plot', 'w')
615 f
.write(GNUPLOT_COMMON
)
618 set output 'hour_of_day.png'
620 set xrange [0.5:24.5]
623 plot 'hour_of_day.dat' using 1:2:(0.5) w boxes fs solid
628 f
= open(path
+ '/day_of_week.plot', 'w')
629 f
.write(GNUPLOT_COMMON
)
632 set output 'day_of_week.png'
637 plot 'day_of_week.dat' using 1:2:(0.5) w boxes fs solid
642 f
= open(path
+ '/month_of_year.plot', 'w')
643 f
.write(GNUPLOT_COMMON
)
646 set output 'month_of_year.png'
648 set xrange [0.5:12.5]
651 plot 'month_of_year.dat' using 1:2:(0.5) w boxes fs solid
655 # commits_by_year_month
656 f
= open(path
+ '/commits_by_year_month.plot', 'w')
657 f
.write(GNUPLOT_COMMON
)
660 set output 'commits_by_year_month.png'
665 set xtics rotate by 90 15768000
667 plot 'commits_by_year_month.dat' using 1:2:(0.5) w boxes fs solid
672 f
= open(path
+ '/commits_by_year.plot', 'w')
673 f
.write(GNUPLOT_COMMON
)
676 set output 'commits_by_year.png'
680 plot 'commits_by_year.dat' using 1:2:(0.5) w boxes fs solid
685 f
= open(path
+ '/files_by_date.plot', 'w')
686 f
.write(GNUPLOT_COMMON
)
689 set output 'files_by_date.png'
692 set timefmt "%Y-%m-%d"
693 set format x "%Y-%m-%d"
695 set xtics rotate by 90
696 plot 'files_by_date.dat' using 1:2 smooth csplines
701 files
= glob
.glob(path
+ '/*.plot')
703 print '>> gnuplot %s' % os
.path
.basename(f
)
704 os
.system('gnuplot %s' % f
)
706 def printHeader(self
, f
):
708 """<?xml version="1.0" encoding="UTF-8"?>
709 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
710 <html xmlns="http://www.w3.org/1999/xhtml">
712 <title>GitStats</title>
713 <link rel="stylesheet" href="gitstats.css" type="text/css" />
714 <meta name="generator" content="GitStats" />
719 def printNav(self
, f
):
723 <li><a href="index.html">General</a></li>
724 <li><a href="activity.html">Activity</a></li>
725 <li><a href="authors.html">Authors</a></li>
726 <li><a href="files.html">Files</a></li>
727 <li><a href="lines.html">Lines</a></li>
728 <li><a href="tags.html">Tags</a></li>
735 Usage: gitstats [options] <gitpath> <outputpath>
740 if len(sys
.argv
) < 3:
744 gitpath
= sys
.argv
[1]
745 outputpath
= os
.path
.abspath(sys
.argv
[2])
748 os
.makedirs(outputpath
)
751 if not os
.path
.isdir(outputpath
):
752 print 'FATAL: Output path is not a directory or does not exist'
755 print 'Git path: %s' % gitpath
756 print 'Output path: %s' % outputpath
760 print 'Collecting data...'
761 data
= GitDataCollector()
762 data
.collect(gitpath
)
764 print 'Generating report...'
765 report
= HTMLReportCreator()
766 report
.create(data
, outputpath
)