project_gutenberg.plugin ======================== .. py:module:: project_gutenberg.plugin Attributes ---------- .. autoapisummary:: project_gutenberg.plugin.GUTENBERG_BASE_URL project_gutenberg.plugin.plugin Classes ------- .. autoapisummary:: project_gutenberg.plugin.ProjectGutenbergPlugin Module Contents --------------- .. py:data:: GUTENBERG_BASE_URL :value: 'https://www.gutenberg.org' .. py:class:: ProjectGutenbergPlugin Bases: :py:obj:`server.plugins.ome_plugin.OMEPlugin` Plugin for Project Gutenberg (https://www.gutenberg.org). Project Gutenberg is the oldest digital library, offering over 70,000 free e-books — mainly literary works for which copyright has expired in the United States and are therefore in the public domain. This plugin uses the Gutendex public REST/JSON API (https://gutendex.com/) to translate book metadata into OME EducationResource cards. API docs: https://gutendex.com/ .. py:attribute:: mimetypes :type: tuple[str, Ellipsis] :value: ('application/vnd.gutenberg.book+json',) .. py:attribute:: newsgroups :type: dict[str, str] .. py:attribute:: site_name :type: str :value: 'Project Gutenberg' .. py:attribute:: librarian_contact :type: str :value: 'info@iskme.org' .. py:attribute:: logo :type: str :value: 'https://www.gutenberg.org/gutenberg/pg-logo-129x80.png' .. py:method:: make_metadata_card(book: server.plugins.project_gutenberg.gutenberg_models.GutenbergBook) -> server.plugins.ome_plugin.EducationResource Translate a GutenbergBook into an OME EducationResource. .. py:method:: make_metadata_card_from_dict(doc_dict: dict) -> server.plugins.ome_plugin.EducationResource Create an EducationResource from a raw Gutendex book dict. .. py:method:: make_metadata_card_from_json(json_payload: str) -> server.plugins.ome_plugin.EducationResource Create an EducationResource from a Gutendex book JSON string. .. py:method:: make_metadata_card_from_url(url: str) -> server.plugins.ome_plugin.EducationResource Create a metadata card from a book URL. Direct URL lookup is not currently supported. Use bulk_import.py to fetch books from the Gutendex REST API. .. py:method:: make_metadata_cards_from_search_json(json_payload: str) -> list[server.plugins.ome_plugin.EducationResource] Create EducationResource cards from a Gutendex search JSON string. .. py:data:: plugin