flickr_cli 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/flickr_cli.rb +5 -4
- data/lib/menu.rb +7 -4
- metadata +18 -46
- data/lib/authentication.rb +0 -38
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fadfd725bf1a040f912c0cdcf21e5e7a9a3e1265bb6ba9b2d097ce8986837935
|
4
|
+
data.tar.gz: e535427bda7e350be09ba314d743b6b432311042208f22c4337a0375ae36deb5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5c043c16ac74a7017ce89f1e4a2a9da3dd493aa0f36513dfdfb3446e62c6aff8f5d962dda246157553870e9e37c796e2350c7ec6b76a580a39175451f289718b
|
7
|
+
data.tar.gz: 63b9d723928f587ddb243b8c38a27c1a322e5bb8d2272d44dd0c247eec7b4433089247deb13e54fb83a3af8b5ba4fd1aca70f246e34c3c583addc7dec31865e5
|
data/lib/flickr_cli.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
# Extental Dependencies
|
2
2
|
require 'rubygems'
|
3
|
-
require 'flickraw'
|
4
|
-
require 'launchy'
|
5
3
|
require 'highline/import'
|
6
4
|
require 'asciiart'
|
5
|
+
require 'flickr_authentication'
|
7
6
|
|
8
7
|
# Internal Libraries
|
9
|
-
require 'authentication'
|
10
8
|
require 'menu'
|
11
9
|
|
12
10
|
module FlickrCli
|
@@ -14,7 +12,10 @@ module FlickrCli
|
|
14
12
|
def self.start_program
|
15
13
|
HighLine.track_eof = false
|
16
14
|
|
17
|
-
|
15
|
+
fa = FlickrAuthentication.new(key: 'e8505c88feb2c0cc9d2da6bcbe18767c', shared_secret: 'd344de362ea86f0e', auth_file: File.join(Dir.home, ".flickr_clirc"))
|
16
|
+
fa.authenticate
|
17
|
+
|
18
|
+
# Authentication.establish_session
|
18
19
|
Menu.main_menu
|
19
20
|
end
|
20
21
|
end
|
data/lib/menu.rb
CHANGED
@@ -61,10 +61,13 @@ module FlickrCli
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def self.good_by_message
|
64
|
-
[
|
65
|
-
"Goodbye - I'll never love again",
|
66
|
-
|
67
|
-
|
64
|
+
['Be that way.',
|
65
|
+
"Goodbye - I'll never love again.",
|
66
|
+
'I love my kid, is that a crime?',
|
67
|
+
'Smell u l8er sk8ter',
|
68
|
+
'How could you do this to me? Now?',
|
69
|
+
'Listen to Lilys, Swervedriver, and The Swirilies.',
|
70
|
+
'Flickr? I hardly know her'].sample
|
68
71
|
end
|
69
72
|
|
70
73
|
def self.contacts
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickr_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Stephen Schor
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: highline
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - '='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,73 +20,50 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - '='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 1.6.11
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - '='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: 0.4.0
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - '='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 0.4.0
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: flickraw
|
28
|
+
name: asciiart
|
48
29
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
30
|
requirements:
|
51
31
|
- - '='
|
52
32
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
33
|
+
version: 0.3.0
|
54
34
|
type: :runtime
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
37
|
requirements:
|
59
38
|
- - '='
|
60
39
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
40
|
+
version: 0.3.0
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
42
|
+
name: flickr_authentication
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
45
|
- - '='
|
68
46
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.0.
|
47
|
+
version: 0.0.4
|
70
48
|
type: :runtime
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
52
|
- - '='
|
76
53
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.0.
|
54
|
+
version: 0.0.4
|
78
55
|
- !ruby/object:Gem::Dependency
|
79
56
|
name: pry
|
80
57
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
58
|
requirements:
|
83
|
-
- -
|
59
|
+
- - ">="
|
84
60
|
- !ruby/object:Gem::Version
|
85
61
|
version: '0'
|
86
62
|
type: :development
|
87
63
|
prerelease: false
|
88
64
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
|
-
- -
|
66
|
+
- - ">="
|
92
67
|
- !ruby/object:Gem::Version
|
93
68
|
version: '0'
|
94
69
|
description: A Command-Line tool for exploring your flickr account
|
@@ -100,31 +75,28 @@ extensions: []
|
|
100
75
|
extra_rdoc_files: []
|
101
76
|
files:
|
102
77
|
- bin/flickr_cli
|
103
|
-
- lib/authentication.rb
|
104
78
|
- lib/flickr_cli.rb
|
105
79
|
- lib/menu.rb
|
106
80
|
homepage: https://github.com/nodanaonlyzuul/flickr_cli
|
107
81
|
licenses: []
|
108
|
-
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
109
84
|
rdoc_options: []
|
110
85
|
require_paths:
|
111
86
|
- lib
|
112
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
88
|
requirements:
|
115
|
-
- -
|
89
|
+
- - ">="
|
116
90
|
- !ruby/object:Gem::Version
|
117
91
|
version: '0'
|
118
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
-
none: false
|
120
93
|
requirements:
|
121
|
-
- -
|
94
|
+
- - ">="
|
122
95
|
- !ruby/object:Gem::Version
|
123
96
|
version: '0'
|
124
97
|
requirements: []
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
specification_version: 3
|
98
|
+
rubygems_version: 3.3.3
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
129
101
|
summary: A Command-Line tool for exploring your flickr account
|
130
102
|
test_files: []
|
data/lib/authentication.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
module FlickrCli
|
2
|
-
module Authentication
|
3
|
-
def self.establish_session
|
4
|
-
auth_file = File.join(Dir.home, ".flickr_clirc")
|
5
|
-
FlickRaw.api_key = "e8505c88feb2c0cc9d2da6bcbe18767c"
|
6
|
-
FlickRaw.shared_secret = "d344de362ea86f0e"
|
7
|
-
|
8
|
-
if File.exists?(auth_file)
|
9
|
-
puts "authenticating with #{auth_file}"
|
10
|
-
data = YAML.load_file(auth_file)
|
11
|
-
auth = flickr.auth.checkToken :auth_token => data["api_token"]
|
12
|
-
else
|
13
|
-
frob = flickr.auth.getFrob
|
14
|
-
auth_url = FlickRaw.auth_url :frob => frob, :perms => "write"
|
15
|
-
|
16
|
-
puts " "
|
17
|
-
puts "opening your browser..."
|
18
|
-
sleep 1
|
19
|
-
puts "Come back and press Enter when you are finished"
|
20
|
-
sleep 2
|
21
|
-
Launchy.open(auth_url)
|
22
|
-
|
23
|
-
STDIN.getc
|
24
|
-
|
25
|
-
# Authentication
|
26
|
-
auth = flickr.auth.getToken :frob => frob
|
27
|
-
login = flickr.test.login
|
28
|
-
|
29
|
-
puts auth.token
|
30
|
-
|
31
|
-
require 'yaml'
|
32
|
-
data = {}
|
33
|
-
data["api_token"] = auth.token
|
34
|
-
File.open(auth_file, "w"){|f| YAML.dump(data, f) }
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|