-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathussr.py
More file actions
60 lines (48 loc) · 1.71 KB
/
ussr.py
File metadata and controls
60 lines (48 loc) · 1.71 KB
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
58
59
60
import os
import sys
import json
from video import make_video
from audio import make_audio
from setting import setup_settings, print_current_settings
from colorama import init, Fore
init(autoreset=True)
def print_help():
# Print cmds and descriptions
print(Fore.YELLOW+"Welcome to Ultimate simple screen recorder")
print(Fore.RED+"For the art, for the people, for the minimalism")
print("Here are available cmds\n")
print(Fore.GREEN+"ussr -h")
print("To show this section\n")
print(Fore.GREEN+"ussr -s settings.json")
print("To load settings\n")
print(Fore.GREEN+"ussr -s -i")
print("To show settings infor\n")
print(Fore.GREEN+"ussr -r")
print("To record your screen fully\n")
return None
def print_windows_help():
# Print easter egg
print(Fore.YELLOW+"Union of Soviet Socialist Republics")
print(Fore.RED+"Workers of the world, unite!")
return None
# Cmd parsers
if len(sys.argv) == 1:
print_help()
if len(sys.argv) >= 2:
if sys.argv[1] == "-h": # ussr -h
print_help()
if sys.argv[1] == "/?": # ussr /?
print_windows_help()
if sys.argv[1] == "-r": # ussr -r
make_video()
# Note for people who can/ want to try record audio from speaker and mic
# Put make_video() and into a process
# Put make_audio() and into another process
# By using module multiprocess # pip install multiprocess
# Not built-in multiprocessing
if len(sys.argv) >= 3:
if sys.argv[1] == "-s":
if sys.argv[2].split(".")[-1] == "json": # ussr -s settings.json
setup_settings(sys.argv[2])
if sys.argv[2] == "-i": # ussr -s -i
print_current_settings()