-
Notifications
You must be signed in to change notification settings - Fork 151
Add new LinkRelation
for the readingOrder
and EPUB landmarks
#602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new EPUB landmark link relation for the reading order by introducing a new LinkRelation (.start) and updating namespace definition usage throughout the EPUB parser modules. Key changes include:
- Replacing explicit namespace string definitions with centralized defineNamespace/defineNamespaces calls.
- Refactoring OPF and EPUB parsers to use the new namespace APIs.
- Adding a new LinkRelation+EPUB extension to map EPUB-specific link types.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
Sources/Streamer/Parser/EPUB/XMLNamespace.swift | Added helper extensions for defining one or multiple XML namespaces. |
Sources/Streamer/Parser/EPUB/OPFParser.swift | Updated namespace calls to use defineNamespace. |
Sources/Streamer/Parser/EPUB/OPFMeta.swift | Replaced explicit namespace calls with defineNamespace(s). |
Sources/Streamer/Parser/EPUB/NavigationDocumentParser.swift | Updated namespace usage and passed the new LinkRelation (via epubType) to makeLink. |
Sources/Streamer/Parser/EPUB/NCXParser.swift | Refactored namespace initialization using defineNamespace. |
Sources/Streamer/Parser/EPUB/Extensions/LinkRelation+EPUB.swift | Added EPUB-specific initializer for LinkRelation based on epubType. |
Sources/Streamer/Parser/EPUB/EPUBParser.swift | Refactored publication parsing to use EPUBManifestParser and updated deobfuscator initialization. |
Sources/Streamer/Parser/EPUB/EPUBMetadataParser.swift | Updated namespace calls to use defineNamespace(s). |
Sources/Streamer/Parser/EPUB/EPUBManifestParser.swift | Introduced a new manifest parser that fills in readingOrder link relations based on landmarks. |
Sources/Streamer/Parser/EPUB/EPUBEncryptionParser.swift | Updated namespace usage with defineNamespace. |
Sources/Streamer/Parser/EPUB/EPUBContainerParser.swift | Updated namespace definition to use defineNamespace. |
Sources/Shared/Toolkit/XML/XML.swift | Refactored XMLNamespace into a structured type with predefined constants. |
Various Sniffer files | Updated inline XML namespace definitions to use the centralized XMLNamespace constants. |
Sources/Shared/Publication/LinkRelation.swift | Added the new .start link relation to support landmark entries. |
Sources/OPDS/XMLNamespace.swift and Sources/OPDS/OPDS1Parser.swift | Updated namespace definitions with defineNamespace calls. |
CHANGELOG.md | Documented the new link relations for readingOrder landmarks. |
Added
Navigator
rels
in thereadingOrder
and EPUBlandmarks
to mark:cover
: the title pagecontents
: the table of contentsstart
: the first actual chapter