2017 © Pedro Peláez
 

library bookscanner

Scan the barcode on a book, get back data on the book based on ISBN

image

imonroe/bookscanner

Scan the barcode on a book, get back data on the book based on ISBN

  • Thursday, August 24, 2017
  • by imonroe
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 50 % Grown

The README.md

bookscanner

Latest Version on Packagist ![Software License][ico-license] Total Downloads, (*1)

Give Bookscanner a barcode or ISBN number, look it up via the OpenLibrary api (http://openlibrary.org/), and then return you a nice PHP array with relevant details., (*2)

Works with 10-digit or 13-digit ISBNs. It will happily take input from a text field that has been populated by a standard handheld barcode scanner. It will clean it up a little, validate the ISBN with its checksum, and then send a request to the excellent OpenLibrary API via cURL. It will parse the response, and it will return you a PHP array with all the available information., (*3)

For fields with more that one element, e.g., a book with several authors, the field will be returned as a comma-separated string., (*4)

Install

Via Composer, (*5)

``` bash $ composer require imonroe/bookscanner, (*6)


## Usage ``` php $isbn_data = imonroe\bookscanner\Bookscanner::get_isbn_data($isbn_string); // from a text input, presumably a scanned barcode $isbn = $isbn_data['isbn']; // formatted ISBN number $info_url = $isbn_data['info_url']; // OpenLibrary URL to information page $title = $isbn_data['title']; // The title of the work $subjects = $isbn_data['subjects']; // A string of subjects, separated by commas $publisher = $isbn_data['publisher']; // The publisher of the work $author = $isbn_data['author']; // The author. If there are multiple, this will be a comma-delimited string $publication_date = $isbn_data['publication_date']; // The date the work was published $number_of_pages =$isbn_data['number_of_pages']; // Number of pages $physical_format =$isbn_data['physical_format']; // A string describing the physical format $thumbnail_url = $isbn_data['thumbnail_url']; // A URL to OpenLibrary's cover thumbnail.

Change log

Please see CHANGELOG for more information on what has changed recently., (*7)

Testing

bash $ composer test, (*8)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*9)

Security

If you discover any security related issues, please email ian@ianmonroe.com instead of using the issue tracker., (*10)

Credits

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

24/08 2017

dev-master

9999999-dev https://github.com/imonroe/bookscanner

Scan the barcode on a book, get back data on the book based on ISBN

  Sources   Download

MIT

The Requires

 

The Development Requires

barcode isbn imonroe bookscanner

24/08 2017

1.0.2

1.0.2.0 https://github.com/imonroe/bookscanner

Scan the barcode on a book, get back data on the book based on ISBN

  Sources   Download

MIT

The Requires

 

The Development Requires

barcode isbn imonroe bookscanner

25/07 2017

1.0.1

1.0.1.0 https://github.com/imonroe/bookscanner

Scan the barcode on a book, get back data on the book based on ISBN

  Sources   Download

MIT

The Requires

 

The Development Requires

barcode isbn imonroe bookscanner

25/07 2017

1.0.0

1.0.0.0 https://github.com/imonroe/bookscanner

Scan the barcode on a book, get back data on the book based on ISBN

  Sources   Download

MIT

The Requires

 

The Development Requires

barcode isbn imonroe bookscanner