Skip to content

Commit

Permalink
+ urbandictionary.com
Browse files Browse the repository at this point in the history
  • Loading branch information
lexszero authored and l29ah committed Sep 12, 2012
1 parent 2c74cb5 commit cfd480b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions urbandictionary.com/urbandict
@@ -0,0 +1,6 @@
#!/bin/bash
word="$1"
curl -s http://www.urbandictionary.com/define.php?term=`echo -n "$word" | urlencode` |
perl -ne 's/<br\/>/\n/sg; s/<a href="\/define.php\?term=.*?">(.*?)<\/a>/$1/sg; /<div class="definition">(.*?)<\/div>/ms and print "\n$1\n"; /<div class="example">(.*?)<\/div>/ and print "\t$1\n"' |
htmldecode

0 comments on commit cfd480b

Please sign in to comment.