This commit is contained in:
dedan 2013-03-04 14:44:51 -08:00
commit 33dc2d8fb3

View file

@ -105,7 +105,10 @@ def print_tags(journal):
]
# To be read: [for entry in journal.entries: for tag in set(entry.tags): tag]
tag_counts = {(tags.count(tag), tag) for tag in tags}
for n, tag in sorted(tag_counts, reverse=True):
if len([t for t in tag_counts if t[0] == 1]):
tag_counts = filter(lambda x: x[0] > 1, tag_counts)
print('removed tags that appear only once..')
for n, tag in sorted(tag_counts, reverse=False):
print("{:20} : {}".format(tag, n))
@ -218,4 +221,3 @@ def cli():
if __name__ == "__main__":
cli()