19 lines
327 B
Python
19 lines
327 B
Python
|
#!/bin/python3
|
||
|
# remove z padding in files
|
||
|
import os
|
||
|
|
||
|
CONTENT_DIR = '../content/images/'
|
||
|
|
||
|
images_dirs = os.listdir(CONTENT_DIR)
|
||
|
|
||
|
for dir in images_dirs:
|
||
|
# remove z padding
|
||
|
try:
|
||
|
id = int(dir)
|
||
|
except ValueError:
|
||
|
continue
|
||
|
if dir != id:
|
||
|
os.rename(CONTENT_DIR + dir, CONTENT_DIR + str(id))
|
||
|
|
||
|
|