sjunkieex 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +4 -0
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/Rakefile +2 -0
- data/bin/sjunkieex +6 -10
- data/lib/sjunkieex/interface.rb +2 -2
- data/lib/sjunkieex/version.rb +1 -1
- data/lib/sjunkieex.rb +0 -1
- data/sjunkieex.gemspec +1 -0
- data/test/seriesindex_example.xml +5247 -4573
- data/test/test_interface.rb +6 -5
- metadata +25 -6
- data/lib/sjunkieex/series_index.rb +0 -138
- data/test/test_series_index.rb +0 -74
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Sjunkieex (Serienjunkies Extractor)
|
1
|
+
# Sjunkieex (Serienjunkies Extractor) [![Build Status](https://secure.travis-ci.org/pboehm/sjunkieex.png)](http://travis-ci.org/pboehm/sjunkieex)
|
2
2
|
|
3
3
|
Program that extracts links from serienjunkies.org for your series and
|
4
4
|
searches for new episodes for existing series.
|
data/Rakefile
CHANGED
data/bin/sjunkieex
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
|
6
6
|
|
7
7
|
require 'sjunkieex'
|
8
|
+
require 'sindex'
|
8
9
|
require 'hashconfig'
|
9
10
|
require 'optparse'
|
10
11
|
require 'fileutils'
|
@@ -19,8 +20,7 @@ FileUtils.mkdir(CONFIG_DIR) unless File.directory?(CONFIG_DIR)
|
|
19
20
|
STANDARD_CONFIG = {
|
20
21
|
:hd_enabled => false,
|
21
22
|
:hd_exceptions => ["SERIES_NOT_EXISTING_PLACEHOLDER"],
|
22
|
-
:
|
23
|
-
:index_suffix => "xml",
|
23
|
+
:index_file => "",
|
24
24
|
:hoster_id => "nl",
|
25
25
|
:dump_links => true,
|
26
26
|
:dump_file => "/tmp/gsl_links.txt",
|
@@ -54,16 +54,12 @@ OptionParser.new do |opts|
|
|
54
54
|
|
55
55
|
end.parse!
|
56
56
|
|
57
|
-
fail "index
|
58
|
-
File.
|
57
|
+
fail "index file #{ config[:index_file]} does not exist" unless
|
58
|
+
File.file?(config[:index_file])
|
59
59
|
|
60
|
+
series_index = Sindex::SeriesIndex.new(index_file: config[:index_file])
|
60
61
|
|
61
|
-
|
62
|
-
files = Dir[glob_pattern]
|
63
|
-
|
64
|
-
series_index = Sjunkieex::SeriesIndex.new(files: files)
|
65
|
-
|
66
|
-
fail "there is data for series existing" if series_index.empty?
|
62
|
+
fail "there is no data for series existing" if series_index.empty?
|
67
63
|
|
68
64
|
###
|
69
65
|
# look for new series
|
data/lib/sjunkieex/interface.rb
CHANGED
@@ -34,7 +34,7 @@ module Sjunkieex
|
|
34
34
|
|
35
35
|
next unless @index.is_series_in_index?(c)
|
36
36
|
|
37
|
-
series_name =
|
37
|
+
series_name = Sindex::SeriesIndex.extract_seriesname(c)
|
38
38
|
next unless series_name
|
39
39
|
|
40
40
|
next if @index.episode_existing?(series_name, c)
|
@@ -68,7 +68,7 @@ module Sjunkieex
|
|
68
68
|
|
69
69
|
next if @index.episode_existing?(series_name, episode_data)
|
70
70
|
|
71
|
-
if id =
|
71
|
+
if id = Sindex::SeriesIndex.extract_episode_identifier(episode_data)
|
72
72
|
|
73
73
|
# classify episode resolution
|
74
74
|
resolution = :sd
|
data/lib/sjunkieex/version.rb
CHANGED
data/lib/sjunkieex.rb
CHANGED