gjerdery / WMS-Labeling

Custom application to add label printing capabilities to OCLC's WMS system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WMS-Labeling

Custom application to add label printing capabilities to OCLC's WMS system. This application is powered by PHP, HTML, and JavaScript. It is entirely self-contained in one folder and can be installed on an existing web server or a new one.

Some core functionality provided in the quicklabels.php file was provided by David Cunningham, University of New Brunswick Libraries

Screenshot

Request a WSKey

This web application uses a WSKey from OCLC in order to authenticate your connection. Read about how to request a WSKey here.

On the "Request a WSKey" page, here are the settings you need to utilize this application:

  • Environment: Production
  • Select Application Type Machine-to-Machine (M2M) App
  • Services: Check "WMS Collection Management API" and "WorldCat Search API"
  • What is the reason for this request? To use the University of New Mexico's custom labeling application
  • Redirect URI: Leave blank

Installation

NOTE: The latest version of the code requires PHP 5.6. Older versions of PHP are no longer support per [http://php.net/supported-versions.php]

Clone this repository into your web directory ("git clone {url} labeling") or download directly from GitHub.

Change into the labeling directory

Run composer install from the command line

Copy config/config.php.template to config/config.php. Open config/config.php and add your OCLC WSKey credentials. Set your base_url to match your folder or leave blank if your site will be the root folder.

Copy config/crosswalks.php.example to config/crosswalks.php. Open config/crosswalks.php to map shelving locations to desired call number prefixes (e.g., Reference should print as REF on your label).

Copy scripts/laser.config.sample.php to any scripts/{name}.config.php (Default: laser.config.php). Edit desired margins/spacing and settings for your label printer stock. Note: If you add label style files aside from laser.config.php, you will need to add extra radio inputs in inc/fetch_labels.php. Search for <div class="print-area"> and add to the inputs below it.

Upgrading

If you are upgrading from a version earlier than 3.0 please contact OCLC Developer Network to ensure a default user associated with the WSKey you are using for this application.

Setup

config.php

After you get your WSKey, you'll need to go back to WSKey Management, browse to "WsKey" on the left sidebar, and click on your listed WSKey to display all your information. This page will contain all the information you need for config.php.

crosswalks.php

The crosswalks array is utilized in order to take various codes/wording from WMS and translate them to building locations and other specifics.

laser.config.php

Edit this file to create the layout of your label stock. We used a ruler with millimeters to measure the layout of our label sheets. This config file will most likely need many test prints and tweaks before you get it right.

Printing

Print/edit a single label

Launch yoursite.com/labeling and scan in a barcode and indicate whether a pocket label is desired. Click the "Make Labels" button.

In the preview screen, click anywhere on the call number to edit it if needed. Make your changes and click OK.

Editing

Select "Laser Printer" or any other config that you've added. Click "Print Labels". A PDF will be generated. Press Ctrl + P to send the PDF to your printer.

Print labels in a batch

After scanning a barcode, hit Enter on your keyboard, or press "Add More" button at the bottom of the screen to add multiple barcodes. The maximum labels per page is set in the config/{name}.config.php file.

About

Custom application to add label printing capabilities to OCLC's WMS system.

License:MIT License


Languages

Language:PHP 44.6%Language:CSS 29.3%Language:HTML 16.2%Language:JavaScript 9.4%Language:Hack 0.5%