-
Notifications
You must be signed in to change notification settings - Fork 3
/
launcher.py
32 lines (27 loc) · 848 Bytes
/
launcher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from pathlib import Path
import os
print("Welcome to the Bad-Apple script launcher * Press enter to continue *")
input()
current = os.getcwd()
filepath = f"{current}/img"
p = Path(filepath)
skip = False
print("Verdict:" ,end="")
if p.exists():
# get the number of files in img folder
length = sum(1 for x in p.glob('*') if x.is_file())
if length >= 3284:
print("Already exists")
skip = True
else:
print(f"Expected 3285 files. Got {length}")
print("Too few files in directory")
else:
print("Directory does not exist")
os.mkdir("img")
print("Directory made!")
if skip is False: # If we already have the frames downloaded from the video
print("Extracting frames from Bad-Apple video!")
os.system("python3 framer.py")
os.system("python3 convert.py")
os.system("python3 main.py")