AnimeDL 0.1.6 → 0.1.7
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/anime_dl.gemspec +1 -1
- data/bin/anime_dl +9 -7
- 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: 4c4ab79d1ef8cdd5e1358c92ea756e281050ca61
|
4
|
+
data.tar.gz: 1d3a2171a534122c4d2c6a3f62b2cf6cc4112f7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8f5495fb0dbe795148c8ba90986607eae29105c1e497d79e11c1e62465531a9972d83093db6502704b1faf18105c5b340f1dff057ac3ad69b0c4785506be130
|
7
|
+
data.tar.gz: 552eeff77729d8797cc6995d162db669ff5513664c1036360b272727ff4040a5300c3a7a0b880e993a58a8e6211dcd5c03aed01bae23b6c3fc384743dd594cf3
|
data/anime_dl.gemspec
CHANGED
data/bin/anime_dl
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require "anime_dl"
|
3
3
|
require "optparse"
|
4
|
+
require "fileutils"
|
4
5
|
|
5
6
|
# APP OPTIONS
|
6
7
|
options = { option: "link", episode: true, file: nil, quiet: false }
|
@@ -19,8 +20,7 @@ ARGV.options do |opts|
|
|
19
20
|
opts.separator ""
|
20
21
|
opts.separator "User can either download episodes or get links to video sources of episodes of a particular anime."
|
21
22
|
opts.separator "On running the command the program prompts the user for a search query and prints a list of search results."
|
22
|
-
opts.separator "The user can then choose a particular anime
|
23
|
-
opts.separator "To select particular episodes call the app with the '-e' option."
|
23
|
+
opts.separator "The user can then choose a particular anime and choose which episodes to scrape."
|
24
24
|
opts.separator ""
|
25
25
|
opts.separator "Links: "
|
26
26
|
opts.separator " To output links to a file, provide the path to a file as the last argument."
|
@@ -31,7 +31,7 @@ ARGV.options do |opts|
|
|
31
31
|
opts.separator ""
|
32
32
|
opts.separator "Options:"
|
33
33
|
|
34
|
-
opts.on("-o option", "--option
|
34
|
+
opts.on("-o option", "--option=option", help_statements[:option]) do |option|
|
35
35
|
unless (['l', 'link', 'd', 'download'].include? option)
|
36
36
|
puts "Invalid argument to --option"
|
37
37
|
puts %Q[Valid options: "l" (or) "link", "d" (or) "download"]
|
@@ -127,15 +127,17 @@ if (options[:file])
|
|
127
127
|
exit
|
128
128
|
end
|
129
129
|
elsif ( !File.exists?( File.split(options[:file])[0] ) )
|
130
|
-
puts "
|
130
|
+
puts "Location does not exist"
|
131
131
|
exit
|
132
132
|
end
|
133
133
|
|
134
|
-
elsif (
|
135
|
-
puts "
|
134
|
+
elsif ( File.file?(options[:file]) )
|
135
|
+
puts "Argument is not a directory"
|
136
136
|
puts "For --option=download , argument to --file must be a directory"
|
137
137
|
exit
|
138
|
-
|
138
|
+
elsif ( !File.exists?(options[:file]) )
|
139
|
+
puts "Creating New Directory #{options[:file]}"
|
140
|
+
FileUtils.mkdir_p(options[:file])
|
139
141
|
end
|
140
142
|
|
141
143
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: AnimeDL
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anirudh Sundar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|