nyaa_anime 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/.gitignore +23 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +46 -0
- data/Rakefile +2 -0
- data/bin/nyaa +3 -0
- data/bin/nyaa-get +4 -0
- data/bin/nyaa_anime +161 -0
- data/lib/nyaa_anime.rb +179 -0
- data/lib/nyaa_anime/version.rb +3 -0
- data/nyaa_anime.gemspec +34 -0
- metadata +184 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7b5f76e31eb304f9bd2da100db4ba61e7e8c7f9e
|
4
|
+
data.tar.gz: 98401204f42c1eef222d04311f11d393e8fa3d97
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5bb5df18e96208711349295ff4c72e2a7b29566a8020d6fd1ed0a4a7fe03b454f4f3919e6075db8295617d093f077a08ceb876b56ab338fbdd2dd2735995ef17
|
7
|
+
data.tar.gz: 41dd13be4176515d507aa2f2403600f245821a99cf655cd1761d2f4a0c617a69b1e7a9d817db888c559d90b554fe50a93b9cd1cfa3232935f779b7afc57f6cd5
|
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
*.swp
|
2
|
+
*.gem
|
3
|
+
*.rbc
|
4
|
+
.bundle
|
5
|
+
.config
|
6
|
+
.yardoc
|
7
|
+
Gemfile.lock
|
8
|
+
InstalledFiles
|
9
|
+
_yardoc
|
10
|
+
coverage
|
11
|
+
doc/
|
12
|
+
lib/bundler/man
|
13
|
+
pkg
|
14
|
+
rdoc
|
15
|
+
spec/reports
|
16
|
+
nyaa_anime/tmp
|
17
|
+
nyaa_anime/version_tmp
|
18
|
+
tmp
|
19
|
+
*.bundle
|
20
|
+
*.so
|
21
|
+
*.o
|
22
|
+
*.a
|
23
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Joshua Tsubaki Wu
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# NyaaAnime
|
2
|
+
|
3
|
+
`nyaa` (short for `nyaa_anime`) is the painless Nyaa Torrents anime command-line tool.
|
4
|
+
Search for and download anime torrents and open them automatically.
|
5
|
+
Results are color-coded - green for new episodes of previously downloaded torrents, cyan (blue) for previously downloaded torrents.
|
6
|
+
Automatically find and downloaded new episodes of previously downloaded anime with `$ nyaa-get`!
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
$ gem install nyaa_anime
|
11
|
+
|
12
|
+
That's all!
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
Run `$ nyaa` to see the usage text:
|
17
|
+
|
18
|
+
![Screenshot 2014-10-16 06.39.22.png](https://bitbucket.org/repo/yn7dbo/images/3610502476-Screenshot%202014-10-16%2006.39.22.png)
|
19
|
+
|
20
|
+
For example, try `$ nyaa -m -f ch no game no life`:
|
21
|
+
|
22
|
+
![Screenshot 2014-10-16 06.44.21.png](https://bitbucket.org/repo/yn7dbo/images/2797464601-Screenshot%202014-10-16%2006.44.21.png)
|
23
|
+
|
24
|
+
Downloads are saved to `~/Downloads/nyaa/`. Future queries will check the files there and automatically color-code the search results. Green is for new episodes of previously downloaded torrents, while cyan (blue) is for previously downloaded torrents:
|
25
|
+
|
26
|
+
![Screenshot 2014-10-16 06.46.11.png](https://bitbucket.org/repo/yn7dbo/images/157798882-Screenshot%202014-10-16%2006.46.11.png)
|
27
|
+
|
28
|
+
The `-n` (`--new`) option makes `nyaa` find new episodes of previously downloaded anime (the torrents in `~/Downloads/nyaa/`):
|
29
|
+
|
30
|
+
![Screenshot 2014-10-16 06.47.55.png](https://bitbucket.org/repo/yn7dbo/images/2090162283-Screenshot%202014-10-16%2006.47.55.png)
|
31
|
+
|
32
|
+
You can also run `$ nyaa-get` which is equivalent to `$ nyaa -na`:
|
33
|
+
|
34
|
+
![Screenshot 2014-10-16 06.48.33.png](https://bitbucket.org/repo/yn7dbo/images/3719415092-Screenshot%202014-10-16%2006.48.33.png)
|
35
|
+
|
36
|
+
## Donations
|
37
|
+
|
38
|
+
If you like `nyaa`, please donate via PayPal to wujoshuawu@gmail.com to keep me afloat. Thank you!
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
1. Fork it ( https://bitbucket.org/tsubaki/nyaa_anime/fork )
|
43
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
44
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
45
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
46
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/nyaa
ADDED
data/bin/nyaa-get
ADDED
data/bin/nyaa_anime
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
FANSUBBERS = { "c"=>"Commie",
|
4
|
+
"ch"=>"Chihiro",
|
5
|
+
"f"=>"FFF",
|
6
|
+
"h"=>"Hatsuyuki",
|
7
|
+
"hs"=>"HorribleSubs" }
|
8
|
+
SPEEDSUBBER = FANSUBBERS["hs"]
|
9
|
+
SMALL_RESOLUTION = "480"
|
10
|
+
MEDIUM_RESOLUTION = "720"
|
11
|
+
LARGE_RESOLUTION = "1080"
|
12
|
+
|
13
|
+
require 'optparse'
|
14
|
+
|
15
|
+
if ARGV.size == 0
|
16
|
+
ARGV.push "--help"
|
17
|
+
end
|
18
|
+
|
19
|
+
options = {}
|
20
|
+
OptionParser.new do |opts|
|
21
|
+
opts.banner = "Usage: nyaa [options] anime\n" <<
|
22
|
+
" nyaa_anime [options] anime\n" <<
|
23
|
+
" nyaa-get\n\n" <<
|
24
|
+
" `nyaa` is an alias for `nyaa_anime`.\n" <<
|
25
|
+
" `nyaa-get` is equivalent to `nyaa -na`.\n\n" <<
|
26
|
+
" (If you like this tool, please donate via PayPal\n" <<
|
27
|
+
" to wujoshuawu@gmail.com to keep the developer afloat.)\n\n"
|
28
|
+
|
29
|
+
opts.on("-n", "--new", "Find all new episodes of",
|
30
|
+
"previously downloaded anime") do
|
31
|
+
options[:find_new] = true
|
32
|
+
end
|
33
|
+
|
34
|
+
opts.on("-a", "--all", "Download all results without asking") do
|
35
|
+
options[:download_all] = true
|
36
|
+
end
|
37
|
+
|
38
|
+
opts.on("-s", "--small-res", "Add '#{SMALL_RESOLUTION}' to the search term") do
|
39
|
+
options[:resolution] = SMALL_RESOLUTION
|
40
|
+
end
|
41
|
+
opts.on("-m", "--medium-res", "Add '#{MEDIUM_RESOLUTION}' to the search term") do
|
42
|
+
options[:resolution] = MEDIUM_RESOLUTION
|
43
|
+
end
|
44
|
+
opts.on("-l", "--large-res", "Add '#{LARGE_RESOLUTION}' to the search term") do
|
45
|
+
options[:resolution] = LARGE_RESOLUTION
|
46
|
+
end
|
47
|
+
|
48
|
+
opts.on("-f", "--fansubber [FANSUBBER]",
|
49
|
+
"Specify [FANSUBBER] to be added to the search",
|
50
|
+
"term. [FANSUBBER] can be abbreviated by",
|
51
|
+
*FANSUBBERS.map {|o, f| "#{o} - #{f}"}) do |f|
|
52
|
+
if FANSUBBERS[f]
|
53
|
+
options[:subber] = FANSUBBERS[f]
|
54
|
+
elsif f.nil?
|
55
|
+
puts "Error: Expected [FANSUBBER] with the -f option"
|
56
|
+
ARGV.push "--help"
|
57
|
+
else
|
58
|
+
options[:subber] = f
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
opts.on("-S", "--speedsubs", "Equivalent to `--fansubber=#{SPEEDSUBBER}`") do
|
63
|
+
options[:subber] = SPEEDSUBBER
|
64
|
+
end
|
65
|
+
end.parse!
|
66
|
+
|
67
|
+
require 'nyaa_anime'
|
68
|
+
nyaa = NyaaAnime.new
|
69
|
+
|
70
|
+
if options[:find_new]
|
71
|
+
nyaa.find_new_titles
|
72
|
+
else
|
73
|
+
if ARGV.size == 1
|
74
|
+
search_term = ARGV[0]
|
75
|
+
else
|
76
|
+
search_term = ARGV[0..-1].join " "
|
77
|
+
end
|
78
|
+
if subber = options[:subber]
|
79
|
+
search_term = "[#{subber}] #{search_term}"
|
80
|
+
end
|
81
|
+
if res = options[:resolution]
|
82
|
+
search_term += " #{res}"
|
83
|
+
end
|
84
|
+
nyaa.search search_term, false
|
85
|
+
end
|
86
|
+
|
87
|
+
if nyaa.download_count == 0
|
88
|
+
puts "No downloads found."
|
89
|
+
exit
|
90
|
+
end
|
91
|
+
|
92
|
+
require 'os'
|
93
|
+
|
94
|
+
def get_y_or_n
|
95
|
+
while true
|
96
|
+
response = $stdin.gets.chomp.downcase
|
97
|
+
begin
|
98
|
+
if "yes".match(/\A#{response}/)
|
99
|
+
return true
|
100
|
+
end
|
101
|
+
if "no".match(/\A#{response}/)
|
102
|
+
return false
|
103
|
+
end
|
104
|
+
rescue RegexpError
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def prompt_to_open(torrents)
|
110
|
+
print "Open downloaded torrent#{"s" if torrents.count > 1}? (y/n): "
|
111
|
+
if get_y_or_n
|
112
|
+
if OS.mac?
|
113
|
+
`open #{torrents.join " "}`
|
114
|
+
elsif OS.windows?
|
115
|
+
torrents.each { |torr| `#{torr}` }
|
116
|
+
else # POSIX assumed
|
117
|
+
torrents.each { |torr| `xdg-open #{torr}` }
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
if options[:download_all]
|
123
|
+
prompt_to_open nyaa.download_all
|
124
|
+
exit
|
125
|
+
end
|
126
|
+
|
127
|
+
if nyaa.download_count > 1
|
128
|
+
prompt = "Download (1-#{nyaa.download_count}, 'a(ll)'"
|
129
|
+
prompt << ", 'n(ew)'" if nyaa.new_count > 0 && !options[:find_new]
|
130
|
+
prompt << ", or [ENTER] to cancel): "
|
131
|
+
else
|
132
|
+
print "Download? (y/n): "
|
133
|
+
if get_y_or_n
|
134
|
+
prompt_to_open [nyaa.download_index(0)]
|
135
|
+
end
|
136
|
+
exit
|
137
|
+
end
|
138
|
+
|
139
|
+
while true
|
140
|
+
print prompt
|
141
|
+
index = $stdin.gets.chomp.downcase
|
142
|
+
begin
|
143
|
+
if index == ""
|
144
|
+
exit
|
145
|
+
end
|
146
|
+
if "new".match(/\A#{index}/) && nyaa.new_count > 0 && !options[:find_new]
|
147
|
+
prompt_to_open nyaa.download_all_new
|
148
|
+
exit
|
149
|
+
end
|
150
|
+
if "all".match(/\A#{index}/)
|
151
|
+
prompt_to_open nyaa.download_all
|
152
|
+
exit
|
153
|
+
end
|
154
|
+
if (1..nyaa.download_count).include?(index.to_i)
|
155
|
+
prompt_to_open [nyaa.download_index(index.to_i-1)]
|
156
|
+
exit
|
157
|
+
end
|
158
|
+
rescue RegexpError
|
159
|
+
next
|
160
|
+
end
|
161
|
+
end
|
data/lib/nyaa_anime.rb
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
require "nyaa_anime/version"
|
2
|
+
|
3
|
+
class NyaaAnime
|
4
|
+
|
5
|
+
require 'parallel'
|
6
|
+
require 'open-uri'
|
7
|
+
require 'nokogiri'
|
8
|
+
require 'cgi'
|
9
|
+
require 'colorize'
|
10
|
+
require 'levenshtein'
|
11
|
+
require 'set'
|
12
|
+
|
13
|
+
NYAA_URI = "http://nyaa.se"
|
14
|
+
NYAA_SEARCH = "#{NYAA_URI}/?page=search"
|
15
|
+
NYAA_SEARCH_DEFAULT = "#{NYAA_SEARCH}&cats=1_37&filter=2&term="
|
16
|
+
NYAA_DL_DIR = "#{Dir.home}/Downloads/nyaa/"
|
17
|
+
MAX_PAGE_COUNT = 29
|
18
|
+
TITLE_TOLERANCE_RANGE = (1..4)
|
19
|
+
NEW_COLOR = :green
|
20
|
+
ALREADY_DOWNLOADED_COLOR = :cyan
|
21
|
+
|
22
|
+
def search(title, quiet=true)
|
23
|
+
puts "Searching for \"#{title}\"..." unless quiet
|
24
|
+
@downloads = {}
|
25
|
+
noko_doc = Nokogiri::HTML(open("#{NYAA_SEARCH_DEFAULT}#{CGI.escape(title)}"))
|
26
|
+
results = noko_doc.css('.tlistrow')
|
27
|
+
if results.any?
|
28
|
+
titles = results.css('.tlistname a').map { |a| a.content }
|
29
|
+
dl_urls = results.css('.tlistdownload a').map { |a| a.attr('href') }
|
30
|
+
page_urls = noko_doc.css('.pages').first.css('a').map { |a| a.attr('href') }
|
31
|
+
if page_urls.count == MAX_PAGE_COUNT - 1
|
32
|
+
puts "Truncating at #{MAX_PAGE_COUNT} pages." unless quiet
|
33
|
+
end
|
34
|
+
Parallel.each(page_urls) do |url|
|
35
|
+
results = Nokogiri::HTML(open(url)).css('.tlistrow')
|
36
|
+
titles.concat results.css('.tlistname a').map { |a| a.content }
|
37
|
+
dl_urls.concat results.css('.tlistdownload a').map { |a| a.attr('href') }
|
38
|
+
end
|
39
|
+
titles.each_with_index { |t, i| @downloads[t] = dl_urls[i] }
|
40
|
+
@titles = titles.sort!
|
41
|
+
else
|
42
|
+
if title_element = noko_doc.css('.viewtorrentname').first
|
43
|
+
title = title_element.content
|
44
|
+
@titles = [title]
|
45
|
+
@downloads[title] = noko_doc.css('.viewdownloadbutton a').first.attr('href')
|
46
|
+
else
|
47
|
+
return
|
48
|
+
end
|
49
|
+
end
|
50
|
+
categorize_titles
|
51
|
+
colorized_titles.each_with_index { |t, i| puts "#{i+1}: #{t}" } unless quiet
|
52
|
+
nil
|
53
|
+
end
|
54
|
+
|
55
|
+
def find_new_titles
|
56
|
+
new_titles = Set.new
|
57
|
+
new_downloads = {}
|
58
|
+
idx = 1
|
59
|
+
stripped_episodeless_downloaded_titles.each do |t|
|
60
|
+
search t
|
61
|
+
new_titles.merge @new_titles
|
62
|
+
@new_titles.each do |ti|
|
63
|
+
new_downloads[ti] = @downloads[ti]
|
64
|
+
puts "#{idx}: #{ti.colorize(NEW_COLOR)}"
|
65
|
+
idx += 1
|
66
|
+
end
|
67
|
+
end
|
68
|
+
@new_titles = new_titles
|
69
|
+
@titles = new_titles.to_a.sort!
|
70
|
+
@downloads = new_downloads
|
71
|
+
@already_downloaded_titles = Set.new
|
72
|
+
@version_differing_titles = Set.new
|
73
|
+
@other_titles = Set.new
|
74
|
+
if download_count > 0
|
75
|
+
puts "#{download_count} new episode#{"s" if download_count > 1} found!"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def colorized_titles
|
80
|
+
@titles.map do |t|
|
81
|
+
if @already_downloaded_titles.include? t
|
82
|
+
t.colorize(ALREADY_DOWNLOADED_COLOR)
|
83
|
+
elsif @new_titles.include? t
|
84
|
+
t.colorize(NEW_COLOR)
|
85
|
+
else
|
86
|
+
t
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def categorize_titles
|
92
|
+
@already_downloaded_titles = Set.new
|
93
|
+
@new_titles = Set.new
|
94
|
+
@other_titles = Set.new
|
95
|
+
@version_differing_titles = Set.new
|
96
|
+
dls = downloaded_torrents
|
97
|
+
stripped_dls = stripped_downloaded_titles
|
98
|
+
hashless_dls = dls.map { |t| NyaaAnime.hashless_title t }
|
99
|
+
@titles.each do |t|
|
100
|
+
stripped_t = NyaaAnime.stripped_title t
|
101
|
+
hashless_t = NyaaAnime.hashless_title t
|
102
|
+
if dls.include? "#{t}.torrent"
|
103
|
+
@already_downloaded_titles.add t
|
104
|
+
else
|
105
|
+
if stripped_dls.include? stripped_t
|
106
|
+
@version_differing_titles.add t
|
107
|
+
else
|
108
|
+
new_title_pushed = false
|
109
|
+
stripped_dls.each_with_index do |dlt, i|
|
110
|
+
dist = Levenshtein.distance(dlt, stripped_t)
|
111
|
+
if TITLE_TOLERANCE_RANGE.include? dist and
|
112
|
+
dist == Levenshtein.distance(hashless_dls[i], hashless_t)
|
113
|
+
@new_titles.add t
|
114
|
+
new_title_pushed = true
|
115
|
+
break
|
116
|
+
end
|
117
|
+
end
|
118
|
+
if !new_title_pushed
|
119
|
+
@other_titles.add t
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
nil
|
125
|
+
end
|
126
|
+
|
127
|
+
def self.stripped_title(torrent)
|
128
|
+
torrent.sub(/(\s*\[\w*\])*(\.\w+)+\z/, "")
|
129
|
+
end
|
130
|
+
|
131
|
+
def self.hashless_title(torrent)
|
132
|
+
torrent.sub(/(\s*\[\w{8}\])?(\.\w+)+\z/, "")
|
133
|
+
end
|
134
|
+
|
135
|
+
def downloaded_torrents
|
136
|
+
Dir["#{NYAA_DL_DIR}*"].select { |f| File.file? f }.map { |f| File.basename f }
|
137
|
+
end
|
138
|
+
|
139
|
+
def stripped_downloaded_titles
|
140
|
+
dls = Set.new
|
141
|
+
downloaded_torrents.each { |t| dls.add NyaaAnime.stripped_title(t) }
|
142
|
+
dls
|
143
|
+
end
|
144
|
+
|
145
|
+
def stripped_episodeless_downloaded_titles
|
146
|
+
dls = Set.new
|
147
|
+
downloaded_torrents.each { |t| dls.add NyaaAnime.stripped_title(t)[/\A.+-/] }
|
148
|
+
dls
|
149
|
+
end
|
150
|
+
|
151
|
+
def download_index(index)
|
152
|
+
if title = @titles[index]
|
153
|
+
download(title)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
def download(title)
|
158
|
+
`wget --quiet -N --content-disposition -P #{NYAA_DL_DIR} "#{@downloads[title]}"`
|
159
|
+
puts "#{title}.torrent downloaded."
|
160
|
+
"#{NYAA_DL_DIR}\"#{title}.torrent\""
|
161
|
+
end
|
162
|
+
|
163
|
+
def download_all
|
164
|
+
Parallel.map(@titles) { |t| download(t) }
|
165
|
+
end
|
166
|
+
|
167
|
+
def download_all_new
|
168
|
+
Parallel.map(@new_titles) { |t| download(t) }
|
169
|
+
end
|
170
|
+
|
171
|
+
def download_count
|
172
|
+
@downloads.count
|
173
|
+
end
|
174
|
+
|
175
|
+
def new_count
|
176
|
+
@new_titles.count
|
177
|
+
end
|
178
|
+
|
179
|
+
end
|
data/nyaa_anime.gemspec
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'nyaa_anime/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "nyaa_anime"
|
8
|
+
spec.version = NyaaAnime::VERSION
|
9
|
+
spec.authors = ["Joshua Tsubaki Wu"]
|
10
|
+
spec.email = ["wujoshuawu@gmail.com"]
|
11
|
+
spec.summary = %q{the painless Nyaa Torrents anime command-line tool}
|
12
|
+
spec.description = "`nyaa` (short for `nyaa_anime`) is the painless Nyaa Torrents anime " <<
|
13
|
+
"command-line tool. Search for and download anime torrents and open " <<
|
14
|
+
"them automatically. Results are color-coded - green for new episodes of " <<
|
15
|
+
"previously downloaded torrents, cyan (blue) for previously downloaded " <<
|
16
|
+
"torrents. Automatically find and downloaded new episodes of previously " <<
|
17
|
+
"downloaded anime with `$ nyaa-get`!"
|
18
|
+
spec.homepage = "https://bitbucket.org/tsubaki/nyaa_anime"
|
19
|
+
spec.license = "MIT"
|
20
|
+
|
21
|
+
spec.files = `git ls-files -z`.split("\x0")
|
22
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_runtime_dependency 'parallel', '~> 1.2', '>= 1.2.4'
|
27
|
+
spec.add_runtime_dependency 'nokogiri', '~> 1.6', '>= 1.6.2.1'
|
28
|
+
spec.add_runtime_dependency 'colorize', '~> 0.7', '>= 0.7.3'
|
29
|
+
spec.add_runtime_dependency 'levenshtein-ffi', '~> 1.1'
|
30
|
+
spec.add_runtime_dependency 'os', '~> 0.9', '>=0.9.6'
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
33
|
+
spec.add_development_dependency "rake", "~> 0"
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nyaa_anime
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joshua Tsubaki Wu
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: parallel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.2'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.2.4
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.2.4
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: nokogiri
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.6'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.6.2.1
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.6'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.6.2.1
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: colorize
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0.7'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.7.3
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0.7'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.7.3
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: levenshtein-ffi
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - "~>"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '1.1'
|
80
|
+
type: :runtime
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - "~>"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '1.1'
|
87
|
+
- !ruby/object:Gem::Dependency
|
88
|
+
name: os
|
89
|
+
requirement: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - "~>"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0.9'
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.9.6
|
97
|
+
type: :runtime
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.9'
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 0.9.6
|
107
|
+
- !ruby/object:Gem::Dependency
|
108
|
+
name: bundler
|
109
|
+
requirement: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - "~>"
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '1.6'
|
114
|
+
type: :development
|
115
|
+
prerelease: false
|
116
|
+
version_requirements: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - "~>"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '1.6'
|
121
|
+
- !ruby/object:Gem::Dependency
|
122
|
+
name: rake
|
123
|
+
requirement: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - "~>"
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
type: :development
|
129
|
+
prerelease: false
|
130
|
+
version_requirements: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - "~>"
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
description: "`nyaa` (short for `nyaa_anime`) is the painless Nyaa Torrents anime
|
136
|
+
command-line tool. Search for and download anime torrents and open them automatically.
|
137
|
+
Results are color-coded - green for new episodes of previously downloaded torrents,
|
138
|
+
cyan (blue) for previously downloaded torrents. Automatically find and downloaded
|
139
|
+
new episodes of previously downloaded anime with `$ nyaa-get`!"
|
140
|
+
email:
|
141
|
+
- wujoshuawu@gmail.com
|
142
|
+
executables:
|
143
|
+
- nyaa
|
144
|
+
- nyaa-get
|
145
|
+
- nyaa_anime
|
146
|
+
extensions: []
|
147
|
+
extra_rdoc_files: []
|
148
|
+
files:
|
149
|
+
- ".gitignore"
|
150
|
+
- Gemfile
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- bin/nyaa
|
155
|
+
- bin/nyaa-get
|
156
|
+
- bin/nyaa_anime
|
157
|
+
- lib/nyaa_anime.rb
|
158
|
+
- lib/nyaa_anime/version.rb
|
159
|
+
- nyaa_anime.gemspec
|
160
|
+
homepage: https://bitbucket.org/tsubaki/nyaa_anime
|
161
|
+
licenses:
|
162
|
+
- MIT
|
163
|
+
metadata: {}
|
164
|
+
post_install_message:
|
165
|
+
rdoc_options: []
|
166
|
+
require_paths:
|
167
|
+
- lib
|
168
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
requirements: []
|
179
|
+
rubyforge_project:
|
180
|
+
rubygems_version: 2.4.2
|
181
|
+
signing_key:
|
182
|
+
specification_version: 4
|
183
|
+
summary: the painless Nyaa Torrents anime command-line tool
|
184
|
+
test_files: []
|