thoth.plugin¶
Attributes¶
Classes¶
Plugin for Thoth Open Metadata (https://thoth.pub/books). |
Module Contents¶
- class thoth.plugin.ThothPlugin¶
Bases:
server.plugins.ome_plugin.OMEPluginPlugin 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
thothlibraryPython package to query the Thoth GraphQL API and translate book records into OMEEducationResourcecards.API docs: https://api.thoth.pub PyPI: https://pypi.org/project/thothlibrary
- mimetypes: tuple[str, Ellipsis] = ('application/vnd.thoth.book+json',)¶
- newsgroups: dict[str, str]¶
- site_name: str = 'Thoth Open Metadata'¶
- librarian_contact: str = 'info@iskme.org'¶
- logo: str = 'https://thoth.pub/assets/thoth-icon.png'¶
- make_metadata_card(book: server.plugins.thoth.thoth_models.ThothBook) server.plugins.ome_plugin.EducationResource¶
Translate a ThothBook into an OME EducationResource.
- make_metadata_card_from_dict(doc_dict: dict) server.plugins.ome_plugin.EducationResource¶
Create an EducationResource from a dict of Thoth book data.
- 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 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.
- thoth.plugin.plugin¶