Method: Metanorma::Collection::FileLookup#add_section_split_instance

Defined in:
lib/metanorma/collection/filelookup/filelookup_sectionsplit.rb

#add_section_split_instance(file, manifest, key, idx) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/metanorma/collection/filelookup/filelookup_sectionsplit.rb', line 52

def add_section_split_instance(file, manifest, key, idx)
  presfile, newkey, xml =
    add_section_split_instance_prep(file, key)
  manifest[newkey] =
    { parentid: key, presentationxml: true, type: "fileref",
      rel_path: file[:url], out_path: File.basename(file[:url]),
      anchors: read_anchors(xml), ids: read_ids(xml),
      sectionsplit_output: true,
      bibdata: @files[key][:bibdata], ref: presfile }
  @files_to_delete << file[:url]
  manifest[newkey][:bare] = true unless idx.zero?
end