serienmover 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +36 -0
- data/bin/serienmover +18 -9
- data/lib/serienmover/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -20,6 +20,7 @@ process the files.
|
|
20
20
|
by detecting the pattern from former seasons
|
21
21
|
* has some metrics to find mostly the right target
|
22
22
|
* can process the series automatic by file
|
23
|
+
* can execute a script for every copied episode
|
23
24
|
|
24
25
|
## Usage
|
25
26
|
|
@@ -31,3 +32,38 @@ You can change the behaviour of `serienmover` with commandline arguments
|
|
31
32
|
(`serienmover --help` for an overview) or by editing the config file
|
32
33
|
under `~/.serienmover/config.yml`.
|
33
34
|
|
35
|
+
An overview of the supported configuration values follows:
|
36
|
+
|
37
|
+
### default_directory
|
38
|
+
Directory that is used by default, to look for new episodes
|
39
|
+
(Default: ~/Downloads/).
|
40
|
+
|
41
|
+
### series_directories
|
42
|
+
An array of paths to directories which contains the series.
|
43
|
+
|
44
|
+
### read_episode_info
|
45
|
+
Read the seriesname from a file, that is created by `serienrenamer`. The path
|
46
|
+
to the file is set by `store_path`.
|
47
|
+
|
48
|
+
### byte_count_for_md5
|
49
|
+
A number of bytes that is used to generate the md5sum. The count has to match
|
50
|
+
with the setting from `serienrenamer`. Defaults to `2048`.
|
51
|
+
|
52
|
+
### post_copy_hook
|
53
|
+
This can hold a path to a script, that is called for all copied episodes
|
54
|
+
after they have copied. By creating this script, you can automate some things
|
55
|
+
like, hold all copied files in a separate directory. This file has to be
|
56
|
+
executable and there are two parameters supplied:
|
57
|
+
1) the episodefile 2) the seriesname
|
58
|
+
|
59
|
+
### auto_process_list
|
60
|
+
Should use `serienmover` a file to decide if a file is moved or copied.
|
61
|
+
The path to the file is set by `auto_process_list_file`, which defaults to
|
62
|
+
`~/.serienmover/autoprocess.yml`. This file is updated by `serienmover` with
|
63
|
+
new series. You can select `c` (copy), `m` (move) or `n` (nothing) for every
|
64
|
+
series. An example for this file follows:
|
65
|
+
|
66
|
+
Scrubs: c
|
67
|
+
Goofy und Max: n
|
68
|
+
New Girl: m
|
69
|
+
|
data/bin/serienmover
CHANGED
@@ -26,7 +26,7 @@ STANDARD_CONFIG = {
|
|
26
26
|
:read_episode_info => false,
|
27
27
|
:store_path => '',
|
28
28
|
:byte_count_for_md5 => 2048,
|
29
|
-
:
|
29
|
+
:post_copy_hook => '',
|
30
30
|
:auto_process_list => false,
|
31
31
|
:auto_process_list_file => File.join(CONFIG_DIR, "autoprocess.yml")
|
32
32
|
}
|
@@ -222,13 +222,22 @@ episode_actions.each do |episode|
|
|
222
222
|
|
223
223
|
episode.process_action
|
224
224
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
225
|
+
###
|
226
|
+
# run the Script that is supplied in config[:post_copy_hook]
|
227
|
+
# this lets you process episodes that are copied
|
228
|
+
#
|
229
|
+
# the supplied Script is called with two parameters
|
230
|
+
# 1. the path to the episodefile
|
231
|
+
# 2. the seriesname
|
232
|
+
if config[:post_copy_hook] &&
|
233
|
+
File.file?(config[:post_copy_hook]) &&
|
234
|
+
File.executable?(config[:post_copy_hook]) &&
|
235
|
+
episode.action.match(/copy/i)
|
236
|
+
|
237
|
+
puts "Calling Post-Copy-Hook for this episode"
|
238
|
+
cmd = '%s "%s" "%s"' %
|
239
|
+
[ config[:post_copy_hook], episode.episodepath, episode.target ]
|
240
|
+
|
241
|
+
system(cmd) or fail "Post-Copy-Hook ends not succesfully"
|
233
242
|
end
|
234
243
|
end
|
data/lib/serienmover/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serienmover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: serienrenamer
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.8.
|
75
|
+
rubygems_version: 1.8.24
|
76
76
|
signing_key:
|
77
77
|
specification_version: 3
|
78
78
|
summary: Tool that moves your episodes into a specific directory structure
|