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 ocaml.org Hand-picked RSS feed #1218

Merged
merged 1 commit into from
May 31, 2023
Merged

Add ocaml.org Hand-picked RSS feed #1218

merged 1 commit into from
May 31, 2023

Conversation

cuihtlauac
Copy link
Collaborator

@cuihtlauac cuihtlauac commented May 26, 2023

DO NOT MERGE

This is a preliminary and hacky attempt at addressing issue #1203.

We have a manually created, edited and committed asset/ocamlorg-handpicked-feed.xml file containing one entry per foreign feed entry. This is served as-is.

ocaml.org recursively becomes its own feed source, adding https://ocaml.org/ocamlorg-handpicked-feed.xml to data/planet-sources.yml

Updating is where it becomes ugly.

  1. Update asset/ocamlorg-handpicked-feed.xml
  2. Push online
  3. Scrape
  4. Push online a second time

Going further:

  • Patch river to make it able to fetch a source from a local file (this would remove duplicate push)
  • Generate asset/ocamlorg-handpicked-feed.xml from a Yaml data file

Tests results:

  • make scrape
  • make start
  • Browsing

Screenshot_2023-05-26_13-52-58

@cuihtlauac cuihtlauac requested a review from tmattio May 26, 2023 12:05
@tmattio
Copy link
Collaborator

tmattio commented May 26, 2023

Happy to review, but I'm not sure what we're trying to achieve here, I suspect this isn't the right issue in the description. Can you give more context on the problem?

@tmattio
Copy link
Collaborator

tmattio commented May 26, 2023

Ok, reading the code I think I understand. Instead of adding an RSS feed, could we simply add the posts in data/planet/ocamlorg/ without content, only a redirect to the blog posts?

@tmattio
Copy link
Collaborator

tmattio commented May 26, 2023

Or even better, add new directories stackoverflow and backendbanter in planet/ with the posts without adding an RSS feed source.

@cuihtlauac
Copy link
Collaborator Author

cuihtlauac commented May 26, 2023

@samoht suggested to have a podcast/video section.

Leaving aside deciding whether they go in /blog or elsewhere, a related issue is: we probably don't want to aggregate whole feeds which only contain a few ocaml-related posts (example: stack overflow blog).

I propose to have a mean to pick and choose individual posts from various feeds. This selection would be

  • exposed as a standalone ocamlorg feed
  • merged into /blog (or some other section TBD)

@tmattio
Copy link
Collaborator

tmattio commented May 26, 2023

@samoht suggested to have a podcast/video section.

Leaving aside deciding whether they go in /blog or elsewhere, a related issue is: we probably don't want to aggregate whole feeds which only contain a few ocaml-related posts (example: stack overflow blog).

I propose to have a mean to pick and choose individual posts from various feeds. This selection would be

  • exposed as a standalone ocamlorg feed
  • merge into /blog (or some other section)

Picking individual posts (or podcasts) for the planet makes sense. I'm am not sure about maintaining a local RSS feed for handpicked posts that is only used for scraping. The posts will have to be added to that RSS feed manually anyway, so might as well add the markdown files in data/planet/ directly, wdyt?

@cuihtlauac
Copy link
Collaborator Author

cuihtlauac commented May 26, 2023

I'm am not sure about maintaining a local RSS feed for handpicked posts that is only used for scraping.

I'm not either :-) Although I see the value of subscribing to a feed which manually aggregates individual posts from various sources. That's curated content.

The posts will have to be added to that RSS feed manually anyway, so might as well add the markdown files in data/planet/ directly, wdyt?

The trouble is we may not have access to the markdown. That's why I'd rather reduce manual editing to merely copying a URL into a file.

@tmattio
Copy link
Collaborator

tmattio commented May 26, 2023

The trouble is we may not have access to the markdown. That's why I'd rather reduce manual editing to merely copying a URL into a file.

We don't need to have the content, for instance, the StackOverflow post in the RSS feed can be a new file in /data/:

# data/planet/stackoverflow/for-those-who-just-dont-git-it.md
---
title: For those who just don’t Git it
description: Pierre-Étienne Meunier, creator and lead developer of open-source version control system Pijul, joins the home team to talk about version control, functional programming, and why OCaml is a source of French national pride.
url: https://stackoverflow.blog/2023/05/23/for-those-who-just-dont-git-it-ep-573
date: 2023-05-23T21:04:40-00:00
preview_image: https://149351115.v2.pressablecdn.com/wp-content/uploads/2022/03/blog-podcast-relaunch-1.png
featured:
---

I think this is basically the same amount of manual editing, but doing it in markdown removes quite some complexity from the process. I'd also suggest we wait to see if doing this manually becomes a problem before we try to automate it. I suspect we won't be adding new blog posts manually very often.

@cuihtlauac
Copy link
Collaborator Author

You're right. This is easier your way. So basically, it's just a matter of editing CONTRIBUTING.md, that's great.

@tmattio
Copy link
Collaborator

tmattio commented May 27, 2023

One issue with this is that asset/feed.xml won't contain the manually added posts, since it's an aggregate of the XML files at planet/*.xml. We should change that to make feed.xml an aggregate of the markdown instead, and remove the .xml files in planet/, I don't think they are useful, so they are just adding noise.

@tmattio
Copy link
Collaborator

tmattio commented May 27, 2023

cc @davesnx I added a couple of your blog posts here - they are really great btw, I especially liked the React in OCaml one!

@sabine
Copy link
Collaborator

sabine commented May 30, 2023

One issue with this is that asset/feed.xml won't contain the manually added posts, since it's an aggregate of the XML files at planet/*.xml.

I recently realized that a better way to do this is to generate feed.xml in ood from the markdown files. Then we don't need to cache any XML feeds either.

@tmattio
Copy link
Collaborator

tmattio commented May 30, 2023

I recently realized that a better way to do this is to generate feed.xml in ood from the markdown files. Then we don't need to cache any XML feeds either.

You mean in ood-gen or ocamlorg_data? if the latter, one possible downside is the cost of assembling the feed at runtime

@sabine
Copy link
Collaborator

sabine commented May 30, 2023

You mean in ood-gen or ocamlorg_data?

ood-gen because, indeed, there's no point in doing it at runtime.

@tmattio
Copy link
Collaborator

tmattio commented May 30, 2023

Then we're in agreement, that's what I was suggesting above 🙂

We should change that to make feed.xml an aggregate of the markdown instead, and remove the .xml files in planet/, I don't think they are useful, so they are just adding noise.

@sabine
Copy link
Collaborator

sabine commented May 30, 2023

that's what I was suggesting above 🙂

Skim reading comprehension fail on my side. Yes, we're on the same page.

Co-authored-by: Cuihtlauac ALVARADO <cuihtmlauac@tarides.com>
Co-authored-by: Thibaut Mattio <thibaut.mattio@gmail.com>
Copy link
Collaborator

@tmattio tmattio left a comment

Choose a reason for hiding this comment

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

Let's merge as-is and make the changes to generate the RSS from the markdown in another PR

@sabine
Copy link
Collaborator

sabine commented May 31, 2023

Sounds fine to me. Incremental progress is good.

@tmattio tmattio merged commit 90f93ab into main May 31, 2023
1 of 3 checks passed
@tmattio tmattio deleted the pick-choose branch May 31, 2023 16:33
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.

None yet

3 participants