Sha256: 6bb30d16d0dd6bf75835a926c77004ee753adb079a975fcab8c250e6584ed471

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require 'avm/eac_writings_base0/project_build'
require 'eac_cli/core_ext'
require 'eac_ruby_utils/console/docopt_runner'

module Avm
  module Tools
    class Runner
      class AppSrc
        class EacWritingsBase0
          class BuildSingle
            runner_with :help do
              arg_opt '-s', '--source-dir', 'Write .tex source code in specific directory.'
              arg_opt '-f', '--output-file', 'Output to specific file.'
              arg_opt '-c', '--chapter', 'Write only the chapter <chapter>.'
              bool_opt '-o', '--open', 'Open the file after build.'
            end

            def run
              runner_context.call(:project_banner)
              infov 'Build options', build_options
              ::Avm::EacWritingsBase0::ProjectBuild.new(runner_context.call(:project), parsed)
            end

            private

            def build_options
              parsed.slice_fetch(:output_file, :open, :chapter, :source_dir)
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
avm-tools-0.97.0 lib/avm/tools/runner/app_src/eac_writings_base0/build_single.rb
avm-tools-0.96.0 lib/avm/tools/runner/app_src/eac_writings_base0/build_single.rb