#!/usr/bin/env ruby # frozen_string_literal: true require 'bundler/setup' require 'optparse' require 'ostruct' require 'movie_cleaner' options = OpenStruct.new OptionParser.new do |opt| opt.on('-v') { |o| options.verbose = o } opt.on('-d', '--directory DIRECTORY', 'The base path for all movie files') { |o| options.base_path = o } opt.on('-r', '--resolutions 1080p,720p', Array, 'The wanted resolutions in order (Default: 1080p,720p') { |o| options.resolutions = o } end.parse! movie_cleaner = MovieCleaner::Cleaner.new(options.base_path, options.verbose, options.resolutions) movie_cleaner.print_rm_commands