-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwhatup.scpt
executable file
·28 lines (28 loc) · 1.2 KB
/
whatup.scpt
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
on textualcmd(user)
set json to do shell script "curl -s https://whatstatus.info/api/status | tr -d '\n '"
if json = "{\"site\":\"1\",\"irc\":\"1\",\"tracker\":\"1\"}" then
set str to "💎 What.CD: ✅ Site ✅ IRC ✅ Tracker"
end if
if json = "{\"site\":\"0\",\"irc\":\"1\",\"tracker\":\"1\"}" then
set str to "💎 What.CD: ⛔ Site ✅ IRC ✅ Tracker"
end if
if json = "{\"site\":\"1\",\"irc\":\"0\",\"tracker\":\"1\"}" then
set str to "💎 What.CD: ✅ Site ⛔ IRC ✅ Tracker"
end if
if json = "{\"site\":\"1\",\"irc\":\"1\",\"tracker\":\"0\"}" then
set str to "💎 What.CD: ✅ Site ✅ IRC ⛔ Tracker"
end if
if json = "{\"site\":\"0\",\"irc\":\"0\",\"tracker\":\"1\"}" then
set str to "💎 What.CD: ⛔ Site ⛔ IRC ✅ Tracker"
end if
if json = "{\"site\":\"1\",\"irc\":\"0\",\"tracker\":\"0\"}" then
set str to "💎 What.CD: ✅ Site ⛔ IRC ⛔ Tracker"
end if
if json = "{\"site\":\"0\",\"irc\":\"1\",\"tracker\":\"0\"}" then
set str to "💎 What.CD: ⛔ Site ✅ IRC ⛔ Tracker"
end if
if json = "{\"site\":\"0\",\"irc\":\"0\",\"tracker\":\"0\"}" then
set str to "💎 What.CD: ⛔ Site ⛔ IRC ⛔ Tracker"
end if
return str
end textualcmd