gsay 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +12 -0
- data/bin/gsay +4 -17
- data/gsay.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -7,3 +7,15 @@ SPEAK LIKE A ROBOT!
|
|
7
7
|
brew install mpg123
|
8
8
|
gem install gsay
|
9
9
|
gsay "Speak like a robot"
|
10
|
+
|
11
|
+
## Some good ones to try
|
12
|
+
|
13
|
+
gsay "irony is wasted on the stupid"
|
14
|
+
|
15
|
+
gsay "what"
|
16
|
+
|
17
|
+
gsay "party rock is in the house tonight everybody just have a good time and we gonna make you lose your mind"
|
18
|
+
|
19
|
+
gsay "i just wanna tell you how i am feeling gotta make you understand never gonna give you up never gonna let you down"
|
20
|
+
|
21
|
+
gsay "i miss the earth so much i miss my wife it is lonely out in space on such a timeless flight oh no no no i am a rocket man rocket man burning out his fuse out here alone"
|
data/bin/gsay
CHANGED
@@ -5,21 +5,8 @@ require 'open-uri'
|
|
5
5
|
|
6
6
|
words = ARGV.first.scan(/\w+/).map(&:downcase)
|
7
7
|
|
8
|
-
|
9
|
-
sounds
|
10
|
-
|
11
|
-
words.each_with_index do |word, index|
|
12
|
-
@word = word
|
13
|
-
url = "https://ssl.gstatic.com/dictionary/static/sounds/de/0/#{word}.mp3"
|
14
|
-
sounds[index].write(open(url).read)
|
15
|
-
end
|
16
|
-
|
17
|
-
`mpg123 -q #{sounds.map(&:path).join(" ")}`
|
18
|
-
rescue OpenURI::HTTPError
|
19
|
-
abort "Couldn't gsay '#{@word}' :("
|
20
|
-
ensure
|
21
|
-
sounds.each do |sound|
|
22
|
-
sound.close
|
23
|
-
sound.unlink
|
24
|
-
end
|
8
|
+
sounds = words.map do |word|
|
9
|
+
"http://ssl.gstatic.com/dictionary/static/sounds/de/0/#{word}.mp3"
|
25
10
|
end
|
11
|
+
|
12
|
+
`mpg123 -q #{sounds.join(" ")}`
|
data/gsay.gemspec
CHANGED