plebbit / plebbit-react

A GUI for plebbit
https://plebbitapp.eth.limo
GNU General Public License v2.0
35 stars 6 forks source link

RSS #331

Closed sjehuda closed 1 year ago

sjehuda commented 1 year ago

See https://github.com/plebbit/plebbit-react/issues/331#issuecomment-1624605080

Syndication web feeds are missing.

Preferably in the form or Atom and Json, and also in ActivityStreams (see GNU social).

estebanabaroa commented 1 year ago

plebbit-react is a static HTML client, it cannot do server side things like outputing RSS, JSON, etc.

soon there will be a websocket JSON RPC client, but there are no plan for an RSS or activitysteams client at the moment, though anyone can build a client that outputs these things using https://github.com/plebbit/plebbit-js

anyone interested in building one and needs help can DM me on telegram @estebanabaroa

sjehuda commented 1 year ago

RSS is not dynamic.

It is as dynamic as the HTML that plebbit-react produces.

plebbit-react produces and HTML file, and an XML file (RSS).

RSS is a file produced by the server, not the client.

Feed Readers are the clients that read the RSS files.

e.g. Take Mastodon as an example

https://mastodon.work/@Abaroa (HTML) https://mastodon.work/@Abaroa.rss (RSS)

estebanabaroa commented 1 year ago

RSS is not dynamic.

yes it is

https://mastodon.work/@Abaroa (HTML) https://mastodon.work/@Abaroa.rss (RSS)

Those are 2 different (dynamic) pages.

If you go to https://plebbit-test.netlify.app/#/p/reddit-screenshots.eth/c/QmfKERsY6htXuL3wxXiVnSUT73HwxsuT49ZzrB5GjHg76K can see that it's a single page application, it only makes a request to the path / the rest of the URL is a hash router #/p/reddit-screenshots.eth/c/QmfKERsY6htXuL3wxXiVnSUT73HwxsuT49ZzrB5GjHg76K which is not sent to any server.

This repo has no server that can serve 2 different dynamic pages such as /@Abaroa or /@Abaroa.rss, it only has static HTML, ie a single page application.

It's possible to build an RSS server for plebbit but it would not be in this repo, it would probably be better suited for https://github.com/plebbit/plebbit-cli or be its own project.

sjehuda commented 1 year ago

I didn't take the hashes into consideration.

1) The h-entry can be a solution.

See #332

2) We can also scrape data into Atom or RSS feed using Javascript, upon clicking on RSS icon.

mainTitle = document.querySelector('div.css-1pxyufv > div').textContent; // Healling Our Troubled Information Ecosystem subTitle = document.querySelector('div.chakra-skeleton.css-1qgn8gy > a').textContent; // p/censorship-watch.eth mainPost = document.querySelector('div.css-1pxyufv > div').textContent; // Healling Our Troubled Information Ecosystem for (const item of document.querySelectorAll('.css-1lv53r0')) { entryTitle = item.querySelector('.css-1jj2vpp').textContent; // 18 days ago entryContent = item.querySelector('p').textContent; // zz }

// Generate Atom feed

https://plebbit-test.netlify.app/#/p/censorship-watch.eth/c/QmVXqaAY6SjcanGSuTTA8WTqfZLrHdozYJB7nFwN9nVqg8

sjehuda commented 1 year ago

Please ignore # 2

After we generate a feed, we have to have a source to request data from, which we don't.