ud is a command-line tool for the Urban Dictionary.
$ ud dafuq
* dafuq (11644/4888):
[what the fuck] , but in a more confused manner
Example:
Hagrid: You're a wizard Harry
Harry: Dafuq?
gem install ud
Windows users: You will need the Win32 Console ANSI gem for the colored output.
Install it with gem install win32console
.
From the command-line:
$ ud <word>
It supports a few options:
-n
,--count
: maximum number of definitions (default: 1)-m
,--random
: print a random definition instead--no-color
: disable colored output.-b
,--browser
: open the results in your browser instead of displaying them in the console
In a Ruby script:
require "ud"
defs = UD.query("wtf")