-
Notifications
You must be signed in to change notification settings - Fork 0
feat: complete namespace support (Podcast 2.0, Media RSS, GeoRSS) #35
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
Merged
Conversation
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
…te/new-feed-url Phase 1 of namespace completion: - Add PodcastChapters type for podcast:chapters element - Add PodcastSoundbite type for podcast:soundbite element - Add PodcastEntryMeta container for entry-level podcast metadata - Add itunes:complete and itunes:new-feed-url fields to ItunesFeedMeta - Add DoS limits: max_podcast_transcripts, max_podcast_funding, max_podcast_persons - Add SSRF security warnings to all URL fields in podcast types - Optimize parse_duration() and parse_explicit() to avoid allocations - Add comprehensive tests for new functionality BREAKING: Entry struct now has `podcast: Option<PodcastEntryMeta>` field
Phase 2 of namespace completion: - Add MediaContent type with full Media RSS spec (medium, bitrate, framerate, expression, isDefault) - Add MediaThumbnail type with NTP time offset support - Add PodcastValue and PodcastValueRecipient types for value-for-value monetization - Implement podcast:value parsing with nested valueRecipient elements - Add max_value_recipients DoS limit (default: 20) - Add SSRF security warnings to MediaContent.url and MediaThumbnail.url - Add media_content_to_enclosure() conversion helper - Add comprehensive unit tests for all new types
Phase 3 (final) of namespace completion: - Add compat module with Python feedparser compatibility helpers: - normalize_version() converts FeedVersion to Python format - format_duration() converts seconds to HH:MM:SS - is_valid_version() validates version identifiers - Add geo field to FeedMeta for feed-level geographic data - Add handle_feed_element() to GeoRSS namespace handler - Add is_georss_tag() helper to parser common module - Integrate GeoRSS parsing at channel level in RSS and RSS 1.0 parsers - Add comprehensive tests for all new functionality
- Add #![allow(missing_docs)] to test file - Fix clippy warnings (float_cmp, format_push_string) - Apply rustfmt formatting fixes
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #35 +/- ##
==========================================
+ Coverage 91.55% 92.14% +0.59%
==========================================
Files 33 34 +1
Lines 6616 7446 +830
==========================================
+ Hits 6057 6861 +804
- Misses 559 585 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: parser
Feed parsing logic
area: rss
RSS 0.9x, 1.0, 2.0 support
component: core
feedparser-rs-core Rust library
component: node
Node.js bindings (napi-rs)
component: python
Python bindings (PyO3)
component: tests
Test suite or test infrastructure
lang: rust
Rust code
size: XXL
Huge PR (1000+ lines changed)
type: tooling
Development tools, CI/CD, or infrastructure
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.
Summary
This PR completes all missing namespace functionality for feedparser-rs across three phases:
Phase 1: Podcast 2.0 + iTunes ✅
PodcastChapterstype forpodcast:chapterselementPodcastSoundbitetype forpodcast:soundbiteelementPodcastEntryMetacontainer for entry-level podcast metadataitunes:completeanditunes:new-feed-urlfields toItunesFeedMetamax_podcast_transcripts,max_podcast_funding,max_podcast_persons,max_podcast_soundbitesparse_duration()andparse_explicit()to avoid allocationsPhase 2: Media RSS + podcast:value ✅
MediaContentwith full Media RSS spec (medium, bitrate, framerate, expression, isDefault)MediaThumbnailwith NTP time offset supportPodcastValueandPodcastValueRecipientfor value-for-value monetizationpodcast:valueparsing with nestedvalueRecipientelementsmax_value_recipientsDoS limit (default: 20)media_content_to_enclosure()conversion helperPhase 3: Compat Module + GeoRSS ✅
normalize_version()converts FeedVersion to Python formatformat_duration()converts seconds to HH:MM:SSis_valid_version()validates version identifiersgeofield toFeedMetafor feed-level geographic dataBreaking Changes
Entrystruct now haspodcast: Option<PodcastEntryMeta>fieldQuality Assurance
All three phases passed:
Test Results
cargo +nightly fmtFiles Changed