Skip to content
/ urban Public

Urban is a command line tool that allows you to look up definitions or pull a random definition from Urban Dictionary.

License

Notifications You must be signed in to change notification settings

tmiller/urban

Repository files navigation

Urban is a command line utility with an API to query definitions from Urban Dictionary.

<img src=“”/> <img src=“” />

  • Ruby >= 1.8.7

With Rubygems:

$ sudo gem install urban

With git and local working copy

$ git clone git://github.com/tmiller/urban.git
$ cd urban
$ sudo rake install
$ urban cookie monster
$ urban -r
$ urban --random
$ urban -a cookie monster
$ urban -ra
$ urban -u cookie monster
$ urban -ru
$ urban --help
$ urban --version
require 'urban'

# Search for a word
entry = Urban::Dictionary.search('impromtpu')

# Get a random word
entry = Urban::Dictionary.random

puts entry.phrase     # print the phrase
puts entry.url        # print the url of the phrase

# print all of the definitions
entry.definitions.each do |definition|
  puts definition
end

Copyright © 2011 Thomas Miller. See LICENSE for details.

About

Urban is a command line tool that allows you to look up definitions or pull a random definition from Urban Dictionary.

Resources

License

Stars

Watchers

Forks

Packages

No packages published