oer_africa.plugin¶
Attributes¶
Classes¶
Plugin for OER Africa — a continental repository of open educational resources |
Functions¶
|
|
|
|
|
Module Contents¶
- oer_africa.plugin._LICENSE_MAP: types.MappingProxyType[str, str]¶
- oer_africa.plugin._HTML_TAG_RE¶
- oer_africa.plugin._strip_html(text: str) str¶
- oer_africa.plugin._parse_datetime(value: str) datetime.datetime | None¶
- oer_africa.plugin._normalise_license(raw: str) str¶
- class oer_africa.plugin.OERAFricaPlugin¶
Bases:
server.plugins.ome_plugin.OMEPluginPlugin for OER Africa — a continental repository of open educational resources hosted at https://www.oerafrica.org.
- Metadata is sourced from the Drupal JSON:API endpoint:
- Resources can be searched at:
- mimetypes: tuple[str, Ellipsis] = ('application/vnd.oer-africa.resource+json',)¶
- newsgroups: dict[str, str]¶
- site_name: str = 'OER Africa'¶
- librarian_contact: str = 'info@oerafrica.org'¶
- logo: str = 'https://www.oerafrica.org/sites/default/files/oerafrica-logo.png'¶
- make_metadata_card(resource: server.plugins.oer_africa.oer_africa_models.OERAFricaResource) server.plugins.ome_plugin.EducationResource¶
- make_metadata_card_from_dict(doc_dict: dict) server.plugins.ome_plugin.EducationResource¶
Create a metadata card from a dict representing one OER Africa resource.
- make_metadata_card_from_json(json_payload: str) server.plugins.ome_plugin.EducationResource¶
Create a metadata card from a JSON string for one OER Africa resource.
- make_metadata_card_from_url(url: str) server.plugins.ome_plugin.EducationResource¶
Fetch a single OER Africa resource page and return its metadata card.
- The URL should be of the form:
https://www.oerafrica.org/node/<nid>?_format=json
or the canonical resource URL.
- oer_africa.plugin.json_path¶