Skip to content

Feat/douban book subject#993

Open
warkcod wants to merge 2 commits intojackwener:mainfrom
warkcod:feat/douban-book-subject
Open

Feat/douban book subject#993
warkcod wants to merge 2 commits intojackwener:mainfrom
warkcod:feat/douban-book-subject

Conversation

@warkcod
Copy link
Copy Markdown
Contributor

@warkcod warkcod commented Apr 13, 2026

Description

Extend the existing Douban adapter to support book subject details and make douban search --type book reliable enough for metadata enrichment workflows.

This PR includes:

  • support for opencli douban subject <id> --type book
  • normalized book metadata fields from book.douban.com
  • fixes for opencli douban search --type book
  • adapter tests, browser e2e coverage, and Douban docs updates

Related issue:

  • N/A

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ␌ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

  • Added doc page under docs/adapters/ (if new adapter)
  • Updated docs/adapters/index.md table (if new adapter)
  • Updated sidebar in docs/.vitepress/config.mts (if new adapter)
  • Updated README.md / README.zh-CN.md when command discoverability changed
  • Used positional args for the command's primary subject unless a named flag is clearly better
  • Normalized expected adapter failures to CliError subclasses instead of raw Error

Screenshots / Output

Example commands

opencli douban search --type book "三体" -f json
opencli douban subject 2567698 --type book -f json

### Verification

npm run test
OPENCLI_E2E=1 npx vitest run --project e2e tests/e2e/douban.test.ts
npm run build

### Result summary

- npm run test: passed
- OPENCLI_E2E=1 npx vitest run --project e2e tests/e2e/douban.test.ts: passed
- npm run build: passed

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