Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.08 KB

README.md

File metadata and controls

58 lines (41 loc) · 1.08 KB

Dependences

  1. nsq
  2. casperjs
  3. phantomjs

Installation

  1. copy .env.example to .env
  2. modify .env file. fill the properties.
  3. run
./kaka

Usage

just put message to nsq , which you set in the .env file

message struct

{
	"url": "http://tool.lu/",
	"target": "/data/screenshots/WrTSV5zbkHPCqU6t.png",
	"path": "screenshots/WrTSV5zbkHPCqU6t.png",
	"device": "mac"
}

url: (required) the url you want to take a snapshot

target: (required) where to save the snaphot (absolute path)

path: (optional) the path you upload to qiniu

device: (optional) use which device to take snapshot, now only support “mac"

FAQ

  1. 使用casperjs截出优雅的图片

  2. Multi network environment?

    Just deploy multi kaka instance, and use different nsq channel, that will be OK.

  3. I don’t want to upload to qiniu

    Just let the path empty.

Development

go get -u github.com/joho/godotenv
go get -u github.com/qiniu/api.v7
go get -u github.com/bitly/go-nsq