openstax.plugin =============== .. py:module:: openstax.plugin Attributes ---------- .. autoapisummary:: openstax.plugin.json_path Classes ------- .. autoapisummary:: openstax.plugin.OpenStaxPlugin Module Contents --------------- .. py:class:: OpenStaxPlugin Bases: :py:obj:`server.plugins.ome_plugin.OMEPlugin` Plugin to translate OpenStax book metadata to OME EducationResource cards. .. py:attribute:: mimetypes :type: tuple[str, Ellipsis] :value: ('application/vnd.openstax.book+json',) .. py:attribute:: newsgroups :type: dict[str, str] .. py:attribute:: site_name :type: str :value: 'OpenStax' .. py:attribute:: librarian_contact :type: str :value: 'info@iskme.org' .. py:attribute:: logo :type: str :value: 'https://openstax.org/dist/images/logos/logo.svg' .. py:method:: make_metadata_card(book: server.plugins.openstax.openstax_models.OpenStaxBook) -> server.plugins.ome_plugin.EducationResource .. py:method:: make_metadata_card_from_dict(doc_dict: dict) -> server.plugins.ome_plugin.EducationResource Create metadata card from a dict of OpenStax book data. .. py:method:: make_metadata_card_from_json(json_payload: str) -> server.plugins.ome_plugin.EducationResource Create metadata card from a JSON payload. .. py:method:: make_metadata_card_from_url(url: str) -> server.plugins.ome_plugin.EducationResource Create metadata card from a URL. .. py:data:: json_path