# Open Metadata Exchange plugins An OME plugin defines how to import and publish metadata from an Open Education Resources system. `ome_plugin.py` provides the base class that each plugin should inherit from. Each OME plugin must define one or more: * `mimetypes` so that its json data can be stored as enclosures in InterNetNews (INN) articles. * `newsgroups` so its metadata can be published to and subscribed from those INN newsgroups. Each OME plugin should be composed of at least three code files. * `plugin.py`: Defines `mimetypes`, `newsgroups`, and a `make_metadata_card()` function that translates the Open Education Resources system's data into an OME EducationalResource. * `models.py`: generated by Pydantic tools to make it fast and reliable to import metadata. * Perhaps`bulk_import.py`: Utilities to convert data directly from APIs into OME EducationalResources. `server/get_ome_plugins.py` enables inspecting all plugins to access `mimetypes`, `newsgroups`, or methods. > [!NOTE] > * Education Resources Information Center (ERIC) is currently the most advanced plugin so it is the one to study and innovate on. > * Open Library is an example of dealing linked metadata where one API call accesses a Work (e.g. book) and a second API call is required to access linked metadata about that Work's Authors. Perhaps `bulk_import.py` can be merged into the `plugin.py` file in the future but for now innovation can be faster if they are separate files. `models.py` is mostly generated by Pydantic tools but the prefix and suffix code is useful documentation and allows single file testing to ensure all is working smoothly. This facilitates rapid debugging if source data models change. https://iskme.github.io/Open-Metadata-Exchange/autoapi/eric/plugin ```tree server/plugins ├── ome_plugin.py ├── README.md (this document) ├── eric │   ├── bulk_import.py │   ├── eric_models.py │   ├── plugin.py ├── oercommons │   ├── oercommons_models.py │   └── plugin.py ├── openlibrary │   ├── openlibrary_authors_models.py │   ├── openlibrary_work_models.py │   └── plugin.py └── whg ├── plugin.py ├── whg_models.py ```