Skip to content

Dynamic OPML#4407

Merged
Alkarex merged 33 commits intoFreshRSS:edgefrom
Alkarex:dynamic_opml
Jul 4, 2022
Merged

Dynamic OPML#4407
Alkarex merged 33 commits intoFreshRSS:edgefrom
Alkarex:dynamic_opml

Conversation

@Alkarex
Copy link
Copy Markdown
Member

@Alkarex Alkarex commented Jun 7, 2022

#fix #4191

  • Add the ability for a category to be dynamically populated with a list of feeds provided by a remote OPML, that is to say to consume a dynamic OPML / reading list.
    • This includes automatically adding new feeds, and muting (disabling) feeds that have been removed from the list (with a button to manually delete all the muted / disabled feeds).
    • Does not support - by design - sub-categories, but will import feeds from sub-categories.
  • Add the ability to dynamically export a FreshRSS view (all, feed, category) into a dynamic OPML / reading list, that is to say to produce a dynamic OPML / reading list.
    • E.g. https://freshrss.example.net/?a=opml&get=c3&token=...

Background reading:

<meta rel="outline" type="text/x-opml" title="OPML" href="./?a=opml" />
  • (Future PR) Make a custom TTL (refresh frequency) per category just like we have for feeds, in addition of the global parameter, which is by default to refresh dynamic OPMLs every 12 hours

There are a few other remaining edge cases, such as when feeds with a URL that has been (permanently) redirected, and feeds referenced in more than one dynamic OPML.

@Alkarex Alkarex added this to the 1.21.0 milestone Jun 7, 2022
@Alkarex Alkarex marked this pull request as draft June 7, 2022 11:16
@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Jun 13, 2022

@reidcooper if you are around, this PR starts to work, so tests welcome already:

image

image

What mainly lack is the finalisation of the automatic refreshing of the dynamic OPMLs (the manual button works already, including muting/disabling feeds that are not in the OPML anymore) and a number of edge cases (such as the tricky case of feeds with HTTP redirections).

@reidcooper
Copy link
Copy Markdown

@Alkarex Hey hey! That's great news. Thanks for the update and powering through the update. I can give the beta a shot and see how it goes. I may be able to get to it this week.

@Alkarex Alkarex modified the milestones: 1.21.0, 1.20.0 Jun 14, 2022
@Alkarex Alkarex marked this pull request as ready for review June 16, 2022 10:37
@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Jun 17, 2022

Does it make sense to add feeds manually to the dyn. OPML category?

Should we block to add more feeds into the dyn. OPML category?

Good point, I have disabled adding new feeds to a dynamic category. However, it is still possible to drag & drop an existing feed to such a category.

Indeed, I would like to keep the option to move feeds out to another normal category. But then, what if you change your mind and want to move it back? Suddenly we would have to keep track of which feeds would be allowed or not, which would require a bunch of custom code and would not necessarily result in a better experience.

What will happen after an update of the feed list?

Feeds, which URL is not in the dynamic OPML will be muted (disabled)

@math-GH
Copy link
Copy Markdown
Contributor

math-GH commented Jun 18, 2022

I would suggest to use a "official" OPML logo (see also: scripting/opml.org#5):
opml

Right now there is no icon for dynamic OPML, so I created a new one:
opml-dyn

@math-GH
Copy link
Copy Markdown
Contributor

math-GH commented Jun 18, 2022

Should we add also an dyn. OPML import on the import/export screen?

grafik

@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Jun 18, 2022

Right now there is no icon for dynamic OPML, so I created a new one: opml-dyn

Looks great 👍🏻

@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Jun 19, 2022

I have experimented a big with your nice OPML logos and I will clearly use them for links to our OPML views 👍🏻

But for inline use, although it works ok, it is not as readable and I think I still have a little preference to a Unicode or emoji such as 🗲
What do people think? :-)

image

image

image

image

image

image

image

image

@Frenzie
Copy link
Copy Markdown
Member

Frenzie commented Jun 19, 2022

I agree with the gist about being able to tell what it looks like better, but I'm not quite sure how lightning/electricity relates to OPML. :-)

@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Jun 19, 2022

I agree with the gist about being able to tell what it looks like better, but I'm not quite sure how lightning/electricity relates to OPML. :-)

The ideas I wanted to convey are: dynamic / magic but also dangerous

@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Jun 19, 2022

Should we add also an dyn. OPML import on the import/export screen?

@math-GH Ok, something like that?

image

@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Jul 4, 2022

Let's merge that to get some more tests and potentially come back to the cosmetic details in another PR.
Furthermore, I have another feature regarding sharing / tokens, which builds upon this PR, and which I would ideally like to implement before releasing 1.20.0.

@Alkarex Alkarex merged commit 509c8ca into FreshRSS:edge Jul 4, 2022
@Alkarex Alkarex deleted the dynamic_opml branch July 4, 2022 07:53
@reidcooper
Copy link
Copy Markdown

@Alkarex I was finally able to try out the Docker Edge release here, added an OPML feed, and it worked! I was able to see incoming feeds sync and mark them as read. Let me try this out for a few days and see how it performs. Sorry for the late reply and thank you very much for your hard work on developing this feature <3

Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Oct 9, 2022
@Alkarex Alkarex mentioned this pull request Oct 9, 2022
// Merge existing and import attributes
$existingAttributes = $feed_search->attributes();
$importAttributes = $feed->attributes();
$feed->_attributes('', array_merge_recursive($existingAttributes, $importAttributes));
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge bug fixed in #4708

Alkarex added a commit that referenced this pull request Oct 9, 2022
@Alkarex Alkarex mentioned this pull request Oct 11, 2022

$html = getHtml($feedSourceUrl, $attributes);
$cachePath = FreshRSS_Feed::cacheFilename($feedSourceUrl, $attributes, FreshRSS_Feed::KIND_HTML_XPATH);
$html = httpGet($feedSourceUrl, $cachePath, 'html', $attributes);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug with $attributes fixed in #4759

math-GH pushed a commit to math-GH/FreshRSS that referenced this pull request Nov 15, 2022
@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Oct 18, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Subscribe to a dynamic OPML Feed

4 participants