Git Product home page Git Product logo

rdmo-plugins-gnd's Introduction

rdmo-plugins-gnd

This plugin implements dynamic option set, that queries the API for the Gemeinsame Normdatei at https://lobid.org/gnd.

If you intend to use the API, please follow it's usage policy.

Setup

Install the plugin in your RDMO virtual environment using pip (directly from GitHub):

pip install git+https://github.com/rdmorganiser/rdmo-plugins-gnd

Add the rdmo_gnd app to INSTALLED_APPS and the plugin to OPTIONSET_PROVIDERS in config/settings/local.py:

INSTALLED_APPS += ['rdmo_gnd']

...

OPTIONSET_PROVIDERS += [
    ('gnd', _('GND Provider'), 'rdmo_gnd.providers.GNDProvider')
]

The option set provider should now be selectable for option sets in your RDMO installation. For a minimal example catalog, see the files in xml.

If a selection of a GND identifier should update other fields, you can add a GND_PROVIDER_MAP in your settings, e.g.:

GND_PROVIDER_MAP = [
    {
        'gndIdentifier': 'https://rdmorganiser.github.io/terms/domain/project/coordination/gnd',
        'preferredName': 'https://rdmorganiser.github.io/terms/domain/project/coordination/name'
    }
]

In this case, a change to the identifier of a coordinator (https://rdmorganiser.github.io/terms/domain/project/coordination/gnd) will update their name (https://rdmorganiser.github.io/terms/domain/project/coordination/name) automatically. The value will be taken from the preferredName field of the response from the API for the selected gndIdentifier. GND_PROVIDER_MAP is a list of mappings, since multiple GND identifiers could be used and should update different other values.

lobid's policy asks to add a custom User-Agent to your requests so that they can perform statistical analyses and, if you add an email address, might contact you. This can be done by adding the following to your settings.

GND_PROVIDER_HEADERS = {
    'User-Agent': 'Mein Projekt; mailto:[email protected]'
}

rdmo-plugins-gnd's People

Contributors

jochenklar avatar

Watchers

 avatar Olaf Michaelis avatar David Wallace avatar  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.