Coder Social home page Coder Social logo

kuha's Introduction

We're concentrating on Kuha2 nowdays, see https://bitbucket.org/tietoarkisto/workspace/projects/KUH

Kuha OAI-PMH Server

Kuha is a lightweight OAI-PMH Data Provider implementation. It is written in Python with The Pyramid Web Framework.

Features

  • All six OAI-PMH verbs
  • Support for many optional features, including
    • Deleted records
    • Resumption tokens
    • Set hierarchies
  • DDI Codebook to Dublin Core crosswalk

Installation

Set up a virtual environment (recommended).

$ virtualenv env
$ . env/bin/activate

Install the package and dependencies.

$ python setup.py install

Make a copy of the example configuration file and customize it. The available settings are documented in the example file.

$ cp example.ini my_config.ini
$ vim my_config.ini

Kuha comes with a simple module for converting DDI Codebook files to unqualified Dublin Core. You can configure Kuha to use this module by settings the metadata_provider_class option to kuha.importer.ddi_file_provider:DdiFileProvider. The module needs two arguments: a domain name for the OAI identifier and a path of the directory to scan. Set these in the metadata_provider_args setting.

Example:

# my_config.ini

metadata_provider_class =
   kuha.importer.ddi_file_provider:DdiFileProvider

metadata_provider_args =
   my.organization.org
   /srv/metadata

# ...

See Extending for help on writing your own metadata provider.

Usage

Run the metadata import.

$ kuha_import my_config.ini

Start the OAI-PMH serverk

$ pserve my_config.ini

With the example configuration, you can get the identify page at http://127.0.0.1:6543/oai?verb=Identify.

Extending

For most applications, a custom metadata provider is needed. Metadata provider classes should implement an interface similar to kuha.importer.skeleton_provider:SkeletonProvider and kuha.importer.ddi_file_provider:DdiFileProvider. See comments in those files for details.

To make Kuha use your custom metadata provider, set the metadata_provider_class setting to the Python name of the class (e.g. name.of.the.module:NameOfTheClass). The value of the metadata_provider_args setting is split at whitespace and the resulting parts are passed to the constructor of the class.

kuha's People

Contributors

aryla avatar matti-heinonen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.