Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env ruby -wKU
text_source = ARGV[0] || 'ipsum'
filename = File.join(File.dirname(__FILE__), text_source + '.txt')
copy_to_use =
if text_source == 'ipsum'
chopped_copy = copy_to_use.scan(/.*?[.!?](?:\s|$)/)
chopped_copy = copy_to_use.split(/\n\n/)
print chopped_copy[rand(chopped_copy.length)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment