ASSETS.cli.config do |cnf| cnf.input(default_option: "-entries-from") do |session, str_opt, options| input = [] if SCR.get_arg(str_opt) file = SCR.get_file(str_opt, required: true) options.deep_merge!(input: {file: {name: file}}) if SCR.get_arg("-xml") options.deep_merge!(input: {file: {format: :xml}}) session.config.files.validate(:xml, file) input = session.entries(file: file, format: :xml) elsif SCR.get_arg("-json") options.deep_merge!(input: {file: {format: :json}}) input = Eco::API::Organization::People.new(JSON.parse(File.read(file))) else options.deep_merge!(input: {file: {format: :csv}}) input = session.csv_entries(file) end end input end end