咔咔,网页截图服务
Go JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
scripts
.env.example
.gitignore
LICENSE.txt
README.md
browser.go
config.go
consumer.go
main.go
storage.go

README.md

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