prelinger.plugin ================ .. py:module:: prelinger.plugin Attributes ---------- .. autoapisummary:: prelinger.plugin.ARCHIVE_DETAILS_BASE prelinger.plugin._IA_DATE_FORMATS prelinger.plugin.plugin Classes ------- .. autoapisummary:: prelinger.plugin.PrelingerPlugin Functions --------- .. autoapisummary:: prelinger.plugin._parse_ia_date Module Contents --------------- .. py:data:: ARCHIVE_DETAILS_BASE :value: 'https://archive.org/details/' .. py:data:: _IA_DATE_FORMATS :type: tuple[tuple[str, int], Ellipsis] :value: (('%Y-%m-%d', 10), ('%Y-%m', 7), ('%Y', 4)) .. py:function:: _parse_ia_date(date_str: str) -> datetime.datetime | None Parse an Internet Archive date string (YYYY, YYYY-MM, or YYYY-MM-DD). .. py:class:: PrelingerPlugin Bases: :py:obj:`server.plugins.ome_plugin.OMEPlugin` Plugin 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. .. py:attribute:: mimetypes :type: tuple[str, Ellipsis] :value: ('application/vnd.prelinger.video+json',) .. py:attribute:: newsgroups :type: dict[str, str] .. py:attribute:: site_name :type: str :value: 'Prelinger Archives' .. py:attribute:: librarian_contact :type: str :value: 'info@iskme.org' .. py:attribute:: logo :type: str :value: 'https://archive.org/images/glogo.png' .. py:method:: _make_metadata_card(item: server.plugins.prelinger.prelinger_models.PrelingerItem) -> server.plugins.ome_plugin.EducationResource .. py:method:: make_metadata_card_from_dict(doc_dict: dict) -> server.plugins.ome_plugin.EducationResource Create an EducationResource from a plain Python dict. .. py:method:: make_metadata_card_from_json(json_payload: str) -> server.plugins.ome_plugin.EducationResource Create an EducationResource from a raw JSON string. .. py:method:: 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*. .. py:data:: plugin