From 09cd972065e4e48134804c7a6137662f9296419d Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Fri, 4 May 2018 19:10:38 +0200 Subject: [PATCH] basename in index grouper --- etherdump/commands/index.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/etherdump/commands/index.py b/etherdump/commands/index.py index 62203ff..1474c90 100644 --- a/etherdump/commands/index.py +++ b/etherdump/commands/index.py @@ -213,23 +213,25 @@ def main (args): if could_have_base(x, pb): return p + print ("pairing input files with pads", file=sys.stderr) for x in inputs: # pair input with a pad if possible - p = get_best_pad(x) + xbasename = os.path.basename(x) + p = get_best_pad(xbasename) if p: if not has_version(p, x): - # print ("Grouping file {0} with pad {1}".format(x, p['padid']), file=sys.stderr) + print ("Grouping file {0} with pad {1}".format(x, p['padid']), file=sys.stderr) p['versions'].append(wrappath(x)) - # else: - # print ("Skipping existing version {0} ({1})...".format(x, p['padid']), file=sys.stderr) + else: + print ("Skipping existing version {0} ({1})...".format(x, p['padid']), file=sys.stderr) removelist.append(x) # Removed Matches files for x in removelist: inputs.remove(x) - # print ("Remaining files:", file=sys.stderr) - # for x in inputs: - # print (x, file=sys.stderr) - # print (file=sys.stderr) + print ("Remaining files:", file=sys.stderr) + for x in inputs: + print (x, file=sys.stderr) + print (file=sys.stderr) # Add "fake" pads for remaining files for x in inputs: args.pads.append(metaforpaths([x]))