mirror of
https://github.com/jasons-gh/the-chomsky-index.git
synced 2026-03-11 08:54:36 +00:00
Delete VTT and SRT files
This commit is contained in:
parent
0c0bdee705
commit
bced310608
1 changed files with 11 additions and 0 deletions
11
base.py
11
base.py
|
|
@ -34,6 +34,17 @@ for file in [x for x in Path(__file__).parent.glob('**/*.srt') if x.is_file()]:
|
|||
# convert - convert from .srt to .cnt
|
||||
convert.convert()
|
||||
|
||||
|
||||
# delete .vtt files
|
||||
for file in [x for x in Path(__file__).parent.glob('**/*.vtt') if x.is_file()]:
|
||||
file.unlink()
|
||||
|
||||
|
||||
# delete .srt files
|
||||
for file in [x for x in Path(__file__).parent.glob('**/*.srt') if x.is_file()]:
|
||||
file.unlink()
|
||||
|
||||
|
||||
# information
|
||||
print(str(len(urls_yt)) + ' subtitle files requested')
|
||||
print(str(len([x for x in Path(__file__).parent.glob('**/*.vtt') if x.is_file()])) + ' .vtt subtitle files in this folder')
|
||||
|
|
|
|||
Loading…
Reference in a new issue