Class: DerivativeRodeo::Generators::AltoGenerator

Inherits:
BaseGenerator
  • Object
show all
Includes:
HocrGenerator::RequiresExistingFile
Defined in:
lib/derivative_rodeo/generators/alto_generator.rb

Overview

Note:

Assumes that we’re receiving a HOCR file (generated via HocrGenerator).

Generate the Alto XML from the given input_uris.

Instance Attribute Summary

Attributes inherited from BaseGenerator

#input_uris, #output_extension, #output_location_template, #preprocessed_location_template

Instance Method Summary collapse

Methods included from HocrGenerator::RequiresExistingFile

#with_each_requisite_location_and_tmp_file_path

Methods inherited from BaseGenerator

#derive_preprocessed_template_from, #destination, #generated_files, #generated_uris, #initialize, #input_files, #run, #valid_instantiation?, #with_each_requisite_location_and_tmp_file_path

Constructor Details

This class inherits a constructor from DerivativeRodeo::Generators::BaseGenerator

Instance Method Details

#build_step(output_location:, input_tmp_file_path:) ⇒ StorageLocations::BaseLocation

Parameters:

Returns:

See Also:

  • #requisite_files


26
27
28
29
30
# File 'lib/derivative_rodeo/generators/alto_generator.rb', line 26

def build_step(output_location:, input_tmp_file_path:, **)
  output_location.with_new_tmp_path do |output_tmp_file_path|
    convert_to_coordinates(path_to_hocr: input_tmp_file_path, path_to_alto: output_tmp_file_path)
  end
end