Class: Abrizer::CLI
- Inherits:
-
Thor
- Object
- Thor
- Abrizer::CLI
- Defined in:
- lib/abrizer/cli.rb
Instance Method Summary collapse
- #abr(filepath, output_dir = nil) ⇒ Object
- #adaptations(filepath) ⇒ Object
- #all(filepath, output_dir, base_url) ⇒ Object
- #canvas(filepath, output_directory, base_url) ⇒ Object
- #captions(filepath, output_dir = nil) ⇒ Object
- #clean(filepath, output_dir = nil) ⇒ Object
- #inform(filepath) ⇒ Object
- #mp4(filepath, output_dir = nil) ⇒ Object
- #package(dash_or_hls, filepath, output_dir = nil) ⇒ Object
- #poster(output_dir = nil) ⇒ Object
- #process(filepath, output_dir = nil) ⇒ Object
- #sprites(filepath, output_dir = nil) ⇒ Object
- #vp9(filepath, output_dir = nil) ⇒ Object
Instance Method Details
#abr(filepath, output_dir = nil) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/abrizer/cli.rb', line 13 def abr(filepath, output_dir=nil) filepath = File. filepath output_dir = File. output_dir Abrizer::Processor.process(filepath, output_dir) Abrizer::PackageDashBento.new(filepath, output_dir).package Abrizer::PackageHlsBento.new(filepath, output_dir).package end |
#adaptations(filepath) ⇒ Object
43 44 45 46 |
# File 'lib/abrizer/cli.rb', line 43 def adaptations(filepath) adaptations = Abrizer::AdaptationFinder.new(filepath).adaptations puts adaptations end |
#all(filepath, output_dir, base_url) ⇒ Object
6 7 8 9 10 |
# File 'lib/abrizer/cli.rb', line 6 def all(filepath, output_dir, base_url) filepath = File. filepath output_dir = File. output_dir Abrizer::All.new(filepath, output_dir, base_url).run end |
#canvas(filepath, output_directory, base_url) ⇒ Object
93 94 95 96 97 |
# File 'lib/abrizer/cli.rb', line 93 def canvas(filepath, output_directory, base_url) filepath = File. filepath output_directory = File. output_directory Abrizer::Canvas.new(filepath, output_directory, base_url).create end |
#captions(filepath, output_dir = nil) ⇒ Object
86 87 88 89 90 |
# File 'lib/abrizer/cli.rb', line 86 def (filepath, output_dir=nil) filepath = File. filepath output_dir = File. output_dir Abrizer::Captions.new(filepath, output_dir).copy end |
#clean(filepath, output_dir = nil) ⇒ Object
100 101 102 |
# File 'lib/abrizer/cli.rb', line 100 def clean(filepath, output_dir=nil) Abrizer::Cleaner.new(filepath, output_dir).clean end |
#inform(filepath) ⇒ Object
49 50 51 52 53 |
# File 'lib/abrizer/cli.rb', line 49 def inform(filepath) informer = FfprobeInformer.new(filepath) puts informer.json_result puts informer end |
#mp4(filepath, output_dir = nil) ⇒ Object
29 30 31 32 33 |
# File 'lib/abrizer/cli.rb', line 29 def mp4(filepath, output_dir=nil) filepath = File. filepath output_dir = File. output_dir Abrizer::ProgressiveMp4.new(filepath, output_dir).create end |
#package(dash_or_hls, filepath, output_dir = nil) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/abrizer/cli.rb', line 56 def package(dash_or_hls, filepath, output_dir=nil) filepath = File. filepath output_dir = File. output_dir case dash_or_hls when "dash" Abrizer::PackageDashBento.new(filepath, output_dir).package when "hls" Abrizer::PackageHlsBento.new(filepath, output_dir).package when "all" Abrizer::PackageDashBento.new(filepath, output_dir).package Abrizer::PackageHlsBento.new(filepath, output_dir).package else puts "Not a valid packaging value. Try dash or hls." end end |
#poster(output_dir = nil) ⇒ Object
80 81 82 83 |
# File 'lib/abrizer/cli.rb', line 80 def poster(output_dir=nil) output_dir = File. output_dir Abrizer::TemporaryPoster.new(output_dir).copy end |
#process(filepath, output_dir = nil) ⇒ Object
22 23 24 25 26 |
# File 'lib/abrizer/cli.rb', line 22 def process(filepath, output_dir=nil) filepath = File. filepath output_dir = File. output_dir Abrizer::Processor.process(filepath, output_dir) end |
#sprites(filepath, output_dir = nil) ⇒ Object
73 74 75 76 77 |
# File 'lib/abrizer/cli.rb', line 73 def sprites(filepath, output_dir=nil) filepath = File. filepath output_dir = File. output_dir Abrizer::Sprites.new(filepath, output_dir).create end |
#vp9(filepath, output_dir = nil) ⇒ Object
36 37 38 39 40 |
# File 'lib/abrizer/cli.rb', line 36 def vp9(filepath, output_dir=nil) filepath = File. filepath output_dir = File. output_dir Abrizer::ProgressiveVp9.new(filepath, output_dir).create end |