lib/abrizer/cli.rb in abrizer-0.1.0 vs lib/abrizer/cli.rb in abrizer-0.2.0
- old
+ new
@@ -1,14 +1,14 @@
require 'thor'
module Abrizer
class CLI < Thor
- desc 'all <filepath> <output_directory>', 'Runn all processes including creating ABR streams, progressive download versions, and images and video sprites'
- def all(filepath, output_dir=nil)
+ desc 'all <filepath> <output_directory> <base_url>', 'Run all processes including creating ABR streams, progressive download versions, and images and video sprites.'
+ def all(filepath, output_dir, base_url)
filepath = File.expand_path filepath
output_dir = File.expand_path output_dir
- Abrizer::All.new(filepath, output_dir).run
+ Abrizer::All.new(filepath, output_dir, base_url).run
end
desc 'abr <filepath> <output_directory>', 'From file create ABR streams, includes processing MP4 adaptations for packaging'
def abr(filepath, output_dir=nil)
filepath = File.expand_path filepath
@@ -72,9 +72,29 @@
desc 'sprites <filepath> <output_directory>', 'Create image sprites and metadata WebVTT file'
def sprites(filepath, output_dir=nil)
filepath = File.expand_path filepath
output_dir = File.expand_path output_dir
Abrizer::Sprites.new(filepath, output_dir).create
+ end
+
+ desc 'poster <output_directory>', 'Copy over a temporary poster image based on the sprite images'
+ def poster(output_dir=nil)
+ output_dir = File.expand_path output_dir
+ Abrizer::TemporaryPoster.new(output_dir).copy
+ end
+
+ desc 'captions <filepath> <output_directory>', 'Captions and subtitles files with the same basename as the video file and with a .vtt extension are copied over into the output directory'
+ def captions(filepath, output_dir=nil)
+ filepath = File.expand_path filepath
+ output_dir = File.expand_path output_dir
+ Abrizer::Captions.new(filepath, output_dir).copy
+ end
+
+ desc 'canvas <filepath> <output_directory> <base_url>', 'Creates a IIIF Canvas JSON-LD document as an API into the resources'
+ def canvas(filepath, output_directory, base_url)
+ filepath = File.expand_path filepath
+ output_directory = File.expand_path output_directory
+ Abrizer::Canvas.new(filepath, output_directory, base_url).create
end
desc 'clean <filepath> <output_directory>', 'Clean up intermediary files'
def clean(filepath, output_dir=nil)
Abrizer::Cleaner.new(filepath, output_dir).clean