where_to_cli 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/bin/whereto +10 -5
- data/lib/where_to_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2MzMmY4Nzg1ZjdkMWFjMmRjNTA4OTFmMmY0NDE2ZTViMDRjNjdhMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmUzNTFkNjYzNzg3ZjI5ZWI0YTVkYjcwYTJiNGMzZWQxZTkxMzJkZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTQ1YTUwMThmNjY3M2JiNTVmNDUxNmJkMWRhNDc2ZjU0YTNlZTMwOTNhNDVl
|
10
|
+
NjIxMmM5OTQyYTk0N2VkNWViYjY0ODg2NWQxNjg3MjUxNWY2ZjM4MjRlMTJl
|
11
|
+
NGQ3NmE4NmViMjJiZjQ1YjRmYzIxMTg4MDI5NzI3YjA1MzM4NzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjMxMGYzYzQ1NmNhNTUwNGMzYTEzMjE3ZjJiZGU1N2JlNjEzYzQ0MTZjODBj
|
14
|
+
ZjM0OTExNzMyY2JmN2VkZTg2NTdlN2Q4NGFiNjY0OTdlMThmYmQzMjcwOGY3
|
15
|
+
MjRhODBjNGJkZDQyN2VjOTJmYjY2OGY5ZjQ0MzMxZDJjMDZhMTM=
|
data/Gemfile.lock
CHANGED
data/bin/whereto
CHANGED
@@ -63,13 +63,14 @@ end
|
|
63
63
|
|
64
64
|
def process(files)
|
65
65
|
locator = WhereTo::Locator.new
|
66
|
-
locator.
|
66
|
+
locator.episode_number = 0
|
67
|
+
locator.series_title = prompt_for_series_title default: locator.series_title
|
67
68
|
|
68
69
|
files.each do |file|
|
69
70
|
puts ''
|
70
71
|
puts "For file #{file}:"
|
71
72
|
locator.season = prompt_for_season default: locator.season
|
72
|
-
locator.episode_number = prompt_for_episode_number default: locator.episode_number
|
73
|
+
locator.episode_number = prompt_for_episode_number default: locator.episode_number.to_i + 1
|
73
74
|
locator.group = prompt_for_group default: locator.group
|
74
75
|
|
75
76
|
locator.lookup!
|
@@ -80,9 +81,7 @@ def process(files)
|
|
80
81
|
puts "New filename: #{new_file}"
|
81
82
|
|
82
83
|
if not @options[:dryrun]
|
83
|
-
|
84
|
-
FileUtils.mv file, new_file
|
85
|
-
puts 'success!'
|
84
|
+
rename file, to: new_file
|
86
85
|
else
|
87
86
|
puts 'Skipping rename because of dryrun flag'
|
88
87
|
end
|
@@ -90,6 +89,12 @@ def process(files)
|
|
90
89
|
end
|
91
90
|
end
|
92
91
|
|
92
|
+
def rename(from, to:)
|
93
|
+
print 'Renaming...'
|
94
|
+
FileUtils.mv from, to unless from == to
|
95
|
+
puts 'success!'
|
96
|
+
end
|
97
|
+
|
93
98
|
def prompt_for_series_title(default: nil)
|
94
99
|
return @options[:series] if @options[:series]
|
95
100
|
prompt = "Enter a series title"
|
data/lib/where_to_cli/version.rb
CHANGED