-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterminal.js
44 lines (37 loc) · 870 Bytes
/
terminal.js
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
const blessed = require('blessed')
const Rant = require('./src/modules/Rant')
const say = require('say')
const { exec } = require('child_process')
const screen = blessed.screen({
smartCSR: true,
align: 'center'
})
screen.title = 'elliot_on_g0d'
const gif = blessed.image({
parent: screen,
ascii: ['@', '#', '$', '=', '*', '!', ';', ':', '~', '-', ',', '.', ' ', ' '],
align: 'center',
height: 30,
width: 75,
left: 3,
top: 3,
file: './src/assets/elliot_on_god_small.gif'
})
const text = blessed.box({
parent: screen,
top: 34,
left: 3,
align: 'left',
content: ''
})
screen.key(['escape', 'q', 'C-c'], function(ch, key) {
return process.exit(0)
})
screen.render()
Rant.map(a => {
setTimeout(() => {
if (a[1] == 'm1') say.speak(a[0], 'Alex')
else say.speak(a[0], 'Samantha')
text.setContent(a[0])
}, a[2])
})