-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeow_app.py
57 lines (48 loc) · 1.82 KB
/
meow_app.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from programs.FPS_BPM_Calc import fpsbpmlooper
from programs.ffmpeg_local import compile_video
from termcolor import colored
import subprocess
import os
import termcolor
COLORS = termcolor
def main():
while True:
print("")
for i in range(2):
print("////////////////")
print(colored(" MEOW v0.1 ", 'red', ))
for i in range(2):
print("////////////////")
print(colored("\n Available Programs:\n",
'red', attrs=['reverse',]))
print(colored("1.", 'cyan') + " MEOW FPS / BPM ")
print(colored("2.", 'cyan') + " MEOW SAMPLER ")
print(colored("3.", 'cyan') + " PNG to MP4 ")
print(colored("4.", 'cyan') + " PNG to GIF ")
# Get the user's choice
choice = input(colored("\nEnter number to RUN: ", 'red'))
try:
# Run the selected script
if choice == "1":
input_fps = int(
input(colored("Enter the FPS value: ", 'red')))
input_bpm = int(
input(colored("Enter the BPM value: ", 'red')))
fpsbpmlooper(fps=input_fps, bpm=input_bpm)
elif choice == "2":
subprocess.run(['python', './programs/yt_to_mp3.py'])
elif choice == "3":
input_path = input((colored("Input Path: ", 'red')))
input_path = os.path.dirname(input_path)
compile_video(directory=input_path)
elif choice == "4":
subprocess.run(['python', './programs/png_to_gif.py'])
else:
print("Invalid choice.")
continue
except Exception as e:
# if an error occurs, print the error message and start over
print(e)
continue
if __name__ == "__main__":
main()