diff --git a/pyproject.toml b/pyproject.toml index de3452c..dd30532 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "folio_data_import" -version = "0.5.0b5" +version = "0.5.0" description = "A python module to perform bulk import of data into a FOLIO environment. Currently supports MARC and user data import." authors = [{ name = "Brooks Travis", email = "brooks.travis@gmail.com" }] license = "MIT" diff --git a/src/folio_data_import/marc_preprocessors/_preprocessors.py b/src/folio_data_import/marc_preprocessors/_preprocessors.py index 96835da..bb0663f 100644 --- a/src/folio_data_import/marc_preprocessors/_preprocessors.py +++ b/src/folio_data_import/marc_preprocessors/_preprocessors.py @@ -508,6 +508,19 @@ def move_authority_subfield_9_to_0_all_controllable_fields(record: Record, **kwa return record +def mark_deleted(record: Record, **kwargs) -> Record: + """ + Mark the record as deleted by setting the record status to 'd'. + + Args: + record (Record): The MARC record to preprocess. + Returns: + Record: The preprocessed MARC record. + """ + record.leader = pymarc.Leader(record.leader[:5] + "d" + record.leader[6:]) + return record + + def ordinal(n: int) -> str: s = ("th", "st", "nd", "rd") + ("th",) * 10 v = n % 100