yaurtww

package module
v0.0.0-...-737ee7d Latest Latest
Warning

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

Go to latest
Published: May 9, 2015 License: BSD-3-Clause Imports: 10 Imported by: 0

README

yaurtww (Yet Another Urban Terror Wget Wrapper)

Rewrite of urtdevs/yaurtww in go.

Documentation

Index

Constants

View Source
const CDNURL = "http://cdn.urbanterror.info/urt/"

const CDNURL = "http://cdn.urbanterror.info/urt/%s/%s/q3ut4/%s"

Variables

View Source
var (
	// ManifestPath is the path to the manifest.
	ManifestPath string
	// DownloadPath points to the destination directory for download.
	DownloadPath = flag.String([]string{"d", "-dest"}, "./", "Path to destination directory")
	// Version prints the version of yaurtww
	Version = flag.Bool([]string{"v", "-version"}, false, "Print the name and version")
)

Functions

func RequiredFlag

func RequiredFlag(ErrorMessage string) string

RequiredFlag is a shim to print error messages for flags.

Types

type Manifest

type Manifest struct {
	Version string
	Assets  []ManifestAsset
}

Manifest is the manifest provided by the urban terror site, and describes what assets are required and states the version of the game.

func ReadManifest

func ReadManifest(path *string) (manifest *Manifest, err error)

ReadManifest reads the stored manifest and returns it as Manifest

type ManifestAsset

type ManifestAsset struct {
	MD5Sum   string
	FileName string
}

ManifestAsset is a single manifest, and contains a checksum and filename.

func (ManifestAsset) Download

func (asset ManifestAsset) Download(url string) (err error)

Download downloads the file.

Jump to

Keyboard shortcuts

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