nehm 2.1.5 → 2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +6 -6
- data/lib/nehm.rb +8 -8
- data/lib/nehm/command_manager.rb +1 -1
- data/lib/nehm/commands/{select_command.rb → list_command.rb} +7 -7
- data/lib/nehm/path_manager.rb +1 -1
- data/lib/nehm/playlist_manager.rb +3 -1
- data/lib/nehm/track_manager.rb +4 -2
- data/lib/nehm/user_manager.rb +3 -1
- data/lib/nehm/version.rb +1 -1
- data/nehm.gemspec +2 -2
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bf7e68091443c74df5a8e00dcc08a999727ce5a
|
4
|
+
data.tar.gz: a0e51c37733f016e288897e6810c2ad9b189b814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0234c789ef84484ff2cc78432a971035fb2bd7ae985b3760cc0231e3b5cd8cf247497ed7d5f1f80f1b14861722a751f0032feb2d759c5ea4926f5d09889a6b7
|
7
|
+
data.tar.gz: 1983f674098e5a068b1fa944e773afaad4e5530f6cefc5cc13415f374f2b756e6e221e3ab594bfb6c99581f3e4c38ce0b42d31757675150bf3150f2574ecc301
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<img src="https://raw.github.com/bogem/nehm/master/Pictures/logo.png" alt="Logo"></img>
|
3
3
|
|
4
4
|
|
5
|
-
<p><b><i>nehm</i></b> is a console tool, which downloads, sets IDv3 tags and adds to your iTunes library your <b>SoundCloud</b> posts or likes in convenient way</p>
|
5
|
+
<p><b><i>nehm</i></b> is a console tool, which downloads, sets IDv3 tags (and adds to your iTunes library) your <b>SoundCloud</b> posts or likes in convenient way</p>
|
6
6
|
|
7
7
|
<a href="http://badge.fury.io/rb/nehm"><img src="https://badge.fury.io/rb/nehm.svg" alt="Gem Version"></img></a>
|
8
8
|
<a href="https://gemnasium.com/bogem/nehm"><img src="https://gemnasium.com/bogem/nehm.svg" alt="Dependency staus"></img></a>
|
@@ -12,8 +12,8 @@
|
|
12
12
|
---
|
13
13
|
<div align="center">
|
14
14
|
<a href="https://www.dropbox.com/s/m4heiyq7vbpc4qs/1help.png" target="_blank"><img src="https://raw.github.com/bogem/nehm/master/Pictures/1help.png" alt="Help"></img></a>
|
15
|
-
<a href="https://www.dropbox.com/s/b68flm7hv5myhk4/2get.png" target="_blank"><img src="https://raw.github.com/bogem/nehm/master/Pictures/2get.png" alt="
|
16
|
-
<a href="https://www.dropbox.com/s/5gy6c5nzrsvhlv0/3select.png" target="_blank"><img src="https://raw.github.com/bogem/nehm/master/Pictures/3select.png" alt="
|
15
|
+
<a href="https://www.dropbox.com/s/b68flm7hv5myhk4/2get.png" target="_blank"><img src="https://raw.github.com/bogem/nehm/master/Pictures/2get.png" alt="Get"></img></a>
|
16
|
+
<a href="https://www.dropbox.com/s/5gy6c5nzrsvhlv0/3select.png" target="_blank"><img src="https://raw.github.com/bogem/nehm/master/Pictures/3select.png" alt="List"></img></a>
|
17
17
|
<a href="https://www.dropbox.com/s/ynn9kb0ykcdishp/4search.png" target="_blank"><img src="https://raw.github.com/bogem/nehm/master/Pictures/4search.png" alt="Search"></img></a>
|
18
18
|
|
19
19
|
<p><b>(click to zoom)</b></p>
|
@@ -106,13 +106,13 @@ Also commands and arguments (but **NOT** options) may be abbreviated, so long as
|
|
106
106
|
|
107
107
|
`$ nehm g https://soundcloud.com/nasa/delta-iv-launch`
|
108
108
|
|
109
|
-
####
|
109
|
+
#### Get list of likes or posts and download selected
|
110
110
|
|
111
|
-
`$ nehm
|
111
|
+
`$ nehm list likes` = `$ nehm l l`
|
112
112
|
|
113
113
|
#### Search for tracks and download them
|
114
114
|
|
115
|
-
`$ nehm search kanye west` = `$ nehm
|
115
|
+
`$ nehm search kanye west` = `$ nehm s kanye west`
|
116
116
|
|
117
117
|
|
118
118
|
## FAQ
|
data/lib/nehm.rb
CHANGED
@@ -15,9 +15,9 @@ module Nehm
|
|
15
15
|
class NehmExit < SystemExit; end
|
16
16
|
|
17
17
|
def self.start(args)
|
18
|
-
init unless initialized?
|
19
|
-
|
20
18
|
begin
|
19
|
+
init unless initialized?
|
20
|
+
|
21
21
|
if args.empty?
|
22
22
|
UI.say HELP
|
23
23
|
UI.term
|
@@ -32,21 +32,21 @@ module Nehm
|
|
32
32
|
end
|
33
33
|
|
34
34
|
HELP = <<-EOF
|
35
|
-
#{'nehm'.green} is a console tool, which downloads, sets IDv3 tags and adds to your iTunes library your SoundCloud posts or likes in convenient way
|
35
|
+
#{'nehm'.green} is a console tool, which downloads, sets IDv3 tags (and adds to your iTunes library) your SoundCloud posts or likes in convenient way
|
36
36
|
|
37
37
|
#{'Available nehm commands:'.yellow}
|
38
|
-
#{'get'.green} Download, set tags and add to your iTunes library last post or like from your profile
|
39
|
-
#{'dl'.green} Download and set tags last post or like from your profile
|
38
|
+
#{'get'.green} Download, set tags and add to your iTunes library last post(s) or like(s) from your profile
|
39
|
+
#{'dl'.green} Download and set tags last post(s) or like(s) from your profile
|
40
40
|
#{'configure'.green} Configure application
|
41
41
|
#{'help'.green} Show help for specified command
|
42
|
+
#{'list'.green} Get list of likes or posts from your account and download selected
|
42
43
|
#{'search'.green} Search tracks, print them nicely and download selected tracks
|
43
|
-
#{'select'.green} Get likes or posts from your account, nicely print them and download selected tracks
|
44
44
|
#{'version'.green} Show version of installed nehm
|
45
45
|
|
46
46
|
See #{'nehm help COMMAND'.yellow} to read about a specific command
|
47
47
|
|
48
|
-
Commands and arguments (but NOT options) may be abbreviated, so long as they are unambiguous
|
49
|
-
e.g. 'nehm g l' is short for 'nehm get like'.
|
48
|
+
Commands and arguments (but NOT options) may be abbreviated, so long as they are unambiguous
|
49
|
+
e.g. #{'nehm g l'.magenta} is short for #{'nehm get like'.magenta}
|
50
50
|
EOF
|
51
51
|
|
52
52
|
module_function
|
data/lib/nehm/command_manager.rb
CHANGED
@@ -3,16 +3,16 @@ require 'nehm/tracks_view_command'
|
|
3
3
|
module Nehm
|
4
4
|
|
5
5
|
##
|
6
|
-
# This command gets likes/posts from user's account,
|
6
|
+
# This command gets list of likes/posts from user's account,
|
7
7
|
# Prints as menu, and downloads selected tracks
|
8
8
|
|
9
|
-
class
|
9
|
+
class ListCommand < TracksViewCommand
|
10
10
|
|
11
11
|
def initialize
|
12
12
|
super
|
13
13
|
|
14
14
|
add_option(:from, 'from PERMALINK',
|
15
|
-
'
|
15
|
+
'Get list of track(s) from user with PERMALINK')
|
16
16
|
|
17
17
|
add_option(:to, 'to PATH',
|
18
18
|
'Download track(s) to PATH')
|
@@ -31,12 +31,12 @@ module Nehm
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def arguments
|
34
|
-
{ 'likes' => '
|
35
|
-
'posts' => '
|
34
|
+
{ 'likes' => 'List of likes',
|
35
|
+
'posts' => 'List of posts' }
|
36
36
|
end
|
37
37
|
|
38
38
|
def program_name
|
39
|
-
'nehm
|
39
|
+
'nehm list'
|
40
40
|
end
|
41
41
|
|
42
42
|
def execute
|
@@ -45,7 +45,7 @@ module Nehm
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def summary
|
48
|
-
'Get likes or posts from your account
|
48
|
+
'Get list of likes or posts from your account and download selected'
|
49
49
|
end
|
50
50
|
|
51
51
|
def usage
|
data/lib/nehm/path_manager.rb
CHANGED
@@ -14,7 +14,7 @@ module Nehm
|
|
14
14
|
|
15
15
|
def self.get_path(path)
|
16
16
|
# Check path for existence
|
17
|
-
UI.term 'Invalid download path
|
17
|
+
UI.term 'Invalid download path. Please enter correct path' unless Dir.exist?(path)
|
18
18
|
|
19
19
|
File.expand_path(path)
|
20
20
|
end
|
@@ -25,7 +25,9 @@ module Nehm
|
|
25
25
|
|
26
26
|
def self.set_playlist
|
27
27
|
loop do
|
28
|
-
playlist = UI.ask('Enter name of
|
28
|
+
playlist = UI.ask('Enter name of iTunes playlist to that you want ' \
|
29
|
+
'add tracks (press Enter to set it to ' \
|
30
|
+
'default iTunes Music library):')
|
29
31
|
|
30
32
|
# If entered nothing, unset iTunes playlist
|
31
33
|
if playlist == ''
|
data/lib/nehm/track_manager.rb
CHANGED
@@ -106,7 +106,8 @@ module Nehm
|
|
106
106
|
@uid = permalink ? UserManager.get_uid(permalink) : UserManager.default_uid
|
107
107
|
unless @uid
|
108
108
|
UI.error "You didn't logged in"
|
109
|
-
UI.say "Login from #{'nehm configure'.yellow}
|
109
|
+
UI.say "Login from #{'nehm configure'.yellow} " \
|
110
|
+
"or use #{'[from PERMALINK]'.yellow} option"
|
110
111
|
UI.term
|
111
112
|
end
|
112
113
|
|
@@ -117,7 +118,8 @@ module Nehm
|
|
117
118
|
ENV['dl_path'] = dl_path
|
118
119
|
else
|
119
120
|
UI.error "You don't set up download path!"
|
120
|
-
UI.say "Set it up from #{'nehm configure'.yellow}
|
121
|
+
UI.say "Set it up from #{'nehm configure'.yellow} " \
|
122
|
+
"or use #{'to PATH'.yellow} option"
|
121
123
|
UI.term
|
122
124
|
end
|
123
125
|
|
data/lib/nehm/user_manager.rb
CHANGED
@@ -22,7 +22,9 @@ module Nehm
|
|
22
22
|
|
23
23
|
def self.set_uid
|
24
24
|
loop do
|
25
|
-
permalink = UI.ask('Please enter your permalink
|
25
|
+
permalink = UI.ask('Please enter your permalink ' \
|
26
|
+
'(last word in your profile url): ')
|
27
|
+
|
26
28
|
user = Client.user(permalink)
|
27
29
|
if user
|
28
30
|
Cfg[:default_id] = user['id']
|
data/lib/nehm/version.rb
CHANGED
data/nehm.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ['Albert Nigmatzianov']
|
10
10
|
spec.email = ['albertnigma@gmail.com']
|
11
11
|
|
12
|
-
spec.summary = 'Convenient way to download tracks (
|
13
|
-
spec.description = 'nehm is a console tool, which downloads, sets IDv3 tags and adds to your iTunes library your SoundCloud posts or likes in convenient way. See homepage for instructions'
|
12
|
+
spec.summary = 'Convenient way to download tracks (and add them to iTunes) from SoundCloud via terminal'
|
13
|
+
spec.description = 'nehm is a console tool, which downloads, sets IDv3 tags (and adds to your iTunes library) your SoundCloud posts or likes in convenient way. See homepage for instructions'
|
14
14
|
spec.homepage = 'http://www.github.com/bogem/nehm'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nehm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: '2.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Nigmatzianov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: certifi
|
@@ -80,9 +80,9 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description: nehm is a console tool, which downloads, sets IDv3 tags and adds to
|
84
|
-
iTunes library your SoundCloud posts or likes in convenient way. See homepage
|
85
|
-
instructions
|
83
|
+
description: nehm is a console tool, which downloads, sets IDv3 tags (and adds to
|
84
|
+
your iTunes library) your SoundCloud posts or likes in convenient way. See homepage
|
85
|
+
for instructions
|
86
86
|
email:
|
87
87
|
- albertnigma@gmail.com
|
88
88
|
executables:
|
@@ -111,8 +111,8 @@ files:
|
|
111
111
|
- lib/nehm/commands/dl_command.rb
|
112
112
|
- lib/nehm/commands/get_command.rb
|
113
113
|
- lib/nehm/commands/help_command.rb
|
114
|
+
- lib/nehm/commands/list_command.rb
|
114
115
|
- lib/nehm/commands/search_command.rb
|
115
|
-
- lib/nehm/commands/select_command.rb
|
116
116
|
- lib/nehm/commands/version_command.rb
|
117
117
|
- lib/nehm/http_client.rb
|
118
118
|
- lib/nehm/menu.rb
|
@@ -151,5 +151,6 @@ rubyforge_project:
|
|
151
151
|
rubygems_version: 2.5.0
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
|
-
summary: Convenient way to download tracks (
|
154
|
+
summary: Convenient way to download tracks (and add them to iTunes) from SoundCloud
|
155
|
+
via terminal
|
155
156
|
test_files: []
|