Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alliance-pcsg/primo-explore-oadoi-link

Provides link to Open Access content for articles, when available
https://github.com/alliance-pcsg/primo-explore-oadoi-link

Last synced: about 1 month ago
JSON representation

Provides link to Open Access content for articles, when available

Awesome Lists containing this project

README

        

# primo-explore-oadoi-link
Provides link to Open Access content for articles, when available. This is similar to the Unpaywall feature added in the 2019 November Primo release. Documentation explaining the differences between this customization and the Unpaywall feature can be found here:
[Unpaywall in Alma, OADOI Customization in Primo (and Other Open Access)](https://docs.google.com/document/d/1RBz7l4_KTrA7PsXFxATpyjEV-oG3siZW1QjRPxc5ebk/edit?usp=sharing)

## Features
In a full display record, checks for the presence of a DOI. Queries the [OADOI API (v2)](https://oadoi.org/api/v2), and upon the presence of an open access link, displays a bar with the link under the "View It" section.

### Screenshot
![screenshot](screenshot.png)

## Install
1. Make sure you've installed and configured [primo-explore-devenv](https://github.com/ExLibrisGroup/primo-explore-devenv).
2. Navigate to your template/central package root directory. For example:
```
cd primo-explore/custom/MY_VIEW_ID
```
3. If you do not already have a `package.json` file in this directory, create one:
```
npm init -y
```
4. Install this package:
```
npm install primo-explore-oadoi-link --save-dev
```

## Usage
Once this package is installed, add `oadoi` as a dependency for your custom module definition.

```js
var app = angular.module('viewCustom', ['oadoi'])
```

Note: If you're using the `--browserify` build option, you will need to first import the module with:

```javascript
import 'primo-explore-oadoi-link';
```

You can configure the banner by passing a configuration object. All properties are required.

| name | type | usage |
|-----------|--------------|-----------------------------------------------------------------------------------------|
| `imagePath` | string | icon for next to the image link |
| `email` | string | email address attached to api query |

The code below adds a banner similar to the above image.

```js
app.constant('oadoiOptions', {
"imagePath": "custom/LCC/img/oa_50.png",
"email": "[email protected]"
})
```