Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]" }]
license = "MIT"
Expand Down
13 changes: 13 additions & 0 deletions src/folio_data_import/marc_preprocessors/_preprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down