Class: AstroSubframeOrganizer::Commands::Inspect
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- AstroSubframeOrganizer::Commands::Inspect
- Includes:
- Logging
- Defined in:
- lib/astro_subframe_organizer/commands/inspect.rb
Instance Method Summary collapse
Methods included from Logging
Instance Method Details
#call(path:, raw: false) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/astro_subframe_organizer/commands/inspect.rb', line 24 def call(path:, raw: false, **) unless File.exist?(path) logger.error "File not found: #{path}" exit 1 end ext = File.extname(path).downcase if ext == '.fit' && !raw print_fits_headers(path) elsif %w[.cr2 .cr3 .nef .arw .orf .raf].include?(ext) || raw print_exif_data(path) else logger.error "Unsupported file type: #{ext}" exit 1 end end |