power-league command - github.com/Forestmb/power-league - Go Packages

power-league

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2014 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Power League GoDoc Build Status

Power League is a web application that calculates alternative rankings for Yahoo Fantasy Sports leagues.

This application is written using the Go programming language and is licensed under the New BSD license.

Building

$ go get github.com/Forestmb/power-league
$ cd $GOPATH/src/github.com/Forestmb/power-league
$ ./build.sh

To make sure this build runs before every commit, use:

$ ln -s "$(pwd)/build.sh" .git/hooks/pre-commit

Running

To run a built instance locally, you must first create a configuration file.

$ cp server.conf.template server.conf

Next, obtain a Yahoo Fantasy Sports client key and secret and copy the values into server.conf

Then, run the application

$ ./server.sh start

The application can then be accessed at http://localhost:8080/power-rankings. Once signed in, you can view the rankings for any of your current or past leagues:

Example Screenshot

Options

Command line flags can be passed when running server.sh or by appending them to the server_args variable in server.conf.

Usage of ./power-league:
  -address=":8080": Address to listen for incoming connections.
  -alsologtostderr=false: log to standard error as well as files
  -baseContext="/power-rankings": Root context of the server.
  -clientKey="": Required client OAuth key. See http://developer.yahoo.com/fantasysports/guide/GettingStarted.html for more information
  -clientSecret="": Required client OAuth secret. See http://developer.yahoo.com/fantasysports/guide/GettingStarted.html for more information
  -cookieAuthKey="": Authentication key for cookie store. By default uses a randomly generated key.
  -cookieEncryptionKey="": Encryption key for cookie store. By default uses a randomly generated key.
  -log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
  -log_dir="": If non-empty, write log files in this directory
  -logtostderr=false: log to standard error instead of files
  -static="static": Directory to access static files
  -stderrthreshold=0: logs at or above this threshold go to stderr
  -v=0: log level for V logs
  -vmodule=: comma-separated list of pattern=N settings for file-filtered logging

Documentation

Overview

Command power-league starts a web server that display alternative rankings for fantasy sports leagues.

Users grant authentication from the fantasy sports provider (Yahoo) and are presented with a list of their current and past leagues. Each league contains a table and week-by-week breakdown of how their scors translate into the alternative rankings.

To run, this command requires a client key and secret to be passed in at runtime. More information about the registration process can be found here: http://developer.yahoo.com/fantasysports/guide/GettingStarted.html

Additional configuration options are available. See usage for details.

Directories

Path Synopsis
Package rankings calculates the alternative rankings of a league based on data obtained from a fantasy sports provider.
Package rankings calculates the alternative rankings of a league based on data obtained from a fantasy sports provider.
Package session defines the opertions for supporting user sessions within a power-league application.
Package session defines the opertions for supporting user sessions within a power-league application.
Package site publishes endpoints and handles web requests for a power-league site.
Package site publishes endpoints and handles web requests for a power-league site.
Package templates centralizes access to template functions that render the power-league content as HTML.
Package templates centralizes access to template functions that render the power-league content as HTML.

Jump to

Keyboard shortcuts

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