forked from suntong/web2image
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb2imageCLICmd.go
More file actions
25 lines (19 loc) · 755 Bytes
/
web2imageCLICmd.go
File metadata and controls
25 lines (19 loc) · 755 Bytes
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
////////////////////////////////////////////////////////////////////////////
// Program: web2image
// Purpose: Web to image
// Authors: Tong Sun (c) 2017, All rights reserved
////////////////////////////////////////////////////////////////////////////
package main
import "github.com/mkideal/cli"
//==========================================================================
// Main dispatcher
func web2image(ctx *cli.Context) error {
// ctx.JSON(ctx.RootArgv())
// ctx.JSON(ctx.Argv())
// fmt.Println()
rootArgv = ctx.RootArgv().(*rootT)
rootOpts.Sleep, rootOpts.WaitFor, rootOpts.Verbose =
rootArgv.Sleep, rootArgv.WaitFor, rootArgv.Verbose.Value()
cdpScreenshot(rootArgv.Headless, ctx.Args()[0], rootArgv.CSS, ctx.Args()[1])
return nil
}