thoth.plugin

Attributes

plugin

Classes

ThothPlugin

Plugin for Thoth Open Metadata (https://thoth.pub/books).

Module Contents

class thoth.plugin.ThothPlugin

Bases: 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

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'
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