Coder Social home page Coder Social logo

librarieshacked / catalogues-api Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 3.0 49.05 MB

API and front-end for searching all the UK public library catalogues for ISBN results

Home Page: https://www.librarybooks.uk

License: MIT License

JavaScript 46.56% CSS 3.80% Pug 49.64%
books catalogue javascript library-catalogue library-database librarydata-uk node-js nodejs public-libraries

catalogues-api's Introduction

Libraries Hacked

Public website for Libraries Hacked. Built using a Jekyll theme and GitHub pages

Deployment

Deployed using GitHub pages. GitHub will automatically deploy and build the site when any changes occur on the main branch.

Built With

  • Jekyll - The web framework used for creating static sites
  • Alembic - Remote Jekyll theme

Authors

Licence

This website uses Alembic theme, which is published under the MIT Licence. If using the theme, please attribute the author and maybe buy them a coffee.

Any content in the website is published under a Creative Commons Attribution 4.0 Licence.

Acknowledgments

catalogues-api's People

Contributors

davebathnes avatar dependabot[bot] avatar shstkvch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

catalogues-api's Issues

Make postcode almost mandatory

While a search should be able to be completed without a postcode, it would be good to encourage the use of postcode more as it is less intensive to complete the search,

Add carbon calculator badge

The carbon calculator badge provides a good view of the indicative carbon involved in downloading the webpage.

It also promotes a view of websites having a carbon impact.

Fix bogus results

When searching for an ISBN that has no results it repeatedly returns 3 results from Merton libraries, and 1 from South Ayrshire libraries.

Roadmap for this project?

Hi there

I stumbled across this project while building a scraper to grab books from my local library's Arena web interface.

My intention is to build a better web UI for UK libraries. I'm wondering what your future plans are for this project, and if you're looking for any contributions? It would be great to have a one-stop API for UK library data

Add OpenAPI endpoint

For documentation and testing purposes it would be great to have the default api endpoint (/api) return the OpenAPI interface showing how the API can be used.

Availability being returned as string

In some cases it looks like availability is being returned as a string (e.g. "1") and is breaking the display that sums up how many copies have been found by appending to a string rather than adding up.

Provide feedback while searching

During a search we need to provide:

  • A searching indicator
  • Details of the services that have been searched
  • An indication of how long is required to wait

Add postcode search

When someone enters their postcode the tool should:

  1. Validate the postcode and find coordinates
  2. Get the services in order of proximity
  3. Search 5 services for the items
  4. Search further services if no available copies found

Add keyword search

An option instead of entering an ISBN manually should be to search for a title by keyword (including author results).

When selecting a title, the ISBN field will then be populated.

This should be done in a new dialog window to avoid cluttering the current interface.

Is there any way to pre-fill the ISBN on the website?

I post book reviews on my blog, and would like to encourage people to borrow those books from the local library. But I don't know where my readers live.

Would it be possible to use a link like https://www.librarybooks.uk/?isbn=123456789 to pre-fill the ISBN on the website, so users only have to enter their postcode?

Fix the front end web page

Although this project is mainly an API it does have code to generate a single web page to allow for testing of the ISBN search.

This needs to be fixed. The API could also do with being put in a subdirectory to make a clearer separation - e.g. /api.

A further ticket will provide an OpenAPI documentation page for the API endpoints.

Bug: Running server crashes with error 'Error: Cannot find module './connectors/viewpoint2''

david@Davids-iMac catalogues-api % node server.js
library thing connector loading...
open library connector loading...
spydus connector loading...
enterprise connector loading...
vubis connector loading
prism3 connector loading...
iguana connector loading...
ibistro connector loading...
koha connector loading...
internal/modules/cjs/loader.js:896
  throw err;
  ^

Error: Cannot find module './connectors/viewpoint2'

It seems the issue is the library data JSON file is out of date and references a connector that no longer exists. There is a connector called viewpoint3 however

Add clear search functionality

Once a search has been performed there should be an option to clear the search and return the view to the state it was previously.

Any previous postcode should be persisted as this could be useful to the user.

Results not showing

The table render method is failing which is again causing results to not show once a search has been completed.

Refine result buttons

Refine the result views so that the buttons look a bit better.

The results should also be ordered so that the libraries with copies appear at the top.

Update packages and setup

First update is to get packages updated, a small refresh on the website setup (this won't be largely used), and config put in place to integrate with the library data database (though this isn't created yet).

The database will provide access to the catalogues information, as well as a book ISBN lookup,

Add common handle error back in

A lot of functions use a common function called handleErrors. This was removed at the start fo the refactor process but should be added back in.

Iguana returning related title information

In some cases when searching for an item that isn't in stock a related title is shown.

It appears that we are then showing availability for this title, rather than an empty array.

Example: 9781787535213

Refactor code

This code needs to be working again in order to tackle issues.

  • Refactor to update to async and await
  • Remove all unnecessary connectors
  • Test to ensure all connectors are working (not necessarily all lib services)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.