Created
October 26, 2016 14:16
-
-
Save barek2k2/51c8cc5cce488d7d83420e7ab86ffd0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text=File.open('song.txt').read # reads the lyrics from song.txt file | |
text.gsub!(/\n\n\n/, "$") # detecting song gap time after a para | |
text.each_line do |line| | |
ch = line.split("") | |
ch.collect{|c| c == '$' ? (sleep(2);print("\n\n")) : (sleep(0.08);print(c))} # prints each character and delay between para or character | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment