opex-manifest-generator 1.3.4__py3-none-any.whl → 1.3.5__py3-none-any.whl

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.
@@ -7,6 +7,7 @@ license: Apache License 2.0"
7
7
 
8
8
  import zipfile, os, sys, stat, shutil, logging, lxml
9
9
  from datetime import datetime, timedelta
10
+ from typing import Optional
10
11
 
11
12
  logger = logging.getLogger(__name__)
12
13
 
@@ -64,7 +65,7 @@ def win_path_delimiter() -> str:
64
65
  else:
65
66
  return "/"
66
67
 
67
- def check_nan(value) -> str | None:
68
+ def check_nan(value) -> Optional[str]:
68
69
  if str(value).lower() in {"nan","nat"}:
69
70
  value = None
70
71
  return value
@@ -72,7 +72,7 @@ class OpexManifestGenerator():
72
72
  autoref_flag: str = None,
73
73
  prefix: str = None,
74
74
  suffix: str = None,
75
- suffix_option: str|None = 'apply_to_files',
75
+ suffix_option: Optional[str] = 'apply_to_files',
76
76
  acc_prefix: str = None,
77
77
  accession_mode: str = False,
78
78
  start_ref: int = 1,
@@ -98,7 +98,7 @@ class OpexManifestGenerator():
98
98
  keywords_abbreviation_number: int = 3,
99
99
  sort_key = lambda x: (os.path.isfile(x), str.casefold(x)),
100
100
  delimiter = "/",
101
- autoref_options: str|None = None) -> None:
101
+ autoref_options: Optional[str] = None) -> None:
102
102
 
103
103
  self.root = os.path.abspath(root)
104
104
  # Base Parameters
@@ -667,7 +667,7 @@ class OpexManifestGenerator():
667
667
  if len(self.properties) == 0:
668
668
  xmlroot.remove(self.properties)
669
669
 
670
- def generate_opex_fixity(self, file_path: str, algorithm: list | None = None) -> list:
670
+ def generate_opex_fixity(self, file_path: str, algorithm: Optional[list] = None) -> list:
671
671
  """Generate fixities for a file. If algorithm is None, defaults to ['SHA-1']."""
672
672
  algorithm = algorithm or ['SHA-1']
673
673
  list_fixity = []
@@ -679,7 +679,7 @@ class OpexManifestGenerator():
679
679
  list_fixity.append([algorithm_type, hash_value, file_path])
680
680
  return list_fixity
681
681
 
682
- def generate_pax_folder_opex_fixity(self, folder_path: str, fixitiesxml: ET._Element, filesxml: ET._Element, algorithm: list | None = None) -> list:
682
+ def generate_pax_folder_opex_fixity(self, folder_path: str, fixitiesxml: ET._Element, filesxml: ET._Element, algorithm: Optional[list] = None) -> list:
683
683
  """Generate fixities for files inside a pax folder. If algorithm is None, defaults to ['SHA-1']."""
684
684
  algorithm = algorithm or ['SHA-1']
685
685
  list_fixity = []
@@ -704,7 +704,7 @@ class OpexManifestGenerator():
704
704
  return list_fixity, list_path
705
705
 
706
706
 
707
- def generate_pax_zip_opex_fixity(self, file_path: str, algorithm: list | None = None) -> list:
707
+ def generate_pax_zip_opex_fixity(self, file_path: str, algorithm: Optional[list] = None) -> list:
708
708
  """Generate fixities for files inside a pax/zip. If algorithm is None, defaults to ['SHA-1']."""
709
709
  algorithm = algorithm or ['SHA-1']
710
710
  list_fixity = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opex_manifest_generator
3
- Version: 1.3.4
3
+ Version: 1.3.5
4
4
  Summary: An Opex Manifest Generator tool for use with OPEX Files, as designed by Preservica
5
5
  Author-email: Christopher Prince <c.pj.prince@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -1,16 +1,16 @@
1
1
  opex_manifest_generator/__init__.py,sha256=fsN-dLjNMn-AfjeG2jkryzIa69bY09B5xLTqWedOv_w,461
2
2
  opex_manifest_generator/cli.py,sha256=5HXja7uPccPSq0N94Rzc4uMsDasIpCjJPseqchodV-0,21229
3
- opex_manifest_generator/common.py,sha256=7CurJksyCDW75R1H63VZkXuqHeIeVmPl6lQ7vwDhreQ,3043
3
+ opex_manifest_generator/common.py,sha256=3imZ5zrL7BzISjIRySNZauDXv2uW5Pi89iVSlqmVkBE,3074
4
4
  opex_manifest_generator/hash.py,sha256=pvb9y7UlB4NjTkR4uc-4Zb8Hp6wO4MS61WQtSt0_KmI,2853
5
- opex_manifest_generator/opex_manifest.py,sha256=xc9TKOED0DZeyM6LPdUZGhTJBXdgqVC62RFkUrLKfHo,55502
5
+ opex_manifest_generator/opex_manifest.py,sha256=55PshtmN6FQmfKzp_SeW-jStOunGBV0hbI3XDPOl2fU,55521
6
6
  opex_manifest_generator/metadata/DublinCore Template.xml,sha256=csNGXzSH27Whs4BQNuwMZl8nLSdDq7Y_OblTfzeBqWQ,775
7
7
  opex_manifest_generator/metadata/EAD Template.xml,sha256=OsWjUfKiLAsc1zqm56auyFSDYMuZpu6a49AFgqZNzlU,2167
8
8
  opex_manifest_generator/metadata/GDPR Template.xml,sha256=r6WTATRVt1sr7VCdaXOwz4vLgU3IgFFx7oRmPnORBWc,475
9
9
  opex_manifest_generator/metadata/MODS Template.xml,sha256=qmH03nIPGuPokFiBS_HjIPht1bzc1gsY4mPEoAVdHTg,2635
10
10
  opex_manifest_generator/options/options.properties,sha256=33KhW-o3CaDAY8ZVqMFfo9-fwZwAFJfitYmXjd1wA5U,479
11
- opex_manifest_generator-1.3.4.dist-info/licenses/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
12
- opex_manifest_generator-1.3.4.dist-info/METADATA,sha256=_HsIoJfAFFuevPvo_7i--y8YiJfXQ9fCDwu0ISxF1No,31031
13
- opex_manifest_generator-1.3.4.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
14
- opex_manifest_generator-1.3.4.dist-info/entry_points.txt,sha256=WGMc3hWlqOsQ8DcTuy8-DyBbJKkWNImT4J1FasVDHts,70
15
- opex_manifest_generator-1.3.4.dist-info/top_level.txt,sha256=K48eGnaDLVO6YDJdAZLqbeoZvJHBGX25cvYT-i8gWt0,24
16
- opex_manifest_generator-1.3.4.dist-info/RECORD,,
11
+ opex_manifest_generator-1.3.5.dist-info/licenses/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
12
+ opex_manifest_generator-1.3.5.dist-info/METADATA,sha256=G_rpXxgozIPKMAYvA6aukovrcAmlebG1FkuO5zhF07g,31031
13
+ opex_manifest_generator-1.3.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
+ opex_manifest_generator-1.3.5.dist-info/entry_points.txt,sha256=WGMc3hWlqOsQ8DcTuy8-DyBbJKkWNImT4J1FasVDHts,70
15
+ opex_manifest_generator-1.3.5.dist-info/top_level.txt,sha256=K48eGnaDLVO6YDJdAZLqbeoZvJHBGX25cvYT-i8gWt0,24
16
+ opex_manifest_generator-1.3.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.10.1)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5