- nsq
- casperjs
- phantomjs
- copy .env.example to .env
- modify .env file. fill the properties.
- run
./kaka
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"
-
Multi network environment?
Just deploy multi kaka instance, and use different nsq channel, that will be OK.
-
I don’t want to upload to qiniu
Just let the path empty.
go get -u github.com/joho/godotenv
go get -u github.com/qiniu/api.v7
go get -u github.com/bitly/go-nsq