-
Notifications
You must be signed in to change notification settings - Fork 2
/
splash.js
33 lines (31 loc) · 957 Bytes
/
splash.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
const DESCRIPTION = "The awesome power of command line is finally revealed.";
const COPYRIGHT = "Developed with JavaScript and ♥ by Ionică Bizău";
var ImageToAscii = require("image-to-ascii")
, Overlap = require("overlap")
, myImage = new ImageToAscii ({
resize: {
width: "100%"
, height: "90%"
}
, multiplyWidth: 1
, colored: true
})
;
myImage.convert(__dirname + "/tmuxos.png", function(err, converted) {
if (err) { throw err; }
console.log(Overlap({
who: Overlap({
who: converted.trim()
, with: DESCRIPTION
, where: {
x: process.stdout.columns / 2 - DESCRIPTION.length / 2
, y: converted.split("\n").length - 1
}
})
, with: COPYRIGHT
, where: {
x: process.stdout.columns / 2 - COPYRIGHT.length / 2
, y: converted.split("\n").length
}
}));
});