Skip to content

Commit

Permalink
total column
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@355 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Oct 16, 2008
1 parent 1f5797c commit 5c9abcd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions topics/presentation/metrics/xbgfover.py
Expand Up @@ -29,12 +29,14 @@ def noi(filename):

def report(keys,key,note):
print note,
cx = 0
for x in keys:
cx += results[key][x]
if results[key][x]:
print '&',results[key][x],
else:
print '& ---',
print '\\\\'
print '&'+`cx`+'\\\\'

if __name__ == "__main__":
if len(sys.argv) != 4:
Expand Down Expand Up @@ -83,15 +85,17 @@ def report(keys,key,note):
names.remove(x)
sorted = targets.keys()[:]
sorted.sort()
print '\\begin{tabular}{l|'+('c|'*len(targets))+'}'
print '\\begin{tabular}{l|'+('c|'*len(targets))+'|c}'
for x in sorted:
print '&\\textbf{'+x+'}',
print '\\\\\\hline'
print '&\\textbf{Total}\\\\\\hline'
report(sorted,'LOC','\\numberOfLines')
print '\\numberOfSteps',
cx = 0
for x in sorted:
cx += len(targets[x])
print '&',len(targets[x]),
print '\\\\'
print '&'+`cx`+'\\\\'
report(sorted,'NOI','\\numberOfIssues')
report(sorted,'NOX','\\numberOfTransformations')
print '\\hline'
Expand Down

0 comments on commit 5c9abcd

Please sign in to comment.