cli-talky-talk 0.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2c65a36d7c14096d11bbb0991d61593131e6e619
4
+ data.tar.gz: b4d0041fc22fac1b36fb68a7b2a5cbf73e3c114a
5
+ SHA512:
6
+ metadata.gz: 9548a0c57e6ec25259075a5260d5d141ada9c5ef0b75cbb2b7b56937136f62428ff13c0dcd3502e143510b88b7d9035e65907dc8ebb350db5312f4ef9cec257d
7
+ data.tar.gz: 5706684ef35ca92464d77359822dc156c28b8c8ee73dfb49721c04691e63edd00a582c545ef034435ad13c710ca051dcad5f262413ca21bf6593e986c366879b
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cli-talky-talk.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Sean McCleary
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Sean McCleary
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Cli::Talky::Talk
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'cli-talky-talk'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install cli-talky-talk
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/cli-talky-talk/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/bin/speak ADDED
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'cli-talky-talk'
5
+
6
+ extend CLITalkyTalk::ClassMethods
7
+
8
+ speak
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cli_talky_talk/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "cli-talky-talk"
8
+ spec.version = CLITalkyTalk::VERSION
9
+ spec.authors = ["Sean McCleary"]
10
+ spec.email = ["seanmcc@gmail.com"]
11
+ spec.summary = %q{Gives you a random spoken greeting}
12
+ spec.description = %q{Tired of staring at the terminal waiting for tasks to complete. Wouldn't it be cool if your computer could speak to you when the task is done?}
13
+ spec.homepage = "https://github.com/mrinterweb/cli-talky-talk"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "pry", "~> 0.10"
24
+ end
@@ -0,0 +1,55 @@
1
+ module CLITalkyTalk
2
+ def self.included(base)
3
+ binding.pry
4
+ base.extend(ClassMethods)
5
+ end
6
+
7
+ module ClassMethods
8
+ VOICES = `say -v \?`.split("\n").select { |v| v =~ /en_US/ }.map { |v| v.gsub(/\s+en_US.*$/,"")}
9
+
10
+ GREETINGS = [
11
+ 'ahoy',
12
+ 'greeting',
13
+ 'saalutations',
14
+ 'waazame',
15
+ 'bleep booop',
16
+ 'exceslior',
17
+ 'land hoe',
18
+ 'hail',
19
+ ]
20
+
21
+ NAMES = [
22
+ `whoami`.chomp,
23
+ 'Govna',
24
+ 'captain',
25
+ 'boss',
26
+ 'cheef',
27
+ 'over loard',
28
+ 'dragon commander',
29
+ 'your excellence',
30
+ 'exhaulted one',
31
+ ]
32
+
33
+ STATUSES = [
34
+ 'all done here',
35
+ 'works done',
36
+ 'bingo!',
37
+ 'hazaa',
38
+ 'flip Yeah',
39
+ 'get back to work',
40
+ 'all systems go',
41
+ ]
42
+
43
+ def rand(arr)
44
+ arr.sample
45
+ end
46
+
47
+ def speak
48
+ `say -v#{rand(VOICES)} #{random_sentence}`
49
+ end
50
+
51
+ def random_sentence
52
+ "#{rand GREETINGS}, #{rand NAMES}! #{rand STATUSES}"
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,54 @@
1
+ require "cli/talky/talk/version"
2
+
3
+ module Cli
4
+ module Talky
5
+ module Talk
6
+ @voices = `say -v \?`.split("\n").select { |v| v =~ /en_US/ }.map { |v| v.gsub(/\s+en_US.*$/,"")}
7
+
8
+ @greetings = [
9
+ 'ahoy',
10
+ 'greeting',
11
+ 'saalutations',
12
+ 'waazame',
13
+ 'bleep booop',
14
+ 'exceslior',
15
+ 'land hoe',
16
+ 'hail',
17
+ ]
18
+
19
+ @names = [
20
+ `whoami`.chomp,
21
+ 'Govna',
22
+ 'captain',
23
+ 'boss',
24
+ 'cheef',
25
+ 'over loard',
26
+ 'dragon commander',
27
+ 'your excellence',
28
+ 'exhaulted one',
29
+ ]
30
+
31
+ @statuses = [
32
+ 'all done here',
33
+ 'works done',
34
+ 'bingo!',
35
+ 'hazaa',
36
+ 'flip Yeah',
37
+ 'get back to work',
38
+ 'all systems go',
39
+ ]
40
+
41
+ def rand(arr)
42
+ arr.sample
43
+ end
44
+
45
+ def speak
46
+ `say -v#{rand(@voices)} #{random_sentence}`
47
+ end
48
+
49
+ def random_sentence
50
+ "#{rand @greetings}, #{rand @names}! #{rand @statuses}"
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,3 @@
1
+ module CLITalkyTalk
2
+ VERSION = "0.0.1"
3
+ end
data/speak ADDED
@@ -0,0 +1,41 @@
1
+ #! /usr/bin/env ruby
2
+ # Some of the words are misspelled to help the say program pronounce them right
3
+ #
4
+ # copy the following line and paste for fun!
5
+ # curl -O https://gist.githubusercontent.com/mrinterweb/0ed2ac30a97e25e03fad/raw/e56fdb4940e0222f45cc6255c6673ffccce9acef/speak.rb && mv speak.rb talk && chmod a+x speak && ./speak
6
+
7
+ # get a list of all possible voices
8
+ voices = `say -v \?`.split("\n").select { |v| v =~ /en_US/ }.map { |v| v.gsub(/\s+en_US.*$/,"")}
9
+ greetings = [
10
+ 'ahoy',
11
+ 'greeting',
12
+ 'saalutations',
13
+ 'waazame',
14
+ 'bleep booop',
15
+ 'exceslior',
16
+ 'land hoe',
17
+ 'hail',
18
+ ]
19
+ names = [
20
+ `whoami`.chomp,
21
+ 'Govna',
22
+ 'captain',
23
+ 'boss',
24
+ 'cheef',
25
+ 'over loard',
26
+ 'dragon commander',
27
+ 'your excellence',
28
+ 'exhaulted one',
29
+ ]
30
+ statuses = [
31
+ 'all done here',
32
+ 'works done',
33
+ 'bingo!',
34
+ 'hazaa',
35
+ 'flip Yeah',
36
+ 'get back to work',
37
+ 'all systems go',
38
+ ]
39
+ r = ->(arr) { arr.sample }
40
+ str = "#{r[greetings]}, #{r[names]}! #{r[statuses]}"
41
+ `say -v#{r[voices]} #{str}`
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cli-talky-talk
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Sean McCleary
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.10'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.10'
55
+ description: Tired of staring at the terminal waiting for tasks to complete. Wouldn't
56
+ it be cool if your computer could speak to you when the task is done?
57
+ email:
58
+ - seanmcc@gmail.com
59
+ executables:
60
+ - speak
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - ".gitignore"
65
+ - Gemfile
66
+ - LICENSE
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - bin/speak
71
+ - cli-talky-talk.gemspec
72
+ - lib/cli-talky-talk.rb
73
+ - lib/cli_talky_talk/talk.rb
74
+ - lib/cli_talky_talk/version.rb
75
+ - speak
76
+ homepage: https://github.com/mrinterweb/cli-talky-talk
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.4.6
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: Gives you a random spoken greeting
100
+ test_files: []