Documentation ¶
Index ¶
- Variables
- func Bestemmia() string
- func CmdsKill(cmds []*exec.Cmd)
- func CmdsStart(cmds []*exec.Cmd)
- func CmdsWait(cmds []*exec.Cmd)
- func EmojiToDescription(str string) string
- func GenAudio(text, format string, timeOut time.Duration) string
- func GenAudioPipes(text, format string) []*exec.Cmd
- func GenDCA(text string) []*exec.Cmd
- func GenUUID(text string) string
- func GetCovid() string
- func GetWikipedia(link string) string
- func SearchAndGetTrain(trainID string) string
- type Emoji
Constants ¶
This section is empty.
Variables ¶
var ( // Gods holds, well, the gods Gods = []string{"Dio", "Gesù", "Madonna"} // Adjectives holds a list of adjectives in italian Adjectives []string )
var (
// Voice used to generate audio files
Voice = "Roberto"
)
Functions ¶
func CmdsWait ¶
CmdsWait waits for all the exec.Cmd inside the slice to finish processing, to free up resources
func EmojiToDescription ¶
EmojiToDescription converts all the occurrences of an emoji with its description
func GenAudio ¶
GenAudio generates a file from a string with the given format, returning its UUID (aka SHA1 hash of the text)
func GenAudioPipes ¶
GenAudioPipes returns a slice of exec.Cmd with commands to start. The stdout of the last element will contain the stream. The stream will be in the format specified by the format parameter
func GenDCA ¶
GenDCA returns a slice of exec.Cmd with commands to start. The stdout of the last element will contain the DCA stream
func GetWikipedia ¶
GetWikipedia returns the first paragraph of the give article
func SearchAndGetTrain ¶
SearchAndGetTrain creates an announcement for the given trainID, if it exists