sindex 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sindex +18 -15
- data/lib/sindex/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: 5aec829f6610cada2f5663bb6eeb0f816edd32db
|
4
|
+
data.tar.gz: ec0494340ce02b8bdcd5dab412943c6dd1e611e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d060609adaf165a45950010ca28207e515c73f26c292fa75f458d68947d40c4d7d8cc07e9749fa5ec025e595689f402a303e932a4496a45c30b565f8bcc8f0ca
|
7
|
+
data.tar.gz: 87ef7a97b9fe1601d093758183aaf53f76f2f00a2cea6e11cadc364eea30c19628da73a510172dcb2933f85d458951aceab37cccaa9b41813ae84a712055e085
|
data/bin/sindex
CHANGED
@@ -29,6 +29,7 @@ STANDARD_CONFIG = {
|
|
29
29
|
:information_store_path =>
|
30
30
|
File.join(File.expand_path("~"), ".serienrenamer/information_storage.yml"),
|
31
31
|
:byte_count_for_md5 => 2048,
|
32
|
+
:ask_before_writing_new_index => true,
|
32
33
|
}
|
33
34
|
|
34
35
|
config = STANDARD_CONFIG.merge_with_serialized(CONFIG_FILE)
|
@@ -191,24 +192,26 @@ class Cmdline
|
|
191
192
|
|
192
193
|
def write_new_index_if_wanted
|
193
194
|
|
194
|
-
if
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
# Post process all the episodes with a different hook
|
199
|
-
if @config[:episode_hook] and @config[:episode_hook].match(/\w+/)
|
200
|
-
@processed_episodes.each do |filename,series|
|
201
|
-
puts "Calling Episode Hook for '#{filename}'"
|
202
|
-
cmd = '%s "%s" "%s"' % [ @config[:episode_hook], filename, series ]
|
203
|
-
system(cmd) or fail("Episode-Hook failed")
|
204
|
-
end
|
195
|
+
if @config[:ask_before_writing_new_index]
|
196
|
+
if not agree("\nShould I write the new index? ", true)
|
197
|
+
puts "the index was not changed"
|
198
|
+
exit
|
205
199
|
end
|
200
|
+
end
|
206
201
|
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
202
|
+
@series_index.dump_index_to_file(@config[:index_file])
|
203
|
+
puts "New Index version has been written\n"
|
204
|
+
|
205
|
+
# Post process all the episodes with a different hook
|
206
|
+
if @config[:episode_hook] and @config[:episode_hook].match(/\w+/)
|
207
|
+
@processed_episodes.each do |filename,series|
|
208
|
+
puts "Calling Episode Hook for '#{filename}'"
|
209
|
+
cmd = '%s "%s" "%s"' % [ @config[:episode_hook], filename, series ]
|
210
|
+
system(cmd) or fail("Episode-Hook failed")
|
211
|
+
end
|
211
212
|
end
|
213
|
+
|
214
|
+
call_post_processing_hook
|
212
215
|
end
|
213
216
|
|
214
217
|
#############################################################################
|
data/lib/sindex/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sindex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philipp Böhm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|