|
|
@@ -0,0 +1,22 @@ |
|
|
|
package main |
|
|
|
|
|
|
|
import ( |
|
|
|
"code.as/captureas/go-captureas" |
|
|
|
"fmt" |
|
|
|
"os" |
|
|
|
) |
|
|
|
|
|
|
|
func main() { |
|
|
|
if len(os.Args) < 2 { |
|
|
|
fmt.Println("usage: cap [url]") |
|
|
|
os.Exit(1) |
|
|
|
} |
|
|
|
url := os.Args[1] |
|
|
|
|
|
|
|
c := captureas.NewClient("", "") |
|
|
|
fmt.Println(c.Capture(&captureas.CaptureParams{ |
|
|
|
URL: url, |
|
|
|
Width: 800, |
|
|
|
Height: 600, |
|
|
|
})) |
|
|
|
} |