Skip to content

Commit

Permalink
[app][rfct] preserve 'relationships' file on saf export
Browse files Browse the repository at this point in the history
  • Loading branch information
adendogo committed Jul 26, 2024
1 parent bf05d27 commit 0a29671
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/digiflow/digiflow_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
SRC_MAX : ''
}


class DigiFlowExportError(Exception):
"""Mark Export Exception"""

Expand Down Expand Up @@ -77,7 +78,7 @@ def __repr__(self) -> str:

def __eq__(self, __o: object) -> bool:
return self.path_source == __o.path_source and self.path_target == __o.path_target

def __lt__(self, __o: object) -> bool:
self_src_base = os.path.basename(self.path_source)
other_src_base = os.path.basename(__o.path_source)
Expand Down Expand Up @@ -162,7 +163,8 @@ def _handle_contents_file(working_item_dir, export_mappings):
if mapping.access_right is not None:
_right = f"\tpermissions: -r {mapping.access_right}"
contents_file.write(f"{_name}{_right}\n")
elif _name == 'dublin_core.xml' or _name.startswith('metadata_'):
elif _name in ['dublin_core.xml', 'relationships']\
or _name.startswith('metadata_'):
# these xml's are dublin core metadata for E-Pflicht migration
continue
elif _name.endswith('.pdf.txt'):
Expand Down Expand Up @@ -271,9 +273,8 @@ def _handle_dublin_core_derivates(work_dir):
</dublin_core>
"""
dc_path = os.path.join(work_dir, "metadata_local.xml")
# axel
if os.path.exists(dc_path):
# already provided by pipeline (E-Pflicht)
# already provided by pipeline (EPflicht)
return
dublin_core = ET.Element('dublin_core', {'schema': 'local'})
el_pict = ET.Element('dcvalue')
Expand Down

0 comments on commit 0a29671

Please sign in to comment.