serienrenamer 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/Gemfile +4 -0
- data/README.rdoc +1 -0
- data/Rakefile +9 -28
- data/lib/serienrenamer/information_store.rb +5 -3
- data/lib/serienrenamer.rb +1 -1
- data/serienrenamer.gemspec +18 -50
- metadata +17 -73
- data/History.txt +0 -9
- data/Manifest.txt +0 -25
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -1,28 +1,9 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
# Generate all the Rake tasks
|
12
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
13
|
-
$hoe = Hoe.spec 'serienrenamer' do
|
14
|
-
self.developer 'Philipp Boehm', 'philipp@i77i.de'
|
15
|
-
self.rubyforge_name = self.name
|
16
|
-
self.dependency('wlapi', '>= 0.8.4')
|
17
|
-
self.dependency('mediawiki-gateway', '>= 0.4.4')
|
18
|
-
self.dependency('mechanize', '>= 2.3')
|
19
|
-
self.dependency('highline', '>= 1.6.11')
|
20
|
-
self.dependency('hashconfig', '>= 0.0.1')
|
21
|
-
end
|
22
|
-
|
23
|
-
require 'newgem/tasks'
|
24
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
25
|
-
|
26
|
-
# TODO - want other tests/tasks run by default? Add them to the list
|
27
|
-
# remove_task :default
|
28
|
-
# task :default => [:spec, :features]
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'bundler/gem_tasks'
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
Rake::TestTask.new do |t|
|
6
|
+
t.libs << "test"
|
7
|
+
t.test_files = FileList['test/test*.rb']
|
8
|
+
t.verbose = true
|
9
|
+
end
|
@@ -12,7 +12,7 @@ module Serienrenamer
|
|
12
12
|
# the used hash with episode data
|
13
13
|
def initialize(yaml_path, byte_count=2048)
|
14
14
|
@yaml_path = yaml_path
|
15
|
-
@byte_count = byte_count
|
15
|
+
@byte_count = byte_count.to_i
|
16
16
|
@episode_hash = {}
|
17
17
|
|
18
18
|
if File.file?(yaml_path)
|
@@ -26,8 +26,10 @@ module Serienrenamer
|
|
26
26
|
raise ArgumentError, "Episode instance needed" unless
|
27
27
|
episode.is_a? Serienrenamer::Episode
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
md5sum = episode.md5sum(@byte_count)
|
30
|
+
|
31
|
+
unless @episode_hash[md5sum]
|
32
|
+
@episode_hash[md5sum] = episode.series
|
31
33
|
end
|
32
34
|
end
|
33
35
|
|
data/lib/serienrenamer.rb
CHANGED
data/serienrenamer.gemspec
CHANGED
@@ -1,55 +1,23 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/serienrenamer', __FILE__)
|
2
3
|
|
3
|
-
Gem::Specification.new do |
|
4
|
-
|
5
|
-
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Philipp Böhm"]
|
6
|
+
gem.email = ["philipp@i77i.de"]
|
7
|
+
gem.description = %q{Ruby Script that brings your series into an appropriate format like \"S01E01 - Episodename.avi\"}
|
8
|
+
gem.summary = %q{Ruby Script that brings your series into an appropriate format like \"S01E01 - Episodename.avi\"}
|
9
|
+
gem.homepage = "http://github.com/pboehm/serienrenamer"
|
6
10
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
|
14
|
-
s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "bin/serienrenamer", "lib/plugin.rb", "lib/plugin/serienjunkies_de.rb", "lib/plugin/serienjunkies_feed.rb", "lib/plugin/textfile.rb", "lib/plugin/wikipedia.rb", "lib/serienrenamer.rb", "lib/serienrenamer/episode.rb", "lib/serienrenamer/information_store.rb", "script/console", "script/destroy", "script/generate", "serienrenamer.gemspec", "test/serienjunkies_feed_sample.xml", "test/test_episode.rb", "test/test_helper.rb", "test/test_information_store.rb", "test/test_plugin_serienjunkies_de.rb", "test/test_plugin_serienjunkies_feed.rb", "test/test_plugin_textfile.rb", "test/test_plugin_wikipedia.rb"]
|
15
|
-
s.homepage = "http://github.com/pboehm/serienrenamer"
|
16
|
-
s.rdoc_options = ["--main", "README.rdoc"]
|
17
|
-
s.require_paths = ["lib"]
|
18
|
-
s.rubyforge_project = "serienrenamer"
|
19
|
-
s.rubygems_version = "1.8.19"
|
20
|
-
s.summary = "Ruby Script that brings your series into an appropriate format like \"S01E01 - Episodename.avi\""
|
21
|
-
s.test_files = ["test/test_plugin_serienjunkies_de.rb", "test/test_information_store.rb", "test/test_plugin_wikipedia.rb", "test/test_plugin_serienjunkies_feed.rb", "test/test_plugin_textfile.rb", "test/test_helper.rb", "test/test_episode.rb"]
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "serienrenamer"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Serienrenamer::VERSION
|
22
17
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
s.add_runtime_dependency(%q<mediawiki-gateway>, [">= 0.4.4"])
|
29
|
-
s.add_runtime_dependency(%q<mechanize>, [">= 2.3"])
|
30
|
-
s.add_runtime_dependency(%q<highline>, [">= 1.6.11"])
|
31
|
-
s.add_runtime_dependency(%q<hashconfig>, [">= 0.0.1"])
|
32
|
-
s.add_development_dependency(%q<rdoc>, ["~> 3.10"])
|
33
|
-
s.add_development_dependency(%q<newgem>, [">= 1.5.3"])
|
34
|
-
s.add_development_dependency(%q<hoe>, ["~> 3.0"])
|
35
|
-
else
|
36
|
-
s.add_dependency(%q<wlapi>, [">= 0.8.4"])
|
37
|
-
s.add_dependency(%q<mediawiki-gateway>, [">= 0.4.4"])
|
38
|
-
s.add_dependency(%q<mechanize>, [">= 2.3"])
|
39
|
-
s.add_dependency(%q<highline>, [">= 1.6.11"])
|
40
|
-
s.add_dependency(%q<hashconfig>, [">= 0.0.1"])
|
41
|
-
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
42
|
-
s.add_dependency(%q<newgem>, [">= 1.5.3"])
|
43
|
-
s.add_dependency(%q<hoe>, ["~> 3.0"])
|
44
|
-
end
|
45
|
-
else
|
46
|
-
s.add_dependency(%q<wlapi>, [">= 0.8.4"])
|
47
|
-
s.add_dependency(%q<mediawiki-gateway>, [">= 0.4.4"])
|
48
|
-
s.add_dependency(%q<mechanize>, [">= 2.3"])
|
49
|
-
s.add_dependency(%q<highline>, [">= 1.6.11"])
|
50
|
-
s.add_dependency(%q<hashconfig>, [">= 0.0.1"])
|
51
|
-
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
52
|
-
s.add_dependency(%q<newgem>, [">= 1.5.3"])
|
53
|
-
s.add_dependency(%q<hoe>, ["~> 3.0"])
|
54
|
-
end
|
18
|
+
gem.add_runtime_dependency(%q<wlapi>, [">= 0.8.4"])
|
19
|
+
gem.add_runtime_dependency(%q<mediawiki-gateway>, [">= 0.4.4"])
|
20
|
+
gem.add_runtime_dependency(%q<mechanize>, [">= 2.3"])
|
21
|
+
gem.add_runtime_dependency(%q<highline>, [">= 1.6.11"])
|
22
|
+
gem.add_runtime_dependency(%q<hashconfig>, [">= 0.0.1"])
|
55
23
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serienrenamer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
- Philipp
|
8
|
+
- Philipp Böhm
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: wlapi
|
@@ -91,69 +91,17 @@ dependencies:
|
|
91
91
|
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: 0.0.1
|
94
|
-
|
95
|
-
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '3.10'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '3.10'
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: newgem
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
|
-
requirements:
|
115
|
-
- - ! '>='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 1.5.3
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
|
-
requirements:
|
123
|
-
- - ! '>='
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: 1.5.3
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: hoe
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
|
-
requirements:
|
131
|
-
- - ~>
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '3.0'
|
134
|
-
type: :development
|
135
|
-
prerelease: false
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '3.0'
|
142
|
-
description: ! 'Ruby Script that brings your series into an appropriate format
|
143
|
-
|
144
|
-
like "S01E01 - Episodename.avi"'
|
94
|
+
description: Ruby Script that brings your series into an appropriate format like \"S01E01
|
95
|
+
- Episodename.avi\"
|
145
96
|
email:
|
146
97
|
- philipp@i77i.de
|
147
98
|
executables:
|
148
99
|
- serienrenamer
|
149
100
|
extensions: []
|
150
|
-
extra_rdoc_files:
|
151
|
-
- History.txt
|
152
|
-
- Manifest.txt
|
153
|
-
- README.rdoc
|
101
|
+
extra_rdoc_files: []
|
154
102
|
files:
|
155
|
-
-
|
156
|
-
-
|
103
|
+
- .gitignore
|
104
|
+
- Gemfile
|
157
105
|
- README.rdoc
|
158
106
|
- Rakefile
|
159
107
|
- bin/serienrenamer
|
@@ -165,9 +113,6 @@ files:
|
|
165
113
|
- lib/serienrenamer.rb
|
166
114
|
- lib/serienrenamer/episode.rb
|
167
115
|
- lib/serienrenamer/information_store.rb
|
168
|
-
- script/console
|
169
|
-
- script/destroy
|
170
|
-
- script/generate
|
171
116
|
- serienrenamer.gemspec
|
172
117
|
- test/serienjunkies_feed_sample.xml
|
173
118
|
- test/test_episode.rb
|
@@ -180,9 +125,7 @@ files:
|
|
180
125
|
homepage: http://github.com/pboehm/serienrenamer
|
181
126
|
licenses: []
|
182
127
|
post_install_message:
|
183
|
-
rdoc_options:
|
184
|
-
- --main
|
185
|
-
- README.rdoc
|
128
|
+
rdoc_options: []
|
186
129
|
require_paths:
|
187
130
|
- lib
|
188
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -198,17 +141,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
141
|
- !ruby/object:Gem::Version
|
199
142
|
version: '0'
|
200
143
|
requirements: []
|
201
|
-
rubyforge_project:
|
144
|
+
rubyforge_project:
|
202
145
|
rubygems_version: 1.8.21
|
203
146
|
signing_key:
|
204
147
|
specification_version: 3
|
205
|
-
summary: Ruby Script that brings your series into an appropriate format like "S01E01
|
206
|
-
- Episodename.avi"
|
148
|
+
summary: Ruby Script that brings your series into an appropriate format like \"S01E01
|
149
|
+
- Episodename.avi\"
|
207
150
|
test_files:
|
208
|
-
- test/
|
151
|
+
- test/serienjunkies_feed_sample.xml
|
152
|
+
- test/test_episode.rb
|
153
|
+
- test/test_helper.rb
|
209
154
|
- test/test_information_store.rb
|
210
|
-
- test/
|
155
|
+
- test/test_plugin_serienjunkies_de.rb
|
211
156
|
- test/test_plugin_serienjunkies_feed.rb
|
212
157
|
- test/test_plugin_textfile.rb
|
213
|
-
- test/
|
214
|
-
- test/test_episode.rb
|
158
|
+
- test/test_plugin_wikipedia.rb
|
data/History.txt
DELETED
data/Manifest.txt
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
README.rdoc
|
4
|
-
Rakefile
|
5
|
-
bin/serienrenamer
|
6
|
-
lib/plugin.rb
|
7
|
-
lib/plugin/serienjunkies_de.rb
|
8
|
-
lib/plugin/serienjunkies_feed.rb
|
9
|
-
lib/plugin/textfile.rb
|
10
|
-
lib/plugin/wikipedia.rb
|
11
|
-
lib/serienrenamer.rb
|
12
|
-
lib/serienrenamer/episode.rb
|
13
|
-
lib/serienrenamer/information_store.rb
|
14
|
-
script/console
|
15
|
-
script/destroy
|
16
|
-
script/generate
|
17
|
-
serienrenamer.gemspec
|
18
|
-
test/serienjunkies_feed_sample.xml
|
19
|
-
test/test_episode.rb
|
20
|
-
test/test_helper.rb
|
21
|
-
test/test_information_store.rb
|
22
|
-
test/test_plugin_serienjunkies_de.rb
|
23
|
-
test/test_plugin_serienjunkies_feed.rb
|
24
|
-
test/test_plugin_textfile.rb
|
25
|
-
test/test_plugin_wikipedia.rb
|
data/script/console
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# File: script/console
|
3
|
-
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
-
|
5
|
-
libs = " -r irb/completion"
|
6
|
-
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
-
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.dirname(__FILE__) + '/../lib/serienrenamer.rb'}"
|
9
|
-
puts "Loading serienrenamer gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/destroy'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/generate'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Generate.new.run(ARGV)
|