bandict

command module
v0.0.0-...-646254e Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2015 License: GPL-3.0 Imports: 8 Imported by: 0

README

bandict

Command-line Urban Dictionary Search in Go

Install

bandict requires Go. You can download it from here.

Run the following command:

$ go get github.com/shivammg/bandict

Make sure you have $GOPATH/bin in your $PATH. If you don't, you can add it in your shell configuration file:

PATH="$PATH:$GOPATH/bin"

Change Preferences

Three constants have been defined in main.go. Change them to change preferences.

NO_OF_RESULTS  = 1
WRAP_WIDTH     = 80
DISPLAY_FOOTER = true

NO_OF_RESULTS: Number of definitions to be displayed by default (optionally can be specified with the -n flag).

WRAP_WIDTH: Word-wrap width for the output text.

DISPLAY_FOOTER: Display footer containing number of results fetched and displayed.

Flags

-n: Number of results to be displayed. If not specified, NO_OF_RESULTS is used.

-w: Search string. If not specified, requested in the next line.

-s: Display sound files for the search string (not the definitions).

Examples

Display three results. Search string requested in the next line.

$ bandict -n 3

Display three results for the string "thug life".

$ bandict -w 'thug life' -n 3

Display sound files (pronunciations) for the search string. One on each line.

$ bandict -w 'lmao' -s

Use the command to download the first file:

$ wget $(bandict -w 'lmao' -s | sed -n 1p)

License

See LICENSE file.

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