-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli.js
32 lines (28 loc) · 905 Bytes
/
cli.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
#!/usr/bin/env node
var meow = require("meow");
var tabindex = require("./");
var draw = require("./draw")
var program = meow({
help: [
'Usage',
' tabindex <url>',
'',
'Example',
' tabindex https://google.com',
'',
'Options',
' --output=tabindex.gif Sets the oupit target',
' --width=1024 Sets the viewport size',
' --delay=3000 Sets the delay capturing the page (in ms)',
' --scale=0.5 Sets the scale of the rendered gif'
].join('\n')
});
tabindex(program.input[0], program.flags, function(err, result) {
if (err) {
return console.log("Error:", err);
}
//console.log(result.tabOrder)
// Generate a gif!
draw(result.tabOrder, result.width, result.height,
program.flags.output, program.flags.scale);
});