FIX: fixed the command-line
This commit is contained in:
parent
bd8b72c84f
commit
3242b7896f
11
dbfp.py
11
dbfp.py
|
@ -25,7 +25,8 @@ def compareFingerprintDir(filein, fpdir):
|
||||||
def compareFingerprint(filein, filejson):
|
def compareFingerprint(filein, filejson):
|
||||||
db = fingerprint.DBSchema()
|
db = fingerprint.DBSchema()
|
||||||
db.scanDBFile(filein)
|
db.scanDBFile(filein)
|
||||||
db.compareDB(filejson)
|
percent = db.compareDB(filejson)
|
||||||
|
print "Percent match: {}".format(str(percent))
|
||||||
|
|
||||||
#
|
#
|
||||||
def createFingerprint(filein, verbose, app_name, app_ver, notes):
|
def createFingerprint(filein, verbose, app_name, app_ver, notes):
|
||||||
|
@ -115,14 +116,14 @@ def parseArgs():
|
||||||
# parser.add_argument('-t', '--title', required=False)
|
# parser.add_argument('-t', '--title', required=False)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if (args.file):
|
if (args.file and args.fingerprint):
|
||||||
createFingerprint(args.file, args.verbose, args.app_name, args.app_version, args.notes)
|
compareFingerprint(args.file, args.fingerprint)
|
||||||
elif (args.file and args.fpdir):
|
elif (args.file and args.fpdir):
|
||||||
compareFingerprintDir(args.file, args.fpdir)
|
compareFingerprintDir(args.file, args.fpdir)
|
||||||
elif (args.file and args.fingerprint):
|
|
||||||
compareFingerprint(args.file, args.fingerprint)
|
|
||||||
elif (args.pull):
|
elif (args.pull):
|
||||||
fingerprintDir()
|
fingerprintDir()
|
||||||
|
elif (args.file):
|
||||||
|
createFingerprint(args.file, args.verbose, args.app_name, args.app_version, args.notes)
|
||||||
else:
|
else:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue