diff --git a/README b/README index 1e14305..d9eb212 100644 --- a/README +++ b/README @@ -68,10 +68,11 @@ arguments: Transcript of label -n NOTE, --note NOTE capture notes -k KEY, --key KEY diskID + -p PROJECTLOG, --projectlog PROJECT name of the log CSV file Example command: -python3 floppy-nocall.py -c Accession-12345 -d /CAPTURED -m 3.5 -t "transcript of the disk label" -n "note: supplementary materials" -k Disk-000123 +python3 floppy-nocall.py -c Accession-12345 -d /CAPTURED -m 3.5 -t "transcript of the disk label" -n "note: supplementary materials" -k Disk-000123 -p projectlog.csv The following: floppy-nocall -c Coll003 -d /share/floppies -m 3.5 -k 001 , will output: diff --git a/floppy-nocall.py b/floppy-nocall.py index ee2f1a8..50b939f 100644 --- a/floppy-nocall.py +++ b/floppy-nocall.py @@ -46,6 +46,9 @@ parser.add_argument( '-k', '--key',type=str, help='diskID',required=True) +parser.add_argument( + '-p', '--projectlog',type=str, + help='projectlog file name',required=False) ## Array for all args passed to script args = parser.parse_args() @@ -65,6 +68,11 @@ label = args.transcript else: label = "no disk label" + +if args.projectlog: + projectlog = args.projectlog +else: + projectlog = "projectlog.csv" yes_string = ["y", "yes", "Yes", "YES"] no_string = ["n", "no", "No", "NO"] @@ -269,7 +277,7 @@ def kfi4(): print("-Note unchanged...") ## Open and update the masterlog - projectlog.csv -log = open('projectlog.csv','a+') +log = open(projectlog,'a+') print("-Updating log...") log.write(