Method: Resumer::CLI#add_export_command

Defined in:
lib/resumer.rb

#add_export_commandObject

rubocop:disable Metrics/MethodLength



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/resumer.rb', line 24

def add_export_command
  command :export do |c|
    c.option '-c', '--config FILE', 'Load a custom configuration file'
    c.option '--format STRING', 'Destination format (HTML or PDF)'
    c.summary = 'Export a YAML resume to HTML or PDF format'
    c.syntax = "#{Resumer::BIN} export <source.yml> [destination.html|.pdf]"
    c.action do |args, options|
      Resumer::Command::Export.new(args, options).run
    rescue StandardError => e
      say "Error (#{e.class.name}): #{e.message}"
      exit 1
    end
  end
end