Skip to content

billyninja/slapchop

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SLAPCHOP Build Status GoReport License


Slapchop video!


Basic Idea

Post images to this services, and it will slice and dice it into serveral image tiles.

Options/Flags

  • -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


Requirements for dev and building

go get github.com/julienschmidt/httprouter

go get github.com/go-resty/resty

go get github.com/hoisie/mustache


Requirements for production

Just the properly configured binary ;)


Running the tests

go test -v -cover ./...


Actions

  • 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

About

Slice and Dice your pics!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published