Add script to create videos for speaking questions.

This commit is contained in:
Cristiano Ferreira
2023-09-03 18:05:13 +01:00
parent 685fde0b77
commit 64776617f2
13 changed files with 27611 additions and 7 deletions

View File

@@ -9,8 +9,9 @@ def delete_files_older_than_one_day(directory):
for entry in os.scandir(directory):
if entry.is_file():
file_path = Path(entry)
file_name = file_path.name
file_modified_time = datetime.datetime.fromtimestamp(file_path.stat().st_mtime)
time_difference = current_time - file_modified_time
if time_difference.days > 1:
if time_difference.days > 1 and "placeholder" not in file_name:
file_path.unlink()
print(f"Deleted file: {file_path}")