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

https://github.com/dataesr/harvest-sudoc

Harvesting the sudoc
https://github.com/dataesr/harvest-sudoc

Last synced: 5 months ago
JSON representation

Harvesting the sudoc

Awesome Lists containing this project

README

          

# harvest-sudoc
Harvesting the sudoc

## How to use it ?

1. Clone the repo

`git clone https://github.com/dataesr/harvest-sudoc.git`

2. Enter the repo

`cd harvest-sudoc`

3. Build the docker image

`make docker-build`

4. Start docker image

`make start`

5. Start the harvesting

`curl -X POST -H 'Content-Type: application/json' -d '{"id_refs": ["02825354X", "242241344", "183975154", "059389451"]}' 'http://localhost:5004/harvest'`

## API

| endpoint | method | args | description |
| -------- | ------ | -------- | ----------- |
| harvest | POST | id_refs [str, list]
force_download [bool] | This endpoint will download in ObjectStorage all the sudoc notices for the given id_refs given.
If `force_download` is set to `True`, the notice will be downloaded even if already in DB. |
| harvest_notices | POST | sudoc_ids [str, list]
force_download [bool] | This endpoint will download in ObjectStorage all the sudoc notices
If `force_download` is set to `True`, the notice will be downloaded even if already in DB. |

## Release
To create a new release:
```shell
make release VERSION=X.X.X
```