cmd

package
v0.0.0-...-f423a77 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultLang is the default language when searching subtitles.
	DefaultLang = "ENG"
)
View Source
const Version = "0.3"

Version is the program's version. Yep.

Variables

View Source
var NoSub = errors.New("No subtitles found!")
View Source
var RootCmd = &cobra.Command{
	Use:   "osdb",
	Short: "osdb is a command-line client for OpenSubtitles",
	Long:  "Search and download subtitles from the command-line.",
	PersistentPreRun: func(c *cobra.Command, args []string) {
		paramLangs = strings.Split(paramLang, ",")
	},
	Run: func(c *cobra.Command, args []string) {
	},
}

RootCmd is the main OSDB program command.

Functions

func GetEnvLang

func GetEnvLang() string

GetEnvLang checks OSDB_LANG env. var, to set the API client language.

func InitClient

func InitClient(lang string) (client *osdb.Client, err error)

InitClient returns a Client connected to OSDB API using env. vars OSDB_LOGIN, OSDB_PASSWORD.

Types

This section is empty.

Jump to

Keyboard shortcuts

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