libretexts.plugin ================= .. py:module:: libretexts.plugin Attributes ---------- .. autoapisummary:: libretexts.plugin.LICENSE_TO_SPDX Classes ------- .. autoapisummary:: libretexts.plugin.LibreTextsPlugin Functions --------- .. autoapisummary:: libretexts.plugin._parse_date Module Contents --------------- .. py:data:: LICENSE_TO_SPDX :type: types.MappingProxyType[str, str] .. py:function:: _parse_date(value: str) -> datetime.datetime | None .. py:class:: LibreTextsPlugin Bases: :py:obj:`server.plugins.ome_plugin.OMEPlugin` Plugin for LibreTexts Commons open textbooks. Translates LibreTexts Commons catalog records into OME EducationResource cards using the public JSON API at: https://commons.libretexts.org/api/v1/commons/catalog .. py:attribute:: mimetypes :type: tuple[str, ...] :value: ('application/vnd.libretexts.book+json',) .. py:attribute:: newsgroups :type: dict[str, str] .. py:attribute:: site_name :type: str :value: 'LibreTexts' .. py:attribute:: librarian_contact :type: str :value: 'info@libretexts.org' .. py:attribute:: logo :type: str :value: 'https://commons.libretexts.org/favicon.ico' .. py:method:: make_metadata_card(book: server.plugins.libretexts.libretexts_models.LibreTextsBook) -> server.plugins.ome_plugin.EducationResource Translate a LibreTextsBook record into an OME EducationResource. .. py:method:: make_metadata_card_from_dict(doc_dict: dict) -> server.plugins.ome_plugin.EducationResource Create an EducationResource from a dict of LibreTexts book data. .. 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 Direct URL lookup is not supported; use bulk_import.py.