realweather-metadata/reset.py
2024-06-17 10:55:05 +02:00

20 lines
420 B
Python
Executable file

#!/usr/bin/python3
from shutil import rmtree
from os import remove, mkdir, path
BASE_DIR = 'data'
CHANNELS = ['release', 'testing']
confirmation = input('If you really want to delete all releases, type CONFIRM: ')
if confirmation != 'CONFIRM':
print('Cancelled')
exit()
rmtree(BASE_DIR, ignore_errors=True)
mkdir(BASE_DIR)
for channel in CHANNELS:
mkdir(path.join(BASE_DIR, channel))
print('Reset complete')