Skip to content

feat: extract EPUB subjects for OPDS category tags - #61

Merged
dubyte merged 1 commit into
mainfrom
feat/epub-subjects
Jul 11, 2026
Merged

feat: extract EPUB subjects for OPDS category tags#61
dubyte merged 1 commit into
mainfrom
feat/epub-subjects

Conversation

@dubyte

@dubyte dubyte commented Jul 11, 2026

Copy link
Copy Markdown
Owner

What: Extract <dc:subject> tags from EPUB OPF metadata and emit as <atom:category> elements in acquisition feeds.

Why: OPDS clients that support category browsing can group books by genre/subject. Many publisher EPUBs include subject metadata.

Changes:

  • Added Subjects []string to CatalogEntry
  • Extended extractEpubMetadata() to parse <dc:subject> with namespace fallback
  • Added Category struct to opds package (Term, Label, Scheme)
  • Extended Entry struct with Categories field
  • Added AddCategory() builder method to EntryBuilder
  • makeFeed() emits <atom:category> for each subject when ExtractMetadata is enabled
  • Updated extractMetadata() return signature: 5 values

Verification:

  • All tests pass (go test ./...)
  • Clean compile

This is the third post-v1.10.0 recommendation from the improvement plan.

Extract <dc:subject> tags from EPUB OPF metadata and emit them as
<atom:category> elements in acquisition feeds. Enables genre/subject
filtering and display in OPDS clients that support categories.

Changes:
- Added Subjects []string to CatalogEntry
- Extended extractEpubMetadata() to parse <dc:subject> with namespace fallback
- Added Category struct to opds package (Term, Label, Scheme)
- Extended Entry struct with Categories field
- Added AddCategory() builder method
- makeFeed() emits <atom:category> for each subject when ExtractMetadata is on
@dubyte
dubyte force-pushed the feat/epub-subjects branch from 75168f4 to 4024682 Compare July 11, 2026 22:39
@dubyte
dubyte merged commit 917803c into main Jul 11, 2026
1 check 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