mirror of https://github.com/openXC7/prjxray.git
utils: Nicer output format.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
44117ebb0d
commit
19d5a24e41
|
|
@ -335,20 +335,20 @@ def sort_json(filename):
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
for n in os.listdir():
|
for n in sorted(os.listdir()):
|
||||||
if not os.path.isfile(n):
|
if not os.path.isfile(n):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
base, ext = os.path.splitext(n)
|
base, ext = os.path.splitext(n)
|
||||||
|
|
||||||
if ext == '.db':
|
if ext == '.db':
|
||||||
print("Sorting DB file {}".format(n), end=" ", flush=True)
|
print("Sorting DB file {:40s}".format(n), end=" ", flush=True)
|
||||||
x = sort_db(n)
|
x = sort_db(n)
|
||||||
elif ext == '.json':
|
elif ext == '.json':
|
||||||
print("Sorting JSON file {}".format(n), end=" ", flush=True)
|
print("Sorting JSON file {:40s}".format(n), end=" ", flush=True)
|
||||||
x = sort_json(n)
|
x = sort_json(n)
|
||||||
else:
|
else:
|
||||||
print("Ignoring file {}".format(n), end=" ", flush=True)
|
print("Ignoring file {:40s}".format(n), end=" ", flush=True)
|
||||||
x = True
|
x = True
|
||||||
if x:
|
if x:
|
||||||
print(".. success.")
|
print(".. success.")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue