Skip to content

Commit

Permalink
now using macros
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@354 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Oct 16, 2008
1 parent dd5817a commit 1f5797c
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions topics/presentation/metrics/xbgfover.py
Expand Up @@ -27,9 +27,9 @@ def noi(filename):
f.close()
return c

def report(key,note):
print note+':',
for x in targets.keys():
def report(keys,key,note):
print note,
for x in keys:
if results[key][x]:
print '&',results[key][x],
else:
Expand Down Expand Up @@ -81,19 +81,22 @@ def report(key,note):
if not used:
print '%%',x,'not used in any XBGF script'
names.remove(x)
sorted = targets.keys()[:]
sorted.sort()
print '\\begin{tabular}{l|'+('c|'*len(targets))+'}'
for x in targets.keys():
for x in sorted:
print '&\\textbf{'+x+'}',
print '\\\\\\hline'
report('LOC','Number of lines')
print 'Number of steps:',
for x in targets.keys():
report(sorted,'LOC','\\numberOfLines')
print '\\numberOfSteps',
for x in sorted:
print '&',len(targets[x]),
print '\\\\'
report('NOI','Issues solved')
report('NOX','Transformations total')
report(sorted,'NOI','\\numberOfIssues')
report(sorted,'NOX','\\numberOfTransformations')
print '\\hline'
for x in names:
report(x,'Uses of \\emph{'+x+'}')
report(sorted,x,'\\xbgfNumber{'+x+'}')
print '\\hline'
print '\\end{tabular}'
sys.exit(0)
Expand Down

0 comments on commit 1f5797c

Please sign in to comment.