Sha256: 785c9e0ffcbd249bd3dd39ce26c997366f58814508ded4e4230c92e0c160931e
Contents?: true
Size: 1.11 KB
Versions: 113
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true require 'avm/eac_latex_base0/sources/build' require 'eac_cli/core_ext' module Avm module EacLatexBase0 module Sources module Runners class BuildChapters runner_with :help do arg_opt '-o', '--output-dir', 'Output chapters to specific directory.' end def run runner_context.call(:project_banner) output_dir.mkpath project.chapters.each_with_index do |c, i| ::Avm::EacLatexBase0::Sources::Build.new(project, chapter_build_options(c, i)) end end private def chapter_build_options(chapter, index) output_name = "#{(index + 1).to_s.rjust(3, '0')}_#{chapter}.pdf" { output_file: output_dir.join(output_name), chapter: chapter } end def output_dir_uncached ( parsed.output_dir || project.default_output_dir.join('chapters') ).to_pathname end def project runner_context.call(:project) end end end end end end
Version data entries
113 entries across 113 versions & 2 rubygems