nehm 1.0.7.1 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -4
- data/README.md +4 -0
- data/lib/nehm/help.rb +15 -9
- data/lib/nehm/track_utils.rb +17 -4
- data/lib/nehm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9c9545cfe38f0c3e10bd266e91ea5ae1751711d
|
4
|
+
data.tar.gz: 80821931bd91b2158e2f95fe4afd8b89d44deb30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb946ad6b78d06d6a17136a0ba5d700a4ff75554fc1dab0f55b669fed3b1ca13ff9c663002a29a5ea5ea32a73622475109f40e81c0f9a18f20f4b6419445f8e7
|
7
|
+
data.tar.gz: c57d2aaf0e4ca759269f6cab88dbc239e94b437e202c6ff6cf38f871f0b152aaba38e9cfa628c955d100c7aaef56f21da076d9c57fa1d30b417d9c5442e8afab
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,27 @@
|
|
1
|
-
# nehm
|
1
|
+
# nehm change log
|
2
|
+
|
3
|
+
## 1.1
|
4
|
+
|
5
|
+
* Add 'from PERMALINK' feature
|
6
|
+
|
7
|
+
## 1.0.7.1
|
8
|
+
|
9
|
+
* Remove useless dependency :)
|
10
|
+
|
11
|
+
## 1.0.7
|
12
|
+
|
13
|
+
* Add paint dependency
|
14
|
+
|
15
|
+
## 1.0.6.1
|
16
|
+
|
17
|
+
* Edit gem description
|
18
|
+
* Edit dependencies
|
19
|
+
|
20
|
+
## 1.0.6
|
21
|
+
|
22
|
+
* Add check for invalid number of likes/posts
|
23
|
+
* Add CHANGELOG.md
|
24
|
+
* Use OPTIONS instead of [options] in help
|
2
25
|
|
3
26
|
## 1.0.5
|
4
27
|
|
@@ -15,7 +38,6 @@
|
|
15
38
|
## 1.0.2
|
16
39
|
|
17
40
|
* Edit path to nehm version in Rakefile
|
18
|
-
|
19
41
|
* Fix: nehm fails, then setting tags to track
|
20
42
|
|
21
43
|
## 1.0.1
|
@@ -23,11 +45,9 @@
|
|
23
45
|
* Rakefile:
|
24
46
|
|
25
47
|
* Add push (push to rubygems.org) task
|
26
|
-
|
27
48
|
* Modify tasks
|
28
49
|
|
29
50
|
* Edit required Ruby version
|
30
|
-
|
31
51
|
* Fix: if you invalid argument in 'nehm get', then app fails
|
32
52
|
|
33
53
|
## 1.0
|
data/README.md
CHANGED
@@ -58,6 +58,10 @@ Go to usage for further instructions
|
|
58
58
|
|
59
59
|
`nehm get 3 posts` or `nehm get 3 likes`
|
60
60
|
|
61
|
+
* To get last post(s) or like(s) from another user
|
62
|
+
|
63
|
+
`nehm get post from nasa` or `nehm get like from nasa`
|
64
|
+
|
61
65
|
* To just download and set tags any track, you can input
|
62
66
|
|
63
67
|
`nehm dl post` or `nehm dl like` or `nehm dl 3 likes` and etc.
|
data/lib/nehm/help.rb
CHANGED
@@ -32,23 +32,29 @@ module Help
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def dl
|
35
|
-
puts Paint['Input: ', :yellow] + 'nehm dl OPTIONS'
|
35
|
+
puts Paint['Input: ', :yellow] + 'nehm dl OPTIONS [from PERMALINK]'
|
36
36
|
|
37
|
-
puts Paint['
|
38
|
-
puts ' ' + Paint['
|
39
|
-
puts ' ' + Paint['
|
37
|
+
puts Paint['OPTIONS:', :yellow]
|
38
|
+
puts ' ' + Paint['post', :green] + ' - Downloading and setting tags last post(track or repost) from your profile'
|
39
|
+
puts ' ' + Paint['<number> posts', :green] + ' - Downloading and setting tags last <number> posts from your profile'
|
40
40
|
puts ' ' + Paint['like', :green] + ' - Downloading and setting tags your last like'
|
41
|
-
puts ' ' + Paint['
|
41
|
+
puts ' ' + Paint['<number> likes', :green] + ' - Downloading and setting tags your last <number> likes'
|
42
|
+
|
43
|
+
puts Paint['Extra options:', :yellow]
|
44
|
+
puts ' ' + Paint['from PERMALINK', :green] + ' - Do the aforecited operations from the custom user profile'
|
42
45
|
end
|
43
46
|
|
44
47
|
def get
|
45
|
-
puts Paint['Input: ', :yellow] + 'nehm get OPTIONS'
|
48
|
+
puts Paint['Input: ', :yellow] + 'nehm get OPTIONS [from PERMALINK]'
|
46
49
|
|
47
50
|
puts Paint['Available options:', :yellow]
|
48
|
-
puts ' ' + Paint['
|
49
|
-
puts ' ' + Paint['
|
51
|
+
puts ' ' + Paint['post', :green] + ' - Downloading, setting tags and adding to your iTunes library last post(track or repost) from your profile'
|
52
|
+
puts ' ' + Paint['<number> posts', :green] + ' - Downloading, setting tags and adding to your iTunes library last <number> posts from your profile'
|
50
53
|
puts ' ' + Paint['like', :green] + ' - Downloading, setting tags and adding to your iTunes library your last like'
|
51
|
-
puts ' ' + Paint['
|
54
|
+
puts ' ' + Paint['<number> likes', :green] + ' - Downloading, setting tags and adding to your iTunes library your last <number> likes'
|
55
|
+
|
56
|
+
puts Paint['Extra options:', :yellow]
|
57
|
+
puts ' ' + Paint['from PERMALINK', :green] + ' - Do the aforecited operations from the profile with PERMALINK'
|
52
58
|
end
|
53
59
|
|
54
60
|
def permalink
|
data/lib/nehm/track_utils.rb
CHANGED
@@ -13,22 +13,35 @@ module TrackUtils
|
|
13
13
|
# Public
|
14
14
|
|
15
15
|
def self.get(dl, args)
|
16
|
+
user =
|
17
|
+
# If option 'from ...' wrote
|
18
|
+
if args.include? 'from'
|
19
|
+
index = args.index('from')
|
20
|
+
username = args[index + 1]
|
21
|
+
|
22
|
+
args.delete_at(index + 1)
|
23
|
+
args.delete_at(index)
|
24
|
+
User.new(username)
|
25
|
+
else
|
26
|
+
User.new
|
27
|
+
end
|
28
|
+
|
16
29
|
tracks = []
|
17
30
|
tracks +=
|
18
31
|
case args.last
|
19
32
|
when 'like'
|
20
|
-
|
33
|
+
user.likes(1)
|
21
34
|
|
22
35
|
when 'post'
|
23
|
-
|
36
|
+
user.posts(1)
|
24
37
|
|
25
38
|
when 'likes'
|
26
39
|
count = args[-2].to_i
|
27
|
-
|
40
|
+
user.likes(count)
|
28
41
|
|
29
42
|
when 'posts'
|
30
43
|
count = args[-2].to_i
|
31
|
-
|
44
|
+
user.posts(count)
|
32
45
|
|
33
46
|
when %r{https:\/\/soundcloud.com\/}
|
34
47
|
track_from_url(args.last)
|
data/lib/nehm/version.rb
CHANGED
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: 1.
|
4
|
+
version: '1.1'
|
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-07-
|
11
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|