Method: Metanorma::CollectionRenderer#file_sectionsplit_copy

Defined in:
lib/metanorma/collection_fileprocess.rb

#file_sectionsplit_copy(file, base, identifier, ext, format) ⇒ Object



199
200
201
202
203
204
205
206
# File 'lib/metanorma/collection_fileprocess.rb', line 199

def file_sectionsplit_copy(file, base, identifier, ext, format)
  dir = file.path.sub(/\.xml$/, ".#{ext}_collection")
  files = Dir.glob("#{dir}/*.#{ext}")
  FileUtils.cp files, @outdir
  cover = File.join(@outdir, base.sub(/\.html$/, ".index.html"))
  FileUtils.cp File.join(dir, "index.html"), cover
  @files[identifier][:outputs][format] = cover
end