<commit_before>RepositoryLinter
================

An entry to the [Repositories Fringe 14](http://www.repositoryfringe.org/) Developer Challenge by [<NAME>](https://github.com/cziaarm), [<NAME>](https://github.com/mudge) and [<NAME>](https://github.com/rwincewicz).

This is a small API that, given article metadata in the form of ePrints JSON,
will consult various different services (see below) to pull as much missing
data as possible.

## APIs used

* [CrossRef](http://search.crossref.org/help/api);
* [SHERPA/RoMEO](http://www.sherpa.ac.uk/romeo/api.html);
* [Gateway to Research](http://gtr.rcuk.ac.uk/resources/api.html).<commit_msg>Add usage to the README.<commit_after>RepositoryLinter
================

An entry to the [Repositories Fringe 14](http://www.repositoryfringe.org/) Developer Challenge by [<NAME>](https://github.com/cziaarm), [<NAME>](https://github.com/mudge) and [<NAME>](https://github.com/rwincewicz).

This is a small API that, given article metadata in the form of ePrints JSON,
will consult various different services (see below) to pull as much missing
data as possible.

## Usage

Post your article metadata as JSON to `/validate` to receive metadata in return:

```console
$ curl localhost:4567/validate -d '{ "title": "Revisiting the River Skerne: the long-term social benefits of river rehabilitation" }'
```

Will return:

```javascript
{
  "errors": [
    "Publisher field is missing",
    "ISSN field is missing",
    "Publication field is missing",
    "DOI field is missing",
    "Funders field is missing",
    "Creators field is missing"
  ],
  "dois": [
    {
      "title": "Revisiting the River Skerne: The long-term social benefits of river rehabilitation",
      "doi": "http://dx.doi.org/10.1016/j.landurbplan.2013.01.009"
    }
  ]
}
```

## APIs used

* [CrossRef](http://search.crossref.org/help/api);
* [SHERPA/RoMEO](http://www.sherpa.ac.uk/romeo/api.html);
* [Gateway to Research](http://gtr.rcuk.ac.uk/resources/api.html).
{'fraction_non_alphanumeric': 0.16279069767441862, 'fraction_numerical': 0.011627906976744186, 'mean_word_length': 4.31989247311828, 'pattern_counts': {'":': 5, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5023183', 'n_tokens_mistral': 668, 'n_tokens_neox': 628, 'n_words': 180}