Giter Club home page Giter Club logo

doi's Introduction

DOI Content Negotiation Scripts

Some experiments with CrossRef's DOI Content Negotiation API to generate citation data. The code is kind of ragged, but it works.

The basic idea here is to send a DOI URI GET to CrossRef using CURL. Depending on the content type sent in the GET request, the DOI resolver at dx.doi.org can be instructed to send bibliographic data by redirecting the request to a metadata service hosted by the DOI's registration agency, CrossRef and DataCite.

doi_citation.php

This script pulls bibliographic data from the DOI resolver formatted as JSON, which is then stored in a PHP array, and then formatted in a couple of different citation styles, which I puzzled out myself. At this point, I hadn't figured out that I could use CSL and save myself work.

doi_coins.php

Basically a riff on the doi_citation script, but outputs COinS rather than formatted citations. Like all of these scripts so far, only good for generating OpenURL context objects for journal articles.

doi_csl.php

After I wrote the doi_citation script, I learned that you could query the DOI resolver with a different content type request that it output a citation style following Citation Style Language style rules. The output is plain text (so may be missing required bolding and emphasis for some styles), but it saves a lot of time and scales better than writing the rules yourself.

doi's People

Contributors

tomkeays avatar

Watchers

 avatar  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.