Filedot Showstar !!install!! -
# filedot_showstar.py import os from pathlib import Path def showstar(directory, pattern=" "): files = Path(directory).glob(pattern) for f in files: stars = " " * (min(5, (f.stat().st_size // 1000) // 100 + 1)) print(f"{stars:<5} {f.name} ({f.stat().st_size} bytes)")
if == " main ": import sys showstar(sys.argv[1] if len(sys.argv) > 1 else ".") filedot showstar
Run as:
★★★★★ report.pdf (opened 47 times) ★★★★☆ data.csv (opened 12 times) ★★☆☆☆ old_log.txt (opened 2 times) I can generate a Python script that mimics filedot showstar : # filedot_showstar
filedot showstar ~/projects --by recent