Permalink
Browse files

+ urbandictionary.com

  • Loading branch information...
lexszero authored and l29ah committed Sep 12, 2012
1 parent 2c74cb5 commit cfd480b09451dd62a4d9a3f46c585071de11fcf6
Showing with 6 additions and 0 deletions.
  1. +6 −0 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.