audibly

command module
v0.0.0-...-747fea8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 9 Imported by: 0

README

audibly -- Audibly report command status

Run it like audibly COMMAND [ARGS..], and audibly will report the success or error of COMMAND with two different sounds.

It currently uses eSpeak NG as the speech synthesizer, and requires it to be installed. This may change later.

# this will say "success: echo"
$ audibly echo hello, world

# this will say "success: greeting"
$ audibly -name=greeting -- echo hello, world

# this will say "hurrah"
$ audibly -success=hurrah -- echo hello, world

# this will say "oh noes" and exit with status 1
$ audibly -failure="oh noes" false

# this will say "status 42" and exit with status 42
$ audibly -failure='status {{.Status}}' sh -c 'exit 42'

You can also use templates to generate the message spoken. The following fields are defined:

  • Name: value of the -name= flag, or the basename of the command
  • Status: exit status of the command
  • Cmd: the os/exec Cmd value

The template mechanism is documented at http://golang.org/pkg/text/template/

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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