|
|
@ -14,13 +14,20 @@ M = 1024*1024
|
|
|
|
def junk_dirs():
|
|
|
|
def junk_dirs():
|
|
|
|
"""Return directories which potentially contain junk"""
|
|
|
|
"""Return directories which potentially contain junk"""
|
|
|
|
|
|
|
|
|
|
|
|
for d in ['~/tmp', '~/.local/share/Trash', '~/rpmbuild', '~/RPM',
|
|
|
|
static_junk_dirs = [
|
|
|
|
'~/.cache/tracker', '~/.local/share/apt-dater/history']:
|
|
|
|
"~/tmp",
|
|
|
|
|
|
|
|
"~/.local/share/Trash",
|
|
|
|
|
|
|
|
"~/rpmbuild",
|
|
|
|
|
|
|
|
"~/RPM",
|
|
|
|
|
|
|
|
"~/.cache/tracker",
|
|
|
|
|
|
|
|
"~/.local/share/apt-dater/history",
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
for d in static_junk_dirs:
|
|
|
|
d = os.path.expanduser(d)
|
|
|
|
d = os.path.expanduser(d)
|
|
|
|
if os.path.exists(d):
|
|
|
|
if os.path.exists(d):
|
|
|
|
yield d
|
|
|
|
yield d
|
|
|
|
for d, _, _ in os.walk(os.path.expanduser('~')):
|
|
|
|
for d, _, _ in os.walk(os.path.expanduser("~")):
|
|
|
|
if d.endswith('.sync/Archive'):
|
|
|
|
if d.endswith(".sync/Archive"):
|
|
|
|
yield d
|
|
|
|
yield d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -59,7 +66,7 @@ def main():
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
fore = Fore.RESET
|
|
|
|
fore = Fore.RESET
|
|
|
|
|
|
|
|
|
|
|
|
print(fore + str(du_d//M) + 'M\t' + d + Fore.RESET)
|
|
|
|
print(fore + str(du_d // M) + "M\t" + d + Fore.RESET)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main()
|
|
|
|
main()
|
|
|
|