diff --git a/libs/exceptions_fp.py b/libs/exceptions_fp.py deleted file mode 100644 index a678ffa..0000000 --- a/libs/exceptions_fp.py +++ /dev/null @@ -1,8 +0,0 @@ -# -# -# - -class FingerprintWrite(Exception): - """Problem writing the fingerprint to a file""" - pass - diff --git a/libs/toolbox.py b/libs/toolbox.py index 4b5bec1..ba619af 100644 --- a/libs/toolbox.py +++ b/libs/toolbox.py @@ -2,6 +2,7 @@ # # import re +import time # class ToolBox: @@ -22,7 +23,7 @@ class ToolBox: cols = table.split(':') tblCols[cols[0]] = cols[1].split(',') return tblCols - + # @staticmethod def parseFilename(fqfilepath): @@ -38,3 +39,12 @@ class ToolBox: if len(results.group(1)) != 0: filename = results.group(1) return filename + + # + @staticmethod + def getTimestampFilename(fqfilename): + """ return output file name """ + timestr = time.strftime('%Y-%m-%d_%H%M%S', time.localtime(time.time())) + filename = ToolBox.parseFilename(fqfilename) + fileout = filename + "_" + timestr + '.json' + return fileout