slapchop

command module
v0.0.0-...-556f726 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2016 License: MIT Imports: 10 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL