feat: extract EPUB subjects for OPDS category tags - #61
Merged
Conversation
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
force-pushed
the
feat/epub-subjects
branch
from
July 11, 2026 22:39
75168f4 to
4024682
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Subjects []stringtoCatalogEntryextractEpubMetadata()to parse<dc:subject>with namespace fallbackCategorystruct toopdspackage (Term, Label, Scheme)Entrystruct withCategoriesfieldAddCategory()builder method toEntryBuildermakeFeed()emits<atom:category>for each subject whenExtractMetadatais enabledextractMetadata()return signature: 5 valuesVerification:
go test ./...)This is the third post-v1.10.0 recommendation from the improvement plan.