PHPackages                             abigegg/lanark - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. abigegg/lanark

ActiveLibrary[API Development](/categories/api)

abigegg/lanark
==============

Client for Glasgow Libraries data

0.1.5(5y ago)1121MITPHP

Since Nov 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ABigEgg/Lanark)[ Packagist](https://packagist.org/packages/abigegg/lanark)[ RSS](/packages/abigegg-lanark/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

Lanark
======

[](#lanark)

Lanark is a PHP library for pulling data from the Glasgow Libraries catalogue.

It uses headless Chrome to scrape the library's Arena website () and provides a (very very) simple interface to work with it programmatically.

Requirements
============

[](#requirements)

- PHP 7+
- Composer
- Chrome, installed on the server ([see the Chrome-PHP docs](https://github.com/chrome-php/headless-chromium-php))

Usage
=====

[](#usage)

Install with composer:
----------------------

[](#install-with-composer)

```
composer require abigegg/lanark

```

Get book by its ISBN
--------------------

[](#get-book-by-its-isbn)

```
use ABigEgg\Lanark;

$client = new Lanark\Client();

// grab an item by its ISBN
$book = $client->getItemByISBN('9781787300521');

var_dump( $book );

// object(Lanark\Item)#21 (5) {
//     ["title"]=>
//     string(30) "Orwell on truth, George Orwell"
//     ["author"]=>
//     string(25) "Orwell, George, 1903-1950"
//     ["isbn"]=>
//     string(13) "9781787300521"
//     ["availability_count":protected]=>
//     NULL
//     ["year"]=>
//     string(4) "2017"
//   }
```

Search for books using keywords
-------------------------------

[](#search-for-books-using-keywords)

```
use ABigEgg\Lanark;

$client = new Lanark\Client();

// search for some items by keyword
$books = $client->search('hitchhikers guide');

var_dump( $books );

// array(10) {
//     [0]=>
//         object(ABigEgg\Lanark\Item)#148 (6) {
//         ["title"]=>
//         string(51) "The hitchhiker's guide to the Galaxy, Douglas Adams"
//         ["author"]=>
//         string(26) "Adams, Douglas, 1952-2001,"
//         ["isbn"]=>
//         string(13) "9781509808311"
//         ["availability_count":protected]=>
//         NULL
//         ["year"]=>
//         string(4) "2016"
//         ["item_page_url"]=>
//         NULL
//         }
//     [1]=>
//         object(ABigEgg\Lanark\Item)#247 (6) {
//         ["title"]=>
//         string(52) "The hitch-hiker's guide to the Bible, Colin Sinclair"
//         ["author"]=>
//         string(15) "Sinclair, Colin"
//         ["isbn"]=>
//         string(13) "9781854248541"
//         ["availability_count":protected]=>
//         NULL
//         ["year"]=>
//         string(4) "2008"
//         ["item_page_url"]=>
//         NULL
//     }
// }
// ...
```

Check if a book is available to borrow (and how many copies)
------------------------------------------------------------

[](#check-if-a-book-is-available-to-borrow-and-how-many-copies)

```
use ABigEgg\Lanark;

$client = new Lanark\Client();

$book = $client->getItemByISBN("9781787300521");

var_dump( $book->getAvailability() );

// int(2)
```

Changelog
=========

[](#changelog)

\[0.1.5\] 16 Nov 2020
---------------------

[](#015-16-nov-2020)

- Add keyword search with `$client->search( 'Keywords' )`
- Pull in availability information just-in-time, to avoid unnecessary requests
- Refactoring

\[0.1.4\] 15 Nov 2020
---------------------

[](#014-15-nov-2020)

- Replace Goutte with Chrome driver, now book availability information works!

\[0.1.0\] 14 Nov 2020
---------------------

[](#010-14-nov-2020)

- Initial commit

Planned features
================

[](#planned-features)

- Search
    - Search by book title and author (keywords)
    - Search by book year of publication
    - Search by book genre
- Books
    - Show if book currently available for loan, and from which libraries
    - Get summary and thumbnail from Google Books, if available
    - (If authenticated) reserve a book to borrow it
- Borrowing
    - Authenticate with Glasgow Libraries user ID and PIN
    - Get a list of your current reservations, and when they are due back

License
=======

[](#license)

Licensed under the The MIT License

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

2100d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23729315?v=4)[davidhewitson](/maintainers/davidhewitson)[@davidhewitson](https://github.com/davidhewitson)

---

Top Contributors

[![shstkvch](https://avatars.githubusercontent.com/u/728254?v=4)](https://github.com/shstkvch "shstkvch (20 commits)")

---

Tags

bookslibrary

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abigegg-lanark/health.svg)

```
[![Health](https://phpackages.com/badges/abigegg-lanark/health.svg)](https://phpackages.com/packages/abigegg-lanark)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

313188.5k2](/packages/pimax-fb-messenger-php)[vormkracht10/laravel-open-graph-image

Laravel package to generate dynamic Open Graph images

7218.4k](/packages/vormkracht10-laravel-open-graph-image)[backstage/laravel-og-image

Laravel package to generate dynamic Open Graph images

726.6k](/packages/backstage-laravel-og-image)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
