Skip to content

Commit

Permalink
Readme and version update (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveBathnes authored Sep 18, 2022
1 parent 6e94481 commit 9534756
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Public library catalogues Node.JS Library

A Node JS library for searching UK public library catalogues. This was designed to be used in other projects such as an API, as well as a Chrome/Edge extension.
A Node JS library for searching UK public library catalogues. This was designed to be used in other projects that need to search multiple library catalogues.

## Description

In the UK there are around 200 public library services, each one with their own Library Management System and associated Online Public Access Catalogue (OPAC) - aside from some shared systems.
In the UK there are about 200 public library services, each with their own Library Management System, and associated Online Public Access Catalogue (OPAC) - aside from some that share systems.

Despite being so many authorities, there are relatively few types of library systems, and fewer suppliers. This project aims to define the interactions with each type of web catalogue in order to automate some common processes. Such as searching for a book.
Despite so many, there are relatively few types of library systems, and fewer suppliers. This project aims to define the interactions with each type of web catalogue in order to automate common processes. Such as searching for a book.

This will provide data aggregation opportunities such as being able to query the whole UK for the availability of a particular book. Or it could provide functionality to manage a user's account across all their library accounts, such as automating book renewals.

## Library service Data

A list of UK public library authorities is included in the **data.json** file. This has the library authority name and the **type** of library service, along with specific data required to search that service e.g. the web URL.

It includes the ONS authority code for each authority. This allows it to be combined with other datasets about that authority that may be published elsewhere.
It includes the GSS code for each authority. This allows it to be combined with other datasets that may be published elsewhere.

For example:

| Name | Code | Type | URL |
| ---- | ---- | ---- | --- | -------- |
| ---- | ---- | ---- | --- |
| Aberdeen City | S12000033 | spydus | https://aberdeencity.spydus.co.uk/ |

## Build
Expand All @@ -32,31 +32,29 @@ npm install

## Tests

Run these using Jest. For each library service, five ISBNs are defined in `tests.json`. The tests require only one
ISBN lookup to be successful (since books can drop out of circulation and we don't want automated tests to fail frequently
for non-functional reasons).
Run these using Jest. For each library service, five ISBNs are defined in `tests.json`. The tests require only one ISBN lookup to be successful (since books can drop out of circulation and we don't want automated tests to fail frequently for non-functional reasons).

## Usage

The project implements the following methods

| Method | Description |
| ------- | ----------- |
| ------ | ----------- |
| Services | Returns stored data about library services (authorities). |
| Libraries | Returns branch/location information, taken from the online catalogue. |
| Availability | Returns availability of a particular book. |

### Services

Returns selected contents of the data.json file for each service. This can be useful if a developer wished to create an interface that first listed the library authorities to be used in a search filter.
Returns selected contents of the data.json file for each service. This can be useful if a developer wished to create an interface that listed the library authorities in a filter.

| Method | Description |
| ------ | ----------- |
| .services(serviceFilter) | Returns a list of library authorities. The service filter filters by name or code and is optional. |

### Libraries

Returns a list of the library service points in each library service. This may include mobile libraries, and different locations within individual library buildings.
Returns a list of the library service points in each library service. This may include mobile libraries, and different locations within individual buildings.

| Method | Description |
| ------ | ----------- |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "catalogues-library",
"version": "1.2.0",
"description": "A library for searching library catalogues",
"version": "1.2.1",
"description": "A JS library for searching library catalogues",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server --open --mode development",
Expand Down

0 comments on commit 9534756

Please sign in to comment.