BenediktHeinrichs / metadataextractor

Extracting metadata from research data and providing it in an interoperable format.
https://metadataextractor.otc.coscine.dev/
MIT License
2 stars 1 forks source link
extraction metadata rdf

MetadataExtractor

MetadataExtractor is a web service built on Flask for extracting metadata as RDF triples from various file types. This service utilizes a REST API for receiving files and returning metadata in multiple formats.

Requirements

Installation

To install MetadataExtractor, follow these steps:

  1. Clone the repository:

    git clone https://github.com/BenediktHeinrichs/MetadataExtractor.git
    cd MetadataExtractor
  2. Run the installDependencies.sh script to install required dependencies & Python packages (Linux):

    ./installDependencies.sh
  3. If you have Docker installed, you can build and run the service using the provided Dockerfile.

Running the Service

To start the service:

  1. Using Python directly:

    python server.py
  2. Using Docker:

    • Build the Docker image:
      docker build -t metadataextractor .
    • Run the Docker container:
      docker run -p 36541:36541 metadataextractor

Configuration

Version

Current API version is defined by the __version__ attribute within the MetadataExtractor module.

Usage

The service exposes several endpoints:

POST /

GET /defaultConfig

GET /version

API Response Models

The server uses defined response models to structure the JSON response. This includes the MetadataOutput model for the main endpoint and the Version model for the version endpoint.

Contributing

Contributions are welcome, check out the Contribution guidelines! Please feel free to submit a pull request.

Linting & Fixing

pip install ruff
ruff --fix .
ruff format .

Development

Open in Gitpod