# frozen_string_literal: true require "thor" module VixenRename class Cli < Thor def self.exit_on_failure? true end desc "rename file_or_path", "Rename files in a directory" long_desc <<-LONGDESC `vixen_rename rename` will rename file(s) given to the cli You can pass a single file or a directory containing files By default the gem will not touch the files. The only way to rename files is by passing a `--commit` flag. > $ vixen_rename rename CHANNELS_102217_480P.mp4 > $ vixen_rename rename . LONGDESC option :commit, alias: :c, type: :boolean, default: false def rename(location) opts = options.transform_keys(&:to_sym) Client.new(location, **opts).convert end end end