moviesort 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README +6 -0
- data/VERSION +1 -1
- data/lib/moviesort/command_line.rb +6 -1
- metadata +5 -4
data/README
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
@@ -7,6 +7,8 @@ module Moviesort
|
|
7
7
|
new(options.split)
|
8
8
|
end
|
9
9
|
|
10
|
+
MOVIE_EXTENSIONS = %w{avi mkv mov mp4}
|
11
|
+
|
10
12
|
def initialize(argv = ARGV)
|
11
13
|
@options = Trollop.options(argv) do
|
12
14
|
banner <<-EOS.gsub(/^ {8}/, '')
|
@@ -22,7 +24,10 @@ module Moviesort
|
|
22
24
|
|
23
25
|
def run
|
24
26
|
sorter = Sorter::TV.new(@options[:target])
|
25
|
-
Dir[File.join(@options[:source], '
|
27
|
+
movie_files = Dir[File.join(@options[:source], '*')].select do |file|
|
28
|
+
MOVIE_EXTENSIONS.include?(File.extname(file)[1..-1])
|
29
|
+
end
|
30
|
+
movie_files.each do |file|
|
26
31
|
sorter.sort_file(file)
|
27
32
|
end
|
28
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moviesort
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Redpath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-18 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -20,10 +20,11 @@ executables:
|
|
20
20
|
- moviesort
|
21
21
|
extensions: []
|
22
22
|
|
23
|
-
extra_rdoc_files:
|
24
|
-
|
23
|
+
extra_rdoc_files:
|
24
|
+
- README
|
25
25
|
files:
|
26
26
|
- .gitignore
|
27
|
+
- README
|
27
28
|
- Rakefile
|
28
29
|
- VERSION
|
29
30
|
- bin/moviesort
|