spotify_cli 0.1.2 → 0.1.3
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 +4 -4
- data/README.md +9 -0
- data/lib/spotify_cli.rb +2 -0
- data/lib/spotify_cli/api.rb +21 -0
- data/lib/spotify_cli/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d89089bbf95ecf6fc6907d34d312027716496713
|
|
4
|
+
data.tar.gz: cb4f280905c65702474d290e93b65a514f231f72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3726b3e80199fd2724709ce3b561a2e5f6ac3c67d0aa654e45a7daaada659ca804fb81666853376862011b4f8f333c3d4b6a1809bf2d28d3606f16a368d89d29
|
|
7
|
+
data.tar.gz: 14382481f89d1af7004fb3bfb45df6dfabba0fa8f34f169c2d5a18d958d6f99d4b75cc9e9827b93fe7ee94c57c2cfdc549fab18537a2a7ea7dfe85126cc1b6f4
|
data/README.md
CHANGED
data/lib/spotify_cli.rb
CHANGED
data/lib/spotify_cli/api.rb
CHANGED
|
@@ -108,6 +108,8 @@ module SpotifyCli
|
|
|
108
108
|
# 3 for padding around time, and symbol, and space for the symbol, 2 for frame
|
|
109
109
|
width = Dex::UI::Terminal.width - time.size - 5
|
|
110
110
|
|
|
111
|
+
yield if block_given?
|
|
112
|
+
|
|
111
113
|
Dex::UI.frame(stat[:track], timing: false) do
|
|
112
114
|
puts Dex::UI.resolve_text([
|
|
113
115
|
"{{bold:Artist:}} #{stat[:artist]}",
|
|
@@ -121,6 +123,25 @@ module SpotifyCli
|
|
|
121
123
|
end
|
|
122
124
|
end
|
|
123
125
|
|
|
126
|
+
# Watch and report the status the current song
|
|
127
|
+
#
|
|
128
|
+
# Usage:
|
|
129
|
+
# - spotify watch
|
|
130
|
+
def watch
|
|
131
|
+
printed = false
|
|
132
|
+
while true
|
|
133
|
+
status do
|
|
134
|
+
if printed
|
|
135
|
+
up = "\x1b[1A\x1b[1G"
|
|
136
|
+
clear = "\x1b[2K\x1b[1G"
|
|
137
|
+
5.times { print [up, clear].join }
|
|
138
|
+
end
|
|
139
|
+
printed = true
|
|
140
|
+
end
|
|
141
|
+
sleep 1
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
124
145
|
# Display Help
|
|
125
146
|
#
|
|
126
147
|
# Usage:
|
data/lib/spotify_cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spotify_cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Nadeau
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-05-
|
|
11
|
+
date: 2017-05-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: method_source
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ~>
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ~>
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ~>
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '1.14'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ~>
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '1.14'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rake
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ~>
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '10.0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ~>
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '10.0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: minitest
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - ~>
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '5.0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- -
|
|
66
|
+
- - ~>
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '5.0'
|
|
69
69
|
description: Allow control of Spotify using a pretty UI interface. Intentionally simple.
|
|
@@ -74,8 +74,8 @@ executables:
|
|
|
74
74
|
extensions: []
|
|
75
75
|
extra_rdoc_files: []
|
|
76
76
|
files:
|
|
77
|
-
-
|
|
78
|
-
-
|
|
77
|
+
- .gitignore
|
|
78
|
+
- .travis.yml
|
|
79
79
|
- CODE_OF_CONDUCT.md
|
|
80
80
|
- Gemfile
|
|
81
81
|
- README.md
|
|
@@ -113,17 +113,17 @@ require_paths:
|
|
|
113
113
|
- lib
|
|
114
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
requirements:
|
|
116
|
-
- -
|
|
116
|
+
- - '>='
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
118
|
version: '0'
|
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
|
-
- -
|
|
121
|
+
- - '>='
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: '0'
|
|
124
124
|
requirements: []
|
|
125
125
|
rubyforge_project:
|
|
126
|
-
rubygems_version: 2.
|
|
126
|
+
rubygems_version: 2.0.14.1
|
|
127
127
|
signing_key:
|
|
128
128
|
specification_version: 4
|
|
129
129
|
summary: Spotify Application wrapper for control via command line
|