Skip to content
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

Add OCamlPro feed to OCaml Planet #1776

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Add OCamlPro feed to OCaml Planet #1776

merged 2 commits into from
Nov 21, 2023

Conversation

zapashcanon
Copy link
Contributor

Hi,

The blog of OCamlPro was unfortunately missing from the long list of blogs collected by our dear Tarides maintainers.

Unfortunately, I have no idea how to run the scraper and the website has way too much dependencies so I'd appreciate if someone with a working set-up could run it. ( cc @sabine ? 😄 )

Thanks !

@tmattio
Copy link
Collaborator

tmattio commented Nov 16, 2023

Thanks for the PR @zapashcanon, OCamlPro is a great addition to the OCaml Planet!

Running the scraper unfortunately yields:

failed to scrape ocamlpro: Invalid_argument("Syndic.Date.of_string: cannot parse \"2023-09-18\"")

Looks like a bug in Syndic, so that'll need to be addressed upstream. Alternatively, a workaround could be to update the OCamlPro RSS feed to be readable by Syndic, that might be quicker if you have control over how the RSS feed is generated.

The blog of OCamlPro was unfortunately missing from the long list of blogs collected by our dear Tarides maintainers.

For context, I pulled the planet sources from https://github.com/ocaml/v2.ocaml.org/blob/master/planet_feeds.txt (which contained OCamlPro RSS feed before it was removed from V2 because it caused build failures). When I pulled it, I removed the entries that didn't work, that must be when the OCamlPro one got dropped. In hindsight, I should have pinged you when I noticed the feed wasn't working anymore, sorry about that 🙂

@zapashcanon
Copy link
Contributor Author

Thanks. @RadioPotin wrote a fix for the feed. It should be in production later today.

@sabine
Copy link
Collaborator

sabine commented Nov 17, 2023

@zapashcanon I tried to scrape the feed this morning in order to merge this. It looks like the feed now has a different problem: syndic doesn't seem to parse it as either a RSS2 or Atom feed:

Downloading https://ocamlpro.com/blog/feed/ ... done failed to scrape ocamlpro: Failure("Neither Atom nor RSS2 feed")

https://github.com/kayceesrk/river/blob/2fa44943d11613a09f6f3bc92012a2b75df654d7/lib/feed.ml#L25-L29

This either means the feed is still not RSS2 or Atom compatible or there's a problem in syndic, but I haven't looked deeper. Annoyingly, river swallows the error message.

@zapashcanon
Copy link
Contributor Author

zapashcanon commented Nov 17, 2023

Well the feed is working on any client I've tried. I guess Syndic is broken (or correct but much stricter than most clients).

@bclement-ocp
Copy link

The W3C has an online service to validate RSS feeds: https://validator.w3.org/feed/

Looks like there are still issues with our feed.

Sorry

This feed does not validate.

@RadioPotin
Copy link
Contributor

Greetings,

Thank you @bclement-ocp, I was unaware that that online service existed, I pushed my fix for the date format that was mentioned above yesterday and will look into fixing these errors and pushing a new version of the site today.

Thanks for pointing out these oversights @sabine and @tmattio

✌️

@sabine sabine changed the title fix unfortunate oversight in the planet sources Add OCamlPro feed to OCaml Planet Nov 20, 2023
@RadioPotin
Copy link
Contributor

Hello,

Just to let you know that our feed is now compliant with the Atom 1.0 spec.

This should be mergeable now.

Thank you, until next time !

@sabine
Copy link
Collaborator

sabine commented Nov 21, 2023

@RadioPotin yes, I think the feed is Atom compliant now.

Looking into this, it seems we're currently relying on link tags being present to look up the URI.

It seems to me that ocaml.org could be changed to fall back to the id tag, when no link tag is present. I expect this is going to be a possible issue with other feeds as well.

@sabine
Copy link
Collaborator

sabine commented Nov 21, 2023

Looking into this upstream at tarides/river#11.

@sabine
Copy link
Collaborator

sabine commented Nov 21, 2023

Thanks for being so patient with us folks! This is merging as soon as the checks go through.

@sabine sabine mentioned this pull request Nov 21, 2023
@sabine sabine merged commit 177b9f4 into ocaml:main Nov 21, 2023
3 checks passed
sabine pushed a commit to sabine/ocaml.org that referenced this pull request Nov 24, 2023
sabine pushed a commit to balat/ocaml.org that referenced this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants