From 410a721d4ffb8ab9c91c5093fcd64722d36ca58b Mon Sep 17 00:00:00 2001 From: Brad Hards Date: Mon, 27 Sep 2021 17:27:58 +1000 Subject: [PATCH] allow specifying the file name as a command line arg --- NPIF Sleuth.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NPIF Sleuth.py b/NPIF Sleuth.py index aa2cd37..eb62be8 100644 --- a/NPIF Sleuth.py +++ b/NPIF Sleuth.py @@ -91,7 +91,12 @@ def NPIF_Extract(fname): def main(): - fname = Get7023_Filename() + if len(sys.argv) > 1: + # Use specified file name if provided + fname = sys.argv[1] + else: + # Use GUI + fname = Get7023_Filename() # check this looks like a 7023 file retval = NPIF_Extract(fname) if retval is not None: