folio-data-import 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of folio-data-import might be problematic. Click here for more details.
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/PKG-INFO +1 -1
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/pyproject.toml +1 -1
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/marc_preprocessors/_preprocessors.py +4 -3
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/LICENSE +0 -0
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/README.md +0 -0
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/MARCDataImport.py +0 -0
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/UserImport.py +0 -0
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/__init__.py +0 -0
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/__main__.py +0 -0
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/custom_exceptions.py +0 -0
- {folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/marc_preprocessors/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "folio_data_import"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.2"
|
|
4
4
|
description = "A python module to interact with the data importing capabilities of the open-source FOLIO ILS"
|
|
5
5
|
authors = ["Brooks Travis <brooks.travis@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -3,6 +3,7 @@ import sys
|
|
|
3
3
|
from typing import Callable, Dict, List, Tuple, Union
|
|
4
4
|
import pymarc
|
|
5
5
|
import logging
|
|
6
|
+
import re
|
|
6
7
|
|
|
7
8
|
from pymarc.record import Record
|
|
8
9
|
|
|
@@ -361,7 +362,7 @@ def clean_empty_fields(record: Record, **kwargs) -> Record:
|
|
|
361
362
|
|
|
362
363
|
for field in record.get_fields(*MAPPED_FIELDS.keys()):
|
|
363
364
|
len_subs = len(field.subfields)
|
|
364
|
-
subfield_value = bool(field.subfields[0].value) if len_subs else False
|
|
365
|
+
subfield_value = bool(re.sub(r"[.,-]", "", field.subfields[0].value).strip()) if len_subs else False
|
|
365
366
|
if int(field.tag) > 9 and len_subs == 0:
|
|
366
367
|
logger.log(
|
|
367
368
|
26,
|
|
@@ -463,12 +464,12 @@ def move_authority_subfield_9_to_0_all_controllable_fields(record: Record, **kwa
|
|
|
463
464
|
"100", "110", "111", "130",
|
|
464
465
|
"600", "610", "611", "630", "650", "651", "655",
|
|
465
466
|
"700", "710", "711", "730",
|
|
466
|
-
"800", "810", "811", "830"
|
|
467
|
+
"800", "810", "811", "830", "880"
|
|
467
468
|
]
|
|
468
469
|
for field in record.get_fields(*controlled_fields):
|
|
469
470
|
for subfield in list(field.get_subfields("9")):
|
|
470
471
|
field.add_subfield("0", subfield)
|
|
471
|
-
field.delete_subfield("9"
|
|
472
|
+
field.delete_subfield("9")
|
|
472
473
|
logger.log(
|
|
473
474
|
26,
|
|
474
475
|
"DATA ISSUE\t%s\t%s\t%s",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{folio_data_import-0.3.1 → folio_data_import-0.3.2}/src/folio_data_import/custom_exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|