ISCC - Metadata Handling#
Metadata handling functions
extract_metadata(fp)
#
Extract metadata from file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fp |
str
|
Filepath to media file. |
required |
Returns:
Type | Description |
---|---|
IsccMeta
|
Metadata mapped to IsccMeta schema |
embed_metadata(fp, meta)
#
Embed metadata into a copy of the media file and return path to updated file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fp |
str
|
Filepath to source media file |
required |
meta |
IsccMeta
|
Metadata to embed into media file |
required |
Returns:
Type | Description |
---|---|
str|None
|
Filepath to the new media file with embedded metadata (None if no embedding supported) |
IsccMeta
#
Custom IsccMeta with text trimming support