lib

package
v0.0.0-...-fc7d834 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2018 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RESET       = "\033[0m"
	START       = "\033[%sm"
	ORANGE      = "33"
	GREEN       = "32"
	LIGHTGREEN  = "92"
	GREY        = "37"
	BLACK       = "30"
	RED         = "31"
	LIGHTRED    = "91"
	CYAN        = "36"
	LIGHTCYAN   = "96"
	BLUE        = "34"
	LIGHTBLUE   = "94"
	PURPLE      = "35"
	YELLOW      = "93"
	WHITE       = "97"
	LIGHTPURPLE = "95"

	INFO = "[!] "
	QUE  = "[?] "
	BAD  = "[-] "
	GOOD = "[+] "
	RUN  = "[~] "

	BG     = ";7"
	BOLD   = ";1"
	ITALIC = "3"
	UNDER  = "4"
	STRIKE = "09"
)

All the const are defined for what they do!

View Source
const (
	VIDINFO = "https://youtube.com/get_video_info?video_id="
)

Video information

Variables

This section is empty.

Functions

func Bad

func Bad(message string)

Bad is a function that will show output with red color.

func ConvertToMp3

func ConvertToMp3(video string, ext string)

ConvertToMp3 convert the video given to mp3 format using ffmpeg

func DownloadVideo

func DownloadVideo(vf VideoFlag)

DownloadVideo download video from url

func Execute

func Execute(pathExec string, args []string) (string, error)

Execute a shell command. return cmd (output) or emty string if error.

func GetBody

func GetBody(urlVideo string) (string, error)

GetBody fetch the body

func Good

func Good(message string)

Good is a function that will show output with green color.

func Info

func Info(message string)

Info is a function that will show output with orange color.

func Printerr

func Printerr(err error, fromwhere string)

Printerr is a function that will print error message if found

func Que

func Que(message string)

Que is a function that will show output with blue color.

func Run

func Run(message string)

Run is a function that will show output with white color.

func Say

func Say(color, message string)

Say is a function that will output a message with the defined color.

func SayMe

func SayMe(color, message string) string

SayMe is a function that will return a message with the defined color.

Types

type VideoFlag

type VideoFlag struct {
	URL     string
	Output  string
	Convert bool
	Quality string
}

VideoFlag struct

Jump to

Keyboard shortcuts

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