ttt-client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +50 -0
- data/LICENSE.txt +21 -0
- data/README.md +35 -0
- data/Rakefile +1 -0
- data/bin/ttt +2 -0
- data/lib/ttt.rb +40 -0
- data/lib/ttt/extra.rb +27 -0
- data/lib/ttt/version.rb +8 -0
- data/ttt.gemspec +27 -0
- metadata +137 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4c6fbaf970c3e611402ee7d0b67b9133ea5ff318
|
4
|
+
data.tar.gz: db6e3bd8fb7727c74df166c0404bffd4dba06f3e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c835dc3b713adb836972247d281e98582fb2ba0cb913c3a19efc1a05f7a9160b12c94a54ebdc53ed55a6ee7363c9b2530b80cd31ead1e05fb692f8014f3e25c1
|
7
|
+
data.tar.gz: abb01a380f5823c2e07fc056b5f3ee2d8f74f776bcade390ba56d8e565be868a46cd56066660aefb6c6241d286c4a140bc9a3733c557723591ed058918e10342
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ttt-client (0.0.2)
|
5
|
+
colorize (~> 0.7.5)
|
6
|
+
commander (~> 4.3.0)
|
7
|
+
twitter (~> 5.14, >= 5.14.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
addressable (2.3.7)
|
13
|
+
buftok (0.2.0)
|
14
|
+
colorize (0.7.5)
|
15
|
+
commander (4.3.0)
|
16
|
+
highline (~> 1.6.11)
|
17
|
+
equalizer (0.0.9)
|
18
|
+
faraday (0.9.1)
|
19
|
+
multipart-post (>= 1.2, < 3)
|
20
|
+
highline (1.6.21)
|
21
|
+
http (0.6.3)
|
22
|
+
http_parser.rb (~> 0.6.0)
|
23
|
+
http_parser.rb (0.6.0)
|
24
|
+
json (1.8.2)
|
25
|
+
memoizable (0.4.2)
|
26
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
27
|
+
multipart-post (2.0.0)
|
28
|
+
naught (1.0.0)
|
29
|
+
rake (10.4.2)
|
30
|
+
simple_oauth (0.3.1)
|
31
|
+
thread_safe (0.3.5)
|
32
|
+
twitter (5.14.0)
|
33
|
+
addressable (~> 2.3)
|
34
|
+
buftok (~> 0.2.0)
|
35
|
+
equalizer (~> 0.0.9)
|
36
|
+
faraday (~> 0.9.0)
|
37
|
+
http (~> 0.6.0)
|
38
|
+
http_parser.rb (~> 0.6.0)
|
39
|
+
json (~> 1.8)
|
40
|
+
memoizable (~> 0.4.0)
|
41
|
+
naught (~> 1.0)
|
42
|
+
simple_oauth (~> 0.3.0)
|
43
|
+
|
44
|
+
PLATFORMS
|
45
|
+
ruby
|
46
|
+
|
47
|
+
DEPENDENCIES
|
48
|
+
bundler (~> 1.8)
|
49
|
+
rake (~> 10.0)
|
50
|
+
ttt-client!
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Josh Trommel
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
tech teen twitter CLI
|
2
|
+
======================
|
3
|
+
|
4
|
+
a Twitter CLI for the future steve jobs'.
|
5
|
+
|
6
|
+
usage
|
7
|
+
======
|
8
|
+
|
9
|
+
```bash
|
10
|
+
gem install ttt-client
|
11
|
+
ttt [arguments]
|
12
|
+
```
|
13
|
+
|
14
|
+
rake isn't working with this project (at least to install gems) because i'm stupid
|
15
|
+
|
16
|
+
goal
|
17
|
+
====
|
18
|
+
|
19
|
+
make a CLI Twitter client that you can only interact with members of
|
20
|
+
teen tech twitter with
|
21
|
+
|
22
|
+
docs
|
23
|
+
====
|
24
|
+
|
25
|
+
update later
|
26
|
+
|
27
|
+
|
28
|
+
contribution
|
29
|
+
------------
|
30
|
+
|
31
|
+
```bash
|
32
|
+
git clone git@github.com:probablyjosh/ttt.git
|
33
|
+
cd ttt/
|
34
|
+
git checkout -b your-feature # then PR PR PR :)
|
35
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/ttt
ADDED
data/lib/ttt.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Written by teen tech twitter's president, @nulljosh
|
2
|
+
# github.com/probablyjosh/ttt
|
3
|
+
|
4
|
+
# Require gems
|
5
|
+
require 'twitter'
|
6
|
+
require 'colorize'
|
7
|
+
require 'json'
|
8
|
+
require 'commander/import'
|
9
|
+
require_relative 'ttt/version'
|
10
|
+
|
11
|
+
program :name, 'teen tech twitter client'
|
12
|
+
program :version, Ttt::Version::STRING
|
13
|
+
program :description, 'The official Twitter CLI for Tech Teen Twitter'
|
14
|
+
|
15
|
+
command :init do |c|
|
16
|
+
c.syntax = 'ttt init'
|
17
|
+
c.description = 'Initializes ~/.ttt_keys.json'
|
18
|
+
c.action do
|
19
|
+
keys = {}
|
20
|
+
print "Consumer key: "
|
21
|
+
keys[:consumer_key] = STDIN.gets.chomp
|
22
|
+
print "Consumer secret: "
|
23
|
+
keys[:consumer_secret] = STDIN.gets.chomp
|
24
|
+
print "Access Token: "
|
25
|
+
keys[:access_token] = STDIN.gets.chomp
|
26
|
+
print "Access Token Secret: "
|
27
|
+
keys[:access_token_secret] = STDIN.gets.chomp
|
28
|
+
|
29
|
+
tempHash = {
|
30
|
+
:consumer_key => keys[:consumer_key],
|
31
|
+
:consumer_secret => keys[:consumer_secret],
|
32
|
+
:access_token => keys[:access_token],
|
33
|
+
:access_token_secret => keys[:access_token_secret],
|
34
|
+
}
|
35
|
+
|
36
|
+
file = ENV['HOME'] + '/.ttt_keys.json'
|
37
|
+
File.open(file, 'w') { |f| f.write(JSON.pretty_generate(tempHash)) }
|
38
|
+
puts "Keys written to #{file}"
|
39
|
+
end
|
40
|
+
end
|
data/lib/ttt/extra.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Read & parse JSON for keys
|
2
|
+
file = File.read ENV['HOME'] + '/.ttt_keys.json'
|
3
|
+
keys = JSON.parse file
|
4
|
+
|
5
|
+
client = Twitter::REST::Client.new do |config|
|
6
|
+
config.consumer_key = keys['consumer_key']
|
7
|
+
config.consumer_secret = keys['consumer_secret']
|
8
|
+
config.access_token = keys['access_token']
|
9
|
+
config.access_token_secret = keys['access_token_secret']
|
10
|
+
end
|
11
|
+
|
12
|
+
client.lists.each do |list|
|
13
|
+
if list.name == "Teen Tech Twitter"
|
14
|
+
|
15
|
+
# Header and description
|
16
|
+
puts list.name.colorize(:blue)
|
17
|
+
puts list.description.colorize(:green)
|
18
|
+
|
19
|
+
# Print list members
|
20
|
+
client.list_members(list).each do |user|
|
21
|
+
print '@' + user.screen_name + ' '
|
22
|
+
end
|
23
|
+
|
24
|
+
puts
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
data/lib/ttt/version.rb
ADDED
data/ttt.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require_relative 'lib/ttt/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ttt-client"
|
8
|
+
spec.version = Ttt::Version::STRING
|
9
|
+
spec.authors = ["Josh Trommel"]
|
10
|
+
spec.email = ["joshtrommel@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "The official Twitter CLI for Tech Teen Twitter"
|
13
|
+
spec.description = "Cross Tweetbot off your list. TTT is your Twitter CLI"
|
14
|
+
spec.homepage = "https://github.com/probablyjosh/ttt"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.executables = ['ttt']
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'twitter', '~> 5.14', '>= 5.14.0'
|
22
|
+
spec.add_runtime_dependency "colorize", "~> 0.7.5"
|
23
|
+
spec.add_runtime_dependency "commander", "~> 4.3.0", '>= 4.3.0'
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.8"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ttt-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Trommel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: twitter
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.14'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 5.14.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '5.14'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 5.14.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: colorize
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.7.5
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.7.5
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: commander
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 4.3.0
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 4.3.0
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 4.3.0
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 4.3.0
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: bundler
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '1.8'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '1.8'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: rake
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '10.0'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '10.0'
|
95
|
+
description: Cross Tweetbot off your list. TTT is your Twitter CLI
|
96
|
+
email:
|
97
|
+
- joshtrommel@gmail.com
|
98
|
+
executables:
|
99
|
+
- ttt
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- Gemfile
|
104
|
+
- Gemfile.lock
|
105
|
+
- LICENSE.txt
|
106
|
+
- README.md
|
107
|
+
- Rakefile
|
108
|
+
- bin/ttt
|
109
|
+
- lib/ttt.rb
|
110
|
+
- lib/ttt/extra.rb
|
111
|
+
- lib/ttt/version.rb
|
112
|
+
- ttt.gemspec
|
113
|
+
homepage: https://github.com/probablyjosh/ttt
|
114
|
+
licenses:
|
115
|
+
- MIT
|
116
|
+
metadata: {}
|
117
|
+
post_install_message:
|
118
|
+
rdoc_options: []
|
119
|
+
require_paths:
|
120
|
+
- lib
|
121
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
requirements: []
|
132
|
+
rubyforge_project:
|
133
|
+
rubygems_version: 2.4.5
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: The official Twitter CLI for Tech Teen Twitter
|
137
|
+
test_files: []
|