prelinger.plugin¶
Attributes¶
Classes¶
Plugin for Prelinger Archives videos hosted at the Internet Archive. |
Functions¶
|
Parse an Internet Archive date string (YYYY, YYYY-MM, or YYYY-MM-DD). |
Module Contents¶
- prelinger.plugin.ARCHIVE_DETAILS_BASE = 'https://archive.org/details/'¶
- prelinger.plugin._IA_DATE_FORMATS: tuple[tuple[str, int], Ellipsis] = (('%Y-%m-%d', 10), ('%Y-%m', 7), ('%Y', 4))¶
- prelinger.plugin._parse_ia_date(date_str: str) datetime.datetime | None¶
Parse an Internet Archive date string (YYYY, YYYY-MM, or YYYY-MM-DD).
- class prelinger.plugin.PrelingerPlugin¶
Bases:
server.plugins.ome_plugin.OMEPluginPlugin for Prelinger Archives videos hosted at the Internet Archive.
Translates metadata obtained via the Internet Archive Metadata API (https://archive.org/developers/md-read.html) into standardised OME EducationResource cards.
The Prelinger Archives is a collection of ephemeral films - advertising, educational, industrial, and amateur - donated to the Internet Archive and made freely available in the public domain.
- mimetypes: tuple[str, Ellipsis] = ('application/vnd.prelinger.video+json',)¶
- newsgroups: dict[str, str]¶
- site_name: str = 'Prelinger Archives'¶
- librarian_contact: str = 'info@iskme.org'¶
- logo: str = 'https://archive.org/images/glogo.png'¶
- _make_metadata_card(item: server.plugins.prelinger.prelinger_models.PrelingerItem) server.plugins.ome_plugin.EducationResource¶
- make_metadata_card_from_dict(doc_dict: dict) server.plugins.ome_plugin.EducationResource¶
Create an EducationResource from a plain Python dict.
- make_metadata_card_from_json(json_payload: str) server.plugins.ome_plugin.EducationResource¶
Create an EducationResource from a raw JSON string.
- make_metadata_card_from_url(url: str) server.plugins.ome_plugin.EducationResource¶
Create an EducationResource by fetching the Internet Archive Metadata API.
Calls
GET https://archive.org/metadata/{identifier}where identifier is extracted from the supplied url.
- prelinger.plugin.plugin¶