-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRakefile
64 lines (52 loc) · 1.58 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
require_relative "./main"
task :console do
sh "ruby -e \"require('./main.rb');binding.pry\""
end
desc "Fetched only new content by default."
namespace :fetch do
desc "Fetch resources from Timpul Source"
task :timpul, [:first, :last] do |_task, options|
Fetchers::Timpul.new.run(options[:first], options[:last])
end
desc "Fetch resources from Publika Source"
task :publika, [:first, :last] do |_task, options|
Fetchers::Publika.new.run(options[:first], options[:last])
end
desc "Fetch resources from Unimedia Source"
task :unimedia, [:first, :last] do |_task, options|
Fetchers::Unimedia.new.run(options[:first], options[:last])
end
desc "Fetch resources from ProTV Source"
task :protv, [:first, :last] do |_task, options|
Fetchers::ProTv.new.run(options[:first], options[:last])
end
desc "Fetch resources from Agora Source"
task :agora, [:first, :last] do |_task, options|
Fetchers::Agora.new.run(options[:first], options[:last])
end
desc "Fetch resources from Prime Source"
task :prime, [:first, :last] do |_task, options|
Fetchers::Prime.new.run(options[:first], options[:last])
end
end
namespace :parse do
desc "Parse ProTV source and update DB"
task :protv do
Parsers::ProTv.new.run
end
desc "Parse Timpul source and update DB"
task :timpul do
Parsers::Timpul.new.run
end
desc "Parse Publika source and update DB"
task :publika do
Parsers::Publika.new.run
end
desc "Parse Unimedia source and update DB"
task :unimedia do
Parsers::Unimedia.new.run
end
task :agora do
Parsers::Agora.new.run
end
end