4 if len(sys.argv) == 1 or sys.argv[1] != 'remove':
5 print('usage: python3 cleaner {remove}')
6 print("Don't run this unless you know what you are doing.")
10 exts = {'.png', '.gif', '.bmp', '.jpg', '.jpeg', '.htm', '.html', '.css'}
12 for parent, dirnames, filenames in os.walk('.', topdown = False):
13 for filename in filenames:
14 if os.path.splitext(filename)[1].lower() not in exts and "example" not in parent.lower():
15 os.remove(os.path.join(parent, filename))
16 for dirname in dirnames:
17 path = os.path.join(parent, dirname)