Skip to content

Add optional Aladin discovery for Korean editions - #65

Draft
studphc wants to merge 3 commits into
Billiam:mainfrom
studphc:agent/aladin-korean-search
Draft

studphc wants to merge 3 commits into
Billiam:mainfrom
studphc:agent/aladin-korean-search

Conversation

@studphc

@studphc studphc commented Jul 31, 2026 •

Copy link
Copy Markdown

Background

Hardcover search does not reliably surface Korean translations when EPUB metadata contains localized titles, contributor roles, or no usable ISBN. PR #64 adds conservative Korean metadata normalization and similarity checks; this stacked draft builds on that work by using Aladin as an optional Korean discovery source.

The reading service remains Hardcover. Aladin is used only to discover Korean editions and their ISBNs.

Changes

  • add an Aladin OpenAPI client for Korean title and author discovery
  • search Aladin ebooks before print books
  • validate Aladin ISBN-10/13 values and resolve them to Hardcover editions in one batched GraphQL query
  • preserve Aladin result order while showing only exact Hardcover ISBN matches
  • retry automatic Korean discovery with the normalized title alone when title + author returns no linkable Hardcover edition
  • display the localized Aladin edition title while preserving the resolved Hardcover book and edition identity
  • route manual Korean searches through the same Aladin path
  • add a password-masked Aladin TTB key field under the Hardcover settings menu, with hardcover_config.lua fallback support
  • label Aladin-sourced results and document attribution, configuration, API limits, and catalog limitations
  • keep non-Korean searches unchanged and retain the existing Korean Hardcover fallback when no TTB key is configured
  • bump the plugin version to 0.5.1

This intentionally does not create public Hardcover books or editions automatically. An Aladin result is linkable only when its exact ISBN already exists in Hardcover, avoiding duplicate works and incorrect translation-to-work associations.

Validation

  • busted: 64 successes, 0 failures
  • luac -p: all Lua files passed
  • reproduced with the Korean EPUB metadata 이기적 유전자 / 리처드 도킨스, which has no ISBN:
    • automatic title + author lookup can fall back to title-only discovery
    • Aladin Korean ebook ISBN 9788932421278 resolves to Hardcover edition 33126560
    • Aladin current print ISBN 9788932473901 resolves to Hardcover edition 33126561
    • the plugin result is labeled 이기적 유전자 instead of the work-level title The Selfish Gene
  • live Aladin + Hardcover API verification for 만들어진 신 by Richard Dawkins / 이한음:
    • Aladin ebook ISBN: 9788934972631
    • resolved Hardcover edition: 33126542
    • resolved work: The God Delusion (382874)
  • additional live ISBN-resolution checks for 소년이 온다, 채식주의자, 작별하지 않는다, 아몬드, and 불편한 편의점
  • confirmed that neither the Aladin TTB key nor the Hardcover token is present in the repository or release archive

Risks / review notes

  • This draft depends on Improve Korean metadata search and automatic book matching #64 and should be reviewed after that PR.
  • A Korean search normally makes up to two Aladin requests (ebook and print); the title-only retry can repeat those requests only when the first query produces no linkable Hardcover edition.
  • The basic Aladin API limit is currently 5,000 requests per day.
  • The TTB key is stored locally in KOReader settings or the existing private config file and is never logged or committed.
  • Maintainers may prefer to adjust the version number when scheduling a release.

@studphc studphc closed this Jul 31, 2026
@studphc
studphc deleted the agent/aladin-korean-search branch July 31, 2026 05:57
@studphc studphc reopened this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant