10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/dash_timeline_validator/cli.rb', line 10
def self.main(manifest)
begin
FileUtils.mkdir_p DashTimelineValidator::Options::ANALYZER_FOLDER
DashTimelineValidator::Log.info("The manifest #{manifest} will be processed at #{DashTimelineValidator::Options::ANALYZER_FOLDER} folder.")
mpd_content = DashTimelineValidator::DashFile.fetch_file(manifest)
DashTimelineValidator::Log.info(DashTimelineValidator::Validator.analyze(manifest, mpd_content))
rescue StandardError => e
DashTimelineValidator::Log.error("There was an error: #{e.inspect}")
DashTimelineValidator::Log.warn("Removing the folder #{DashTimelineValidator::Options::ANALYZER_FOLDER}")
FileUtils.rm_rf DashTimelineValidator::Options::ANALYZER_FOLDER
end
end
|