npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

catalogues-library

v1.2.5

Published

A JS library for searching library catalogues

Downloads

7

Readme

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 that need to search multiple library catalogues.

Description

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

The project uses Node Package Manager (NPM) for package management. On downloading a copy of the project the required dependencies should be installed. Assuming Node is already installed, to build:

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

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

| Method | Description | | ------ | ----------- | | .libraries(serviceFilter) | Returns a list of libraries for each service. The service filter filters by name or code and is optional. |

Availability

Returns data showing the number of available/unavailable copies of the relevant title in each library service point, for each library service.

| Method | Description | | ------ | ----------- | | .availability(isbn, serviceFilter) | Retrieves availability of a particular title by passing in ISBN. The service filter filters by name or code and is optional. |

Licence

Original code licensed with MIT Licence.