Skip to content

Instantly share code, notes, and snippets.

@jarinudom
Created September 5, 2009 22:20
Show Gist options
  • Save jarinudom/181532 to your computer and use it in GitHub Desktop.
Save jarinudom/181532 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
def tagz0r(char)
return char if char == " "
tagz0r = %w{b i u s sub sup}.at(rand(6))
colorz0r = %w{aqua black blue fuchsia green lime purple red teal}.at(rand(9))
sizez0r = (6..9).to_a.at(rand(4))
fontz0r = ["courier", "comic sans", "impact", "times new roman"].at(rand(4))
"[#{tagz0r}][color=#{colorz0r}][size=#{sizez0r}][font=#{fontz0r}]#{char}[/font][/size][/color][/#{tagz0r}]"
end
out = ""
ARGV[0].split("").each do |char|
out += tagz0r(char)
end
puts out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment