feat: extract EPUB series metadata for OPDS feeds - #60
Merged
Conversation
Extract calibre:series and calibre:series_index from EPUB OPF <meta> tags and emit them as <dc:series> and <dc:seriesPosition> in acquisition feeds. Enables reading order views in OPDS clients that support series metadata. Changes: - Added Series and SeriesIndex fields to CatalogEntry - Extended extractEpubMetadata() to parse <meta> tags with namespace fallback - Extended Entry struct with DcSeries and DcSeriesPosition XML fields - Added Series() and SeriesPosition() builder methods - Updated makeFeed() to emit series metadata when ExtractMetadata is on - Updated extractMetadata() return signature to 6 values
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
calibre:seriesandcalibre:series_indexfrom EPUB OPF metadata and emit as<dc:series>/<dc:seriesPosition>in acquisition feeds.Why: OPDS clients that support reading order (some versions of Moon+ Reader, custom clients) can group books by series and show them in correct order. Many publisher EPUBs and Calibre exports include this metadata.
Changes:
SeriesandSeriesIndexfields toCatalogEntryextractEpubMetadata()to parse<meta name="calibre:series"/>and<meta name="calibre:series_index"/>with namespace fallbackopds.Entrystruct withDcSeriesandDcSeriesPositionXML fieldsSeries()andSeriesPosition()builder methods toEntryBuildermakeFeed()emits series metadata whenExtractMetadatais enabledextractMetadata()return signature: 6 valuesVerification:
go test ./...)This is the second post-v1.10.0 recommendation from the improvement plan. After this merges, next up is EPUB subject/genre extraction.