C4::MarcModificationTemplates - Module to manage MARC Modification Templates
MARC Modification Templates are a tool for marc batch imports, so that librarians can set up templates for various vendors' files telling Koha what fields to insert data into.
my @templates = GetModificationTemplates( $template_id ); Passing optional $template_id marks it as the selected template.
$template_id = AddModificationTemplate( $template_name[, $template_id ] ); If $template_id is supplied, the actions from that template will be copied into the newly created template.
DelModificationTemplate( $template_id );
my $action = GetModificationTemplateAction( $mmta_id );
my @actions = GetModificationTemplateActions( $template_id );
AddModificationTemplateAction(
$template_id, $action, $field_number,
$from_field, $from_subfield, $field_value,
$to_field, $to_subfield, $to_regex_search, $to_regex_replace, $to_regex_modifiers
$conditional, $conditional_field, $conditional_subfield,
$conditional_comparison, $conditional_value,
$conditional_regex, $description
);
Adds a new action to the given modification template.
ModModificationTemplateAction(
$mmta_id, $action, $field_number, $from_field,
$from_subfield, $field_value, $to_field,
$to_subfield, $to_regex_search, $to_regex_replace, $to_regex_modifiers, $conditional,
$conditional_field, $conditional_subfield,
$conditional_comparison, $conditional_value,
$conditional_regex, $description
);
Modifies an existing action.
DelModificationTemplateAction( $mmta_id ); Deletes the given template action.
MoveModificationTemplateAction( $mmta_id, $where ); Changes the order for the given action. Options for $where are 'up', 'down', 'top' and 'bottom'
ModifyRecordsWithTemplate( $template_id, $batch ); Accepts a template id and a MARC::Batch object.
ModifyRecordWithTemplate( $template_id, $record ) Accepts a MARC::Record object ( $record ) and modifies it based on the actions for the given $template_id
Kyle M Hall