Post images to this services, and it will slice and dice it into serveral image tiles.
- -host Default: "localhost, The host address which it will be visible
- -puzzler Default: "" Puzzler Service remote url
- -port Default: "3001 HTTP port number
- -tile Default: 64Tile Size in pixels
- -size Default: int64(102410245) Max upload file size in BYTES
- -dir Default: "/tmp/slapchop/upload"
- -template Default: "notsetted.html" Absolute path to the preview.html template file
cd $GOPATH/src/github.com/billyninja/slapchop
go build .
./slapchop -port=9000 -puzzler=username:pwd@localhosthost:8001
Notice that I'm changing the default commandline args/flags on purpose
go get github.com/julienschmidt/httprouter
go get github.com/go-resty/resty
go get github.com/hoisie/mustache
Just the properly configured binary ;)
go test -v -cover ./...
-
GET
/
-> Retrieves a list of the uploaded slapchops. -
POST
/chopit/$USERNAME
-> Upload image to the service storage, split into serveral tiles, and retrieves the hrefs to the user. -
GET
/chopit/$USERNAME/$CHOP_ID
-> Retrieves info and href on the given $CHOP_ID -
DELETE
/chopit/$USERNAME/$CHOP_ID
-> Deletes this entry and its files -
GET
/tiled/$USERNAME/$CHOP_ID
-> Retrieves a html preview of the tiled version of the chopped image -
GET
/random/$USERNAME/$CHOP_ID
-> Retrieves a html preview of the shuffled version of the chopped image