cmd

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

The claat command generates one or more codelabs from "source" documents, specified as either Google Doc IDs or local markdown files. The command also allows one to preview generated codelabs from local drive using "claat serve". See more details at https://github.com/googlecodelabs/tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdExport

func CmdExport(opts CmdExportOptions) int

CmdExport is the "claat export ..." subcommand. It returns a process exit code.

func CmdServe

func CmdServe(addr string) int

CmdServe is the "claat serve ..." subcommand. addr is the hostname and port to bind the web server to. It returns a process exit code.

func CmdUpdate

func CmdUpdate(opts CmdUpdateOptions) int

CmdUpdate is the "claat update ..." subcommand. It returns a process exit code.

Types

type CmdExportOptions

type CmdExportOptions struct {
	// AuthToken is the token to use for the Drive API.
	AuthToken string
	// Expenv is the codelab environment to export to.
	Expenv string
	// ExtraVars is extra template variables.
	ExtraVars map[string]string
	// GlobalGA is the global Google Analytics account to use.
	GlobalGA string
	// Output is the output directory, or "-" for stdout.
	Output string
	// Prefix is a URL prefix to prepend when using HTML format.
	Prefix string
	// Srcs is the sources to export codelabs from.
	Srcs []string
	// Tmplout is the output format.
	Tmplout string
}

Options type to make the CmdExport signature succinct.

type CmdUpdateOptions

type CmdUpdateOptions struct {
	// AuthToken is the token to use for the Drive API.
	AuthToken string
	// ExtraVars is extra template variables.
	ExtraVars map[string]string
	// GlobalGA is the global Google Analytics account to use.
	GlobalGA string
	// Prefix is a URL prefix to prepend when using HTML format.
	Prefix string
}

Options type to make the CmdUpdate signature succinct.

Jump to

Keyboard shortcuts

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