-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart_micas.scpt
65 lines (54 loc) · 1.76 KB
/
start_micas.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
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
tell application "iTerm"
activate
-- create a new window
tell application "System Events" to keystroke "n" using command down
delay 1
-- split the window vertically
tell application "System Events" to keystroke "d" using command down
delay 1
-- go to the first part of the split
tell application "System Events" to keystroke "[" using command down
delay 1
-- START UP REDIS & CELERY
tell current session of current window
write text "cd ~/Documents/MICAS/server/app/main/utils"
delay 1
write text "conda activate micas"
delay 1
write text "redis-server &"
delay 1
write text "celery -A tasks worker --loglevel=INFO"
delay 1
end tell
-- create a horizontal split
tell application "System Events" to keystroke "D" using command down
delay 1
-- START UP FLASK BACKEND
tell current session of current window
write text "cd ~/Documents/MICAS"
delay 1
write text "conda activate micas"
delay 1
write text "python server/micas.py"
end tell
-- go to the right split
tell application "System Events" to keystroke "]" using command down
delay 1
-- START UP FLASK BACKEND
tell current session of current window
write text "cd ~/Documents/MICAS"
delay 1
end tell
-- create a horizontal split
tell application "System Events" to keystroke "D" using command down
delay 1
-- START UP FRONT END
tell current session of current window
write text "cd ~/Documents/MICAS/frontend"
delay 1
write text "npm install"
delay 1
write text "npm run start"
delay 1
end tell
end tell