Commit 5007e897 authored by Heiko Becker's avatar Heiko Becker

Mke conversion script more sophisticated

parent 111d4b3d
......@@ -24,7 +24,8 @@ def parseTime (timeStr):
def convert (fname):
fileo = open (fname, "r")
out = open (fname+"converted.txt", "w")
fname_no_suffix = fname.split(".")[0]
out = open (fname_no_suffix+"converted.txt", "w")
for line in fileo:
spl_line = line.split (" ")
timeInSeconds = parseTime (spl_line[len(spl_line)-1])
......@@ -32,7 +33,10 @@ def convert (fname):
spl_line.pop(len(spl_line)-1)
curr_line = ""
for val in spl_line:
curr_line += str(val)
if "certificate" in val:
val = val.replace(".v","").replace(".sig","")
lineContent = val.split("certificate_")
curr_line += str(lineContent[len(lineContent) - 1])
curr_line += ", " + str(timeInSeconds) + "\n"
out.write (curr_line)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment