facile_rs.utils.metadata.codemeta¶
Module Contents¶
Classes¶
A class for storing and manipulating metadata in the CodeMeta format |
Data¶
API¶
- logger = 'getLogger(...)'¶
- class CodemetaMetadata¶
A class for storing and manipulating metadata in the CodeMeta format
Initialization
Initialize metadata set as an empty dictionary.
- fetch(location)¶
Update metadata set with data fetched from a CodeMeta file
- Parameters:
location (str) – URL or path to the CodeMeta JSON file
- fetch_authors(locations)¶
Fetch authors from CodeMeta files and update metadata set
- Parameters:
locations – list of URL or paths to CodeMeta files
locations – list
- fetch_contributors(locations)¶
Fetch contributors from CodeMeta files and update metadata set
- Parameters:
locations – list of URL or paths to CodeMeta files
locations – list
- compute_names()¶
Add full name of authors and contributors in metadata set from given name and family name, under the dictionary key ‘name’.
- remove_doubles()¶
Remove duplicates in authors and contributors lists, comparing names (key: name) and ids (key: @id).
- sort_persons()¶
Sort authors and contributors alphabetically based on family name.
- to_json()¶
Dump metadata set as JSON-formatted string.
- Returns:
metadata set as JSON-formatted string
- Return type:
str