diff --git a/edscupdate.py b/edscupdate.py index ee13dbea..77295135 100644 --- a/edscupdate.py +++ b/edscupdate.py @@ -85,9 +85,11 @@ def get_cmdr(tdb): print("start date: {}".format(date), file=sys.stderr) +confidence = os.environ.get("CONF", 2) + edsq = misc.edsc.StarQuery( test=testMode, - confidence=2, + confidence=confidence, date=date, ) data = edsq.fetch() @@ -140,9 +142,12 @@ def ischange(sysinfo): ) print() +total = len(systems) +current = 0 with open("tmp/new.systems.csv", "a") as output: try: for sysinfo in systems: + current += 1 name = sysinfo['name'] x, y, z = sysinfo['coord'] place = sysinfo['place'] @@ -175,10 +180,12 @@ def ischange(sysinfo): ), file=sys.stderr) distance = float("{:.2f}".format(dist(x, y, z))) clip.copy_text(name.lower()) - prompt = "'{}'".format(name) - prompt += " ({:.2f}ly)".format(distance) - - ok = input(prompt+"? ".format(name)) + prompt = "{}/{}: '{}': {:.2f}ly? ".format( + current, total, + name, + distance, + ) + ok = input(prompt) if ok.lower() == 'q': break if ok.startswith('='):