-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.rb
36 lines (30 loc) · 1013 Bytes
/
app.rb
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
require './ongeki_web_driver'
require './app_option'
require './playlog'
require './player_data'
require './bp_target_music'
require './rating_target_music'
require './music_detail'
option = AppOption.new
driver = OngekiWebDriver.new.login
now = Time.now
# プレイヤーデータ収集
player_data = PlayerData.new
player_data.collect(driver, now)
player_data.save unless option.has?(:dryrun)
# bp対象曲
bp_target_music = BpTargetMusic.new
bp_target_music.collect(driver, now)
bp_target_music.save(now) unless option.has?(:dryrun)
# rating対象曲
rating_target_music = RatingTargetMusic.new
rating_target_music.collect(driver, now)
rating_target_music.save(now) unless option.has?(:dryrun)
# レコードのプレイ履歴収集
playlog = Playlog.new
playlog.collect_detail(driver, !option.has?(:short))
playlog.save(now) unless option.has?(:dryrun)
# 楽曲詳細
music_detail = MusicDetail.new
music_detail.collect_detail(driver, !option.has?(:short))
music_detail.save unless option.has?(:dryrun)