Created
August 16, 2015 03:24
-
-
Save cg505/28e6244a80589b5707e7 to your computer and use it in GitHub Desktop.
ayy lemon, now with linux support
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
| #!/usr/bin/env ruby | |
| module Illuminati | |
| module V1 | |
| module MottoGenerator | |
| def self.ayy_lmao_count | |
| rand(1024) + 64 | |
| end | |
| def self.ayy | |
| "ayy" | |
| end | |
| def self.lmao | |
| "lmao" | |
| end | |
| def self.lemon(pad_length = rand(8) + 2, dict = %w[l m a o n e]) | |
| ["l", dict.sample(pad_length).join].join | |
| end | |
| def self.ayy_lemon(*args) | |
| [ayy, lemon(*args)].join " " | |
| end | |
| def self.generate(number_of_mottos = ayy_lmao_count, dankness_specifier = :dank) | |
| case dankness_specifier | |
| when :dank | |
| number_of_mottos.times.map do |motto_number| | |
| self.ayy_lemon | |
| end.join(" ") | |
| else | |
| warn "not weiring socks, too undank in this room. reverting to old motto generator dankness specifier" | |
| number_of_mottos.times.map do |motto_number| | |
| self.ayy_lmao | |
| end.join(" ") | |
| end | |
| end | |
| end | |
| module PropagandaAudioFileGenerator | |
| def self.generate(filename, *args) | |
| propaganda_audio_file_script = MottoGenerator.generate(*args) | |
| system("echo #{propaganda_audio_file_script.inspect} | espeak -w #{filename}") | |
| end | |
| end | |
| end | |
| end | |
| Illuminati::V1::PropagandaAudioFileGenerator.generate("ayy_lemon") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment