-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
RssAgent: Migrate from FeedNormalizer to Feedjira #1564
Conversation
ENCLOSURE_ATTRS = %i[url type length] | ||
|
||
unless dependencies_missing? | ||
class AtomAuthor |
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.
Should we pull this into a separate file?
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.
Maybe. Would app/models/agents/rss_agent/feedjira_extension.rb
be a good place?
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.
Or maybe in lib/feedjira_extension.rb
?
@@ -139,21 +160,80 @@ def check_and_track(entry_id) | |||
end | |||
end | |||
|
|||
unless dependencies_missing? | |||
require '' |
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.
require ''
?
Oh, I didn't mean to push this yet. I'll fix it later. |
Gotcha. |
d84faf8
to
f5185c1
Compare
OK, I think this is finally getting ready for merge. Since I've refactored and rewritten a large portion of what I pushed the last time, I've squashed everything into a single commit so the whole change gets reviewed again from the ground up. Thank you for your review and testing! |
@@ -53,18 +52,43 @@ def default_options | |||
Events look like: | |||
|
|||
{ | |||
"feed": { |
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.
Maybe
{
"feed": { # if you set include_feed_info to true
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.
Actually there was a note at the bottom but it was probably unnoticeable. I've added a couple of additional notes about some fields, so it has hopefully gained its presence.
@cantino Yes, I'd much appreciate if people who have had trouble with the RssAgent could test this out and give some feedback. /cc @marycanady, @schulzpin, @Jngai |
I've been running this with various feeds for two weeks without a problem. I'm afraid I was too late to come up when people had already found out their way to work around their problems, but is there any feedback from you folks? I'd like to merge this soon, to move away from obsolete libraries and add features based on the new code base. |
@cantino Is it about time we should merge this and move on? |
Yes @knu, I agree. Go for it! |
FeedNormalizer is no longer maintained, and its Atom support has flaws in that it throws away what RSS::Parser returns and falls back to using SimpleRSS which is not capable of handling XML entities, resulting in getting ususable URLs such as ones including `&`. Feedjira is highly customizable as it implements parsers for various feed formats on its own using sax-machine. The `clean` option is reimplemented using the loofah gem. `Feedjira::FeedUtilities#sanitize_entries!` is not used because it tries to sanitize non-HTML properties too. A new option `include_feed_info` is added, with which turned on feed information is added to each event payload. A new key `links` is added, which lists all `link` elements. A new key `enclosure` is added.
6e55e3f
to
d63f714
Compare
Done! |
Awesome work 👏 |
Thanks. Google Reader is long gone and it's been one year since Yahoo Pipes shut down, but feeds shall not die! |
Thanks for your work on this--I'm in "set it and forget it" mode for this project so I can't test now, but will let you know when I do! |
This replaces #957.