gophervids

package
v0.0.0-...-0f9cef6 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Video

type Video struct {
	ID    string `json:"id"`
	Date  string `json:"date"`
	Title string `json:"title"`
}

Video describes structure for a video entry

func NewLocalJSON

func NewLocalJSON(f string) ([]Video, error)

NewLocalJSON returns listing of video structs

func NewRemoteJSON

func NewRemoteJSON() ([]Video, error)

NewRemoteJSON returns listing of video structs

func (*Video) Download

func (v *Video) Download(outDir string, debug bool) error

Download uses ytdl to download and save a video

func (*Video) Filename

func (v *Video) Filename() string

Filename returns a sanitized title used for the output filename

func (*Video) FullPath

func (v *Video) FullPath(p, a string) string

FullPath returns a full output path to save the video

func (*Video) URL

func (v *Video) URL() string

URL return the youtube url

Jump to

Keyboard shortcuts

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