Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Book ISBN Lookup WordPress Plugin

A WordPress plugin that automatically fetches ISBN and book details from Open Library and Google Books APIs for book review posts using Advanced Custom Fields.

Features

  • Automatic ISBN lookup: Fetches ISBN and book metadata from multiple APIs
  • Dual API support: Uses both Google Books API and Open Library for comprehensive coverage
  • Intelligent book title extraction: Automatically parses book titles and authors from post titles
  • Batch processing: Process multiple posts at once with progress tracking
  • Rate limiting: Built-in delays to respect API rate limits
  • Flexible configuration: Target specific categories for book review posts
  • Real-time progress: Live progress tracking with detailed logging
  • Error handling: Robust retry logic for API failures
  • Admin interface: User-friendly settings page with API status monitoring

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • Advanced Custom Fields (free version)

Installation

  1. Download the plugin files
  2. Upload the book-isbn-lookup folder to /wp-content/plugins/
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Create ACF field group with required fields (see Configuration below)
  5. Configure plugin settings under Settings → Book ISBN Lookup

Configuration

Required ACF Fields

Create an ACF field group for Posts with these fields:

Field Name Type Description Required
book_isbn Text Book ISBN number Yes
book_publisher Text Publisher name No
book_publication_year Number Publication year No
book_page_count Number Number of pages No

Plugin Settings

  • Target Categories: Select which post categories contain book reviews
  • API Sources: Choose between Google Books API and/or Open Library API
  • Batch Processing: Process multiple posts with configurable batch sizes

Processing Logic: The plugin processes posts that belong to selected categories and either have no ISBN field or have an empty ISBN field.

Usage

Post Title Format

For best results, format your post titles following these patterns:

Book Title by Author Name
Book Title by Author Name (2023)
Book Title by Author Name - ★★★★☆

Examples:

  • "Dune by Frank Herbert"
  • "The Great Gatsby by F. Scott Fitzgerald (1925)"
  • "1984 by George Orwell - ★★★★★ Excellent dystopian novel"

Basic Workflow

  1. Create book review posts with properly formatted titles
  2. Assign posts to configured categories (e.g., "booklog")
  3. Create ACF fields for book metadata
  4. Run batch processing from the plugin settings page
  5. Review results and manually add ISBN for any books not found

Batch Processing

The plugin provides a user-friendly batch processing interface:

  1. Navigate to Settings → Book ISBN Lookup
  2. Configure your target categories and API sources
  3. Review the eligible posts count
  4. Click "Start ISBN Lookup" to begin processing
  5. Monitor real-time progress with detailed logging
  6. Review processing results and handle any failures

API Sources

Google Books API:

  • Comprehensive book database
  • Detailed publication information
  • Good coverage of international titles

Open Library:

  • Open source book database
  • Alternative data source
  • Good for older or specialized titles

The plugin tries both APIs (if enabled) until it finds a valid ISBN for each book.

Testing

Validate your book lookups with these methods:

  • Create test posts with properly formatted titles
  • Run small batch processing tests
  • Verify ACF fields are populated correctly
  • Check API connectivity status in plugin settings

Technical Details

  • API Sources: Google Books API and Open Library (no authentication required)
  • Rate Limiting: 2-second delays between API calls
  • Batch Processing: Default batch size of 3 posts for reliability
  • Error Recovery: Automatic retry logic for failed requests
  • Data Validation: ISBN format cleaning and validation

Support

  • Documentation: See plugin settings page for detailed field requirements
  • Issues: Report bugs via GitHub issues
  • License: MIT License

Development

This plugin was created with AI assistance and follows WordPress coding standards. Contributions are welcome!

Version History

  • 1.0.0: Initial release with dual API support and batch processing

Credits

  • Author: Thomas Gerdes
  • License: MIT
  • Repository: GitHub

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors