A desktop application built with PyQt5 that automatically determines whether a book should be processed as a check-in or a non-loan return in OCLC's WorldShare Management Services (WMS).
Problem: When checking in books in OCLC WMS, staff must manually determine if a book is currently checked out (requiring check-in) or not checked out (requiring non-loan return). This manual verification is time-consuming and prone to errors. OCLC needs to fix this.
Solution: This application automatically:
- Scans the book's barcode
- Queries OCLC's APIs to determine the book's current status
- Automatically processes it as either a check-in or non-loan return
- Displays the results in a clear, easy-to-read table
- Automatic Status Detection: Intelligently determines whether a book needs check-in or non-loan return
- Barcode Scanning: Quick check-in process using barcode scanning or manual entry
- Real-time Status Updates: Instantly view the status of each scanned book
- Detailed Information Display: Shows title, author, call number, and current status
- Error Handling: Clear visual indicators for any issues during the check-in process
- Activity Logging: Comprehensive logging system for troubleshooting
- Modern UI: Clean, intuitive interface with responsive design
- Windows 10 or later
- OCLC WorldShare API credentials (WSKey)
- Internet connection
Before using this application, you'll need to request an API key from OCLC:
- Visit OCLC Developer Network
- Click "Request A WSKey"
- Select "Request a Custom Key"
- Fill in the following details:
- Type of Request: Production
- Application Type: Machine-to-Machine (M2M) App
- Required Services:
- WMS Circulation API
- WMS Availability
- WorldCat Discovery API
- WMS NCIP Service
- WSKey Name: Self-Checkin
- Reason for Request: "Automatically determine if a book is a non-loan return or a currently checked-out book and properly route it."
- Complete the request and wait for OCLC's approval
- Download the latest release from the Releases page
- Extract the ZIP file to your desired location
- Create a
config.json
file in the same directory as the executable (next toBook Check-In Service.exe
) with your OCLC credentials:
{
"wskey": "your_wskey",
"secret": "your_secret",
"scope": "WMS_CIRCULATION WMS_Availability WorldCatDiscoveryAPI WMS_NCIP",
"institution_id": "your_institution_id",
"registry_id": "your_registry_id",
"discovery_api_url": "https://discovery.api.oclc.org/worldcat-org-ci",
"ncip_api_url": "https://circ.sd00.worldcat.org/ncip",
"oauth_server_token": "https://oauth.oclc.org/token"
}
Configuration Notes:
- The
config.json
file must be placed in the same directory as the executable - You can modify this file without rebuilding the application
- If no external config file is found, the application will not work
wskey
: Your Client ID from WSKey Management https://platform.worldcat.org/wskey/secret
: Your Secret from WSKey Management https://platform.worldcat.org/wskey/scope
: Leave as is - these are the required API scopesinstitution_id
: The number beside your institution name on the main page at https://worldcat.org/config/registry_id
: Your Branch Registry ID. Found at https://worldcat.org/config/ under: WorldCat Discovery and WorldCat Local > Holding Codes & Shelving Location Messages > Holding Codes Translation Tablediscovery_api_url
: Leave as is - this is the standard discovery API endpointncip_api_url
: This varies depending on where your info is hosted. Options:- Try the default value shown above
- Contact OCLC Help for your specific endpoint
- See https://developer.api.oclc.org/wms-ncip-staff for more information
oauth_server_token
: Leave as is - this is the standard OAuth endpoint
- Run
Book Check-In Service.exe
If you want to build the application from source:
git clone https://github.com/yourusername/library-checkin.git
cd library-checkin
- Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- Build with PyInstaller:
pyinstaller --onefile --noconsole --add-data "config.json;." --add-data "app_icon.ico;." --add-data "barcode_icon.png;." --icon="app_icon.ico" --name "Book Check-In Service" checkin.py
The executable will be created in the dist
directory.
- Launch the application
- Scan book barcodes or enter them manually
- The system will automatically:
- Look up the OCLC number
- Check item availability
- Process the check-in
- Display results in the table
- Review the results table for any errors or special handling requirements
The application maintains logs at:
- Windows:
C:\Users\<username>\.library_checkin\library_checkin.log
Logs are rotated daily and kept for 14 days.
Common issues and solutions:
- Configuration Error: Ensure
config.json
is in the same directory as the executable - API Connection Failed: Verify internet connection and API credentials
- Barcode Not Found: Confirm the barcode is registered in your OCLC system
The application is built using:
- Python 3.x
- PyQt5 for the GUI
- OCLC WorldShare APIs for library operations
- Requests library for API communication
MIT License
Copyright (c) 2025 Library Book Check-In System
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For support, please create an issue or contact your system administrator.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request