src/dirbs/listgen/generator.py
def _gen_metadata_for_list(self, filename, **extra_data):
        """Function to generate a metadata dictionary for a list filename and any extra metadata."""
        file_size = os.stat(filename).st_size
        with open(filename, 'rb') as f:
            md5sum = compute_md5_hash(f)
        core_metadata = {
            'filename': os.path.abspath(filename),
            'md5sum': md5sum,
            'file_size_bytes': file_size
        }
        return {**core_metadata, **extra_data}
Function to generate a metadata dictionary for a list filename and any extra metadata.
Function to generate a metadata dictionary for a list filename and any extra metadata.
Function to generate a metadata dictionary for a list filename and any extra metadata .
def _gen_metadata_for_list(self, filename, **extra_data):
        file_size = os.stat(filename).st_size
        with open(filename, 'rb') as f:
            md5sum = compute_md5_hash(f)
        core_metadata = {
            'filename': os.path.abspath(filename),
            'md5sum': md5sum,
            'file_size_bytes': file_size
        }
        return {**core_metadata, **extra_data}
def _gen_metadata_for_list ( self , filename , ** extra_data ) : file_size = os . stat ( filename ) . st_size with open ( filename , 'rb' ) as f : md5sum = compute_md5_hash ( f ) core_metadata = { 'filename' : os . path . abspath ( filename ) , 'md5sum' : md5sum , 'file_size_bytes' : file_size } return { ** core_metadata , ** extra_data }
Function to generate a metadata dictionary for a list filename and any extra metadata.
Function to generate a metadata dictionary for a list filename and any extra metadata .
"""Function to generate a metadata dictionary for a list filename and any extra metadata."""
self
filename