-
Notifications
You must be signed in to change notification settings - Fork 3
/
src
111 lines (111 loc) · 6.15 KB
/
src
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/sh
version='11'
#the following is the message of the day (MOTD). I feel the majority users will be students who require something fun/weird to begin a stressfull day.
#is plain text; is generated based on your NAME and OS. It uses the FORTUNE and COWSAY packages and a custom script that run on my server (IPv$ 46.4.114.111) so that you dont have to install them.
#checks if the http request is from zoombie from the "ZoombieV"$version" part; i know its a bad implementation but im lazy TwT
motd=$(curl -A "[$(uname -nv)] <$(whoami)>" -s "api.dblob.workers.dev/study/eyJ0aXRsZSI6IlpPT01CSUUgem9vbSBtYW5hZ2VyIiwiY29sb3IiOiAxNjcxMTY4MCwidGhpc19pcyI6Inpvb21iaWUifQ==aXNEb3Jk")
#the following are the escape characters for colors
no='\e[0m'
bld='\e[1m'
und='\e[4m'
a='\e[38;5;69m'
b='\e[38;5;49m'
c='\e[38;5;207m'
d='\e[38;5;227m'
e='\e[38;5;198m'
f='\e[38;5;83m'
g='\e[38;5;218m'
i='\e[38;5;252m'
j='\e[38;5;99m'
k='\e[38;5;47m'
#a wait function that ensures continuity of theme
wait()
{
printf "%b" "${c}[${a}"$dt"${c}] ${b}${bld}Waiting for the next meeting...${no}"
sleep 60
printf "%b" "\r"
}
clear
#zoombie ascii art
printf "%b" "
${i}▒███████▒ ▒█████ ▒█████ ███▄ ▄███▓ ▄▄▄▄ ██▓▓█████
▒ ▒ ▒ ▄▀░▒██▒ ██▒▒██▒ ██▒▓██▒▀█▀ ██▒▓█████▄ ▓██▒▓█ ▀
░ ▒ ▄▀▒░ ▒██░ ██▒▒██░ ██▒▓██ ▓██░▒██▒ ▄██▒██▒▒███
▄▀▒ ░▒██ ██░▒██ ██░▒██ ▒██ ▒██░█▀ ░██░▒▓█ ▄
▒███████▒░ ████▓▒░░ ████▓▒░▒██▒ ░██▒░▓█ ▀█▓░██░░▒████▒
░▒▒ ▓░▒░▒░ ▒░▒░▒░ ░ ▒░▒░▒░ ░ ▒░ ░ ░░▒▓███▀▒░▓ ░░ ${k}${bld}V${version}${no}${i}
░░▒ ▒ ░ ▒ ░ ▒ ▒░ ░ ▒ ▒░ ░ ░ ░▒░▒ ░ ▒ ░ ░ ░ ░
░ ░ ░ ░ ░░ ░ ░ ▒ ░${j}written by DaBigBlob @github${i}▒ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░
"
#printing the MOTD
#printf "%b" "\n${motd}${no}\n" disabled cause need to re-config my server
#printing a handy list of meetings
printf "%b" "\n${e}[*]${f}Reading the zoom-meetings.txt file...${no}\n"
cat "$HOME/zoom-meetings.txt"
printf "%b" "${e}[#]${f}Done.${no}\n\n"
#print the starting time
printf "%b" "${e}[*]${f}Starting at ${a}"$(date +%I:%M%p)" and "$(date +%S)" sec${f}...${no}\n\n"
#start an indefinite loo
while [ 1 ]
do
#date for time keeping
dt=$(date +%I:%M%p)
#parsing the link from your zoom-meeting.txt
lnk=$(cat "$HOME/zoom-meetings.txt" | grep $dt | cut -d' ' -f 2)
if [ $lnk ]
then
#meeting id
mtnid=$(echo $lnk | cut -d'/' -f 5 | cut -d'?' -f 1)
#password hash
pwdhsh=$(echo $lnk | cut -d'=' -f 2)
#zoom domain
dom=$(echo $lnk | cut -d'/' -f 3)
#different implementation for different OS type
case "$(uname -s)" in
Linux*|*BSD*)
xdg-open "zoommtg://"$dom"/join?action=join&confno="$mtnid"&pwd="$pwdhsh
;;
Darwin*)
open "zoommtg://"$dom"/join?action=join&confno="$mtnid"&pwd="$pwdhsh
;;
msys*|cygwin*)
start "zoommtg://"$dom"/join?action=join&confno="$mtnid"&pwd="$pwdhsh
;;
*)
printf "%b" "
——--—-——No OS support?——--————
⠀⣞⢽⢪⢣⢣⢣⢫⡺⡵⣝⡮⣗⢷⢽⢽⢽⣮⡷⡽⣜⣜⢮⢺⣜⢷⢽⢝⡽⣝
⠸⡸⠜⠕⠕⠁⢁⢇⢏⢽⢺⣪⡳⡝⣎⣏⢯⢞⡿⣟⣷⣳⢯⡷⣽⢽⢯⣳⣫⠇
⠀⠀⢀⢀⢄⢬⢪⡪⡎⣆⡈⠚⠜⠕⠇⠗⠝⢕⢯⢫⣞⣯⣿⣻⡽⣏⢗⣗⠏⠀
⠀⠪⡪⡪⣪⢪⢺⢸⢢⢓⢆⢤⢀⠀⠀⠀⠀⠈⢊⢞⡾⣿⡯⣏⢮⠷⠁⠀⠀
⠀⠀⠀⠈⠊⠆⡃⠕⢕⢇⢇⢇⢇⢇⢏⢎⢎⢆⢄⠀⢑⣽⣿⢝⠲⠉⠀⠀⠀⠀
⠀⠀⠀⠀⠀⡿⠂⠠⠀⡇⢇⠕⢈⣀⠀⠁⠡⠣⡣⡫⣂⣿⠯⢪⠰⠂⠀⠀⠀⠀
⠀⠀⠀⠀⡦⡙⡂⢀⢤⢣⠣⡈⣾⡃⠠⠄⠀⡄⢱⣌⣶⢏⢊⠂⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢝⡲⣜⡮⡏⢎⢌⢂⠙⠢⠐⢀⢘⢵⣽⣿⡿⠁⠁⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠨⣺⡺⡕⡕⡱⡑⡆⡕⡅⡕⡜⡼⢽⡻⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣼⣳⣫⣾⣵⣗⡵⡱⡡⢣⢑⢕⢜⢕⡝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣴⣿⣾⣿⣿⣿⡿⡽⡑⢌⠪⡢⡣⣣⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⡟⡾⣿⢿⢿⢵⣽⣾⣼⣘⢸⢸⣞⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠁⠇⠡⠩⡫⢿⣝⡻⡮⣒⢽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
—————————————————————————————"
exit 1
;;
esac
#declared separately coz why not
topic=$(cat "$HOME/zoom-meetings.txt" | grep $dt | cut -d'"' -f 2)
#what to print when starting a meeting
printf "%b" "${c}[${a}"$dt"${c}] ${d}Starting meeting...${no} \n"
printf "%b" "${e}${bld}████████████████████████████████████████████████████████████████████████████████████${no}\n"
printf "%b" "${e}${bld}██${no} ${f}${bld}SET TIME: ${g}"$(cat "$HOME/zoom-meetings.txt" | grep $dt | cut -d' ' -f 1)"${no}\n"
printf "%b" "${e}${bld}██${no} ${f}${bld}TOPIC: ${g}${topic}${no}\n"
printf "%b" "${e}${bld}██${no} ${f}${bld}MEETING ID: ${g}"$mtnid"${no}\n"
printf "%b" "${e}${bld}██${no} ${f}${bld}LINK: ${g}"$lnk"${no}\n"
printf "%b" "${e}${bld}████████████████████████████████████████████████████████████████████████████████████${no}\n"
printf "%b" "${c}[${a}"$dt"${c}] ${d}Job done for now. ${f}uwu${no}\n\n\n"
wait
else
wait
fi
done