waitress

command module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2015 License: Apache-2.0 Imports: 24 Imported by: 0

README

Waitress

Dependencies

Installation

  • go get
  • go build

Running go build will result in a binary named waitress being created. This can then be moved to the /usr/local or the preferred install path.

Running

Usage of waitress: -binding="0.0.0.0": bind the server to the specified ip -config="": conf file (see config.yml.sample) -port="3000": run the server on the specified port

Image processing

The format is specified as the first part of the URL path. The syntax is similar to the geometry syntax of ImageMagick.

Syntax
s ::= ( width | 'x' height | width 'x' height ) ( '#' | '^' | '!' )?
bg ::= (
    '#' [0-9A-Fa-f]{6} |
    'rgb(' \d{1,3} ',' \d{1,3} ',' \d{1,3} ')' |
    'rgba(' \d{1,3} ',' \d{1,3} ',' \d{1,3} ',' \d+ (\.\d+)? ')' |
    'hsl(' \d{1,3} ',' \d{1,3} '%,' \d{1,3} '%)' |
    'hsla(' \d{1,3} ',' \d{1,3} '%,' \d{1,3} '%,' \d+ (\.\d+)? ')'        
)
Size

s=700: Resize the image to have a width of 700 (maintains aspect ratio) s=x700: Resize the image to have a height of 700 (maintains aspect ratio) s=700x700: Resize the image to have a width and height of 700. This maintains the aspect ratio and pads image with a background color.

Options

#: Crop the image to fill the specified size (This need to be URL escaped) ^: The size specified is a minimum. The resulting image may be bigger *: The size specified is a maximum. The resulting image may be smaller !: Do not preserve the aspect ratio.

Examples

Support both syntaxes?

TODO: Makefile

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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