thoth.plugin ============ .. py:module:: thoth.plugin Attributes ---------- .. autoapisummary:: thoth.plugin.plugin Classes ------- .. autoapisummary:: thoth.plugin.ThothPlugin Module Contents --------------- .. py:class:: ThothPlugin Bases: :py:obj:`server.plugins.ome_plugin.OMEPlugin` Plugin for Thoth Open Metadata (https://thoth.pub/books). Thoth is an open metadata management and dissemination system for open access books. It provides a public GraphQL API used by academic publishers to record and share book metadata. This plugin uses the ``thothlibrary`` Python package to query the Thoth GraphQL API and translate book records into OME ``EducationResource`` cards. API docs: https://api.thoth.pub PyPI: https://pypi.org/project/thothlibrary .. py:attribute:: mimetypes :type: tuple[str, Ellipsis] :value: ('application/vnd.thoth.book+json',) .. py:attribute:: newsgroups :type: dict[str, str] .. py:attribute:: site_name :type: str :value: 'Thoth Open Metadata' .. py:attribute:: librarian_contact :type: str :value: 'info@iskme.org' .. py:attribute:: logo :type: str :value: 'https://thoth.pub/assets/thoth-icon.png' .. py:method:: make_metadata_card(book: server.plugins.thoth.thoth_models.ThothBook) -> server.plugins.ome_plugin.EducationResource Translate a ThothBook 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 Thoth 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 Create a metadata card from a Thoth book URL. Direct URL lookup is not currently supported. Use bulk_import.py to fetch books from the Thoth GraphQL API. .. py:data:: plugin