diff options
author | Marc Jones <mjones@softwarefreedom.org> | 2014-02-05 12:53:21 -0500 |
---|---|---|
committer | Marc Jones <mjones@softwarefreedom.org> | 2014-02-05 12:53:21 -0500 |
commit | 41c41d2d3f20b41ec8ce0882e0e8eec0d7e295d9 (patch) | |
tree | c4b25e3d59139547e9be4b8277644c4e63ede301 /summary.py~ | |
parent | 203ff264c859eb03a027d1b07f2670611e2240e4 (diff) |
removed summary.py after folding in to main.py
Diffstat (limited to 'summary.py~')
-rwxr-xr-x | summary.py~ | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/summary.py~ b/summary.py~ deleted file mode 100755 index 4298109..0000000 --- a/summary.py~ +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/python -i -from optparse import OptionParser -import os -import re -import sys -import datetime - -parser = OptionParser() - -(options, args) = parser.parse_args() - -report = dict() -file -for a in args: - summaryfile = open(a) - - #sample input - #../bzr.lf/lsb/devel/build_env/headers/x86-64/4.1/glib-2.0/gio/gmenuexporter.h.defs(1): export(1); - for line in summaryfile: - #find the file name which is before the matching parathsis before the last colon on the line - filename = line[:line[:line.rfind(':')].rfind('(')] - #find the total number of words found by locating the end of the filename and taking the number in parathesis right before the : - totalfilecount = line[line[:line.rfind(':')].rfind('(')+1:line[:line.rfind(':')].rfind(')')] - #find the list of words following the :, and split them by the ;, and then drop the last item on the list which is always a \n - foundwords = line[line.rfind(':')+1:].split(';')[:-1] - report[filename] = dict() - for w in foundwords: - w = w.trim() - word = w[:w.find('(')] - wcount = w[w.find('(')+1:w.find(')')] - report[filename][word] = wcount - |