This commit is contained in:
Paul Gauthier 2023-05-19 07:14:45 -07:00
parent 95221d58c9
commit 7d45b918fc

View file

@ -4,28 +4,19 @@ import sys
def print_tags_info(filename):
last = None
last_prefix = None
tags = sorted(get_tags(filename))
for tag in tags:
if last is None:
show = tag
prefix = None
else:
show = []
prefix = []
stop = False
for lst, tg in zip(last, tag):
if lst == tg and not stop:
prefix.append(lst)
if lst == tg:
show.append("")
else:
stop = True
show.append(tg)
if prefix != last_prefix:
print(prefix)
last_prefix = prefix
if not show[-1]:
show = show[:-1]
show = "\t".join(show)