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

Support PubSub (XMPP) #48

Open
sjehuda opened this issue May 17, 2024 · 12 comments
Open

Support PubSub (XMPP) #48

sjehuda opened this issue May 17, 2024 · 12 comments

Comments

@sjehuda
Copy link

sjehuda commented May 17, 2024

Greetings!

In XMPP, using PubSub(1) (XEP-0060), it is possible to store posts as Atom Syndication(2) entries into XMPP(3).

There are several XMPP extensions that apply it, namely XEP-0227 (4) and XEP-0472 (5) which make node urn:xmpp:microblog:0 as a common choice to manage news for client accounts (e.g. blog@planetplanet.org), yet a component account (e.g. pubsub.planetplanet.org) may use all of its nodes for this purpose.

pubsub.planetplanet.org/
|
|-- planet/
    |-- item 1 (Rebecca)
    |-- item 5 (Abe)
    |-- item 2 (Eve)
    |-- item 3 (Adam)
    `-- item 1 (Johnathan)
|-- Rebecca/
    `-- item 1
|-- Abe/
    |-- item 1
    |-- item 2
    |-- item 3
    |-- item 4
    `-- item 5
|-- Adam/
    |-- item 1
    |-- item 2
    `-- item 3
|-- Eve/
    |-- item 1
    `-- item 2
 `-- Johnathan/
    `-- item 1

A Ruby library that might be utilized would be XMPP4R.

I have made a script that realizes viewing PubSub node items as Atom XML feeds over HTTP.

XEP-0060: Publish-Subscribe
RFC 4287: The Atom Syndication Format
Atom Over XMPP
XEP-0277: Microblogging over XMPP
XEP-0472: Pubsub Social Feed
XMPP4R
PubSub Over HTTP

@geraldb
Copy link
Member

geraldb commented May 17, 2024

@sjehuda may i ask - are you running any planets with pluto?

@sjehuda
Copy link
Author

sjehuda commented May 17, 2024

No. Not yet, but I might.

I program in Python, and so I intend to run a "planet" with a Python software and I also intend add this feature to it.

@geraldb
Copy link
Member

geraldb commented May 17, 2024

fyi: the planet pluto machinery is in ruby (NOT python). note - the (pluto planet) sqlite db model is "generic", thus, in practice or in theory you can use python to access it (the sqlite db).

@sjehuda
Copy link
Author

sjehuda commented May 17, 2024

I am aware of it.

This is why I have linked to an XMPP Ruby Library .

I ask for this feature to be added to Pluto because it is vital.

ATOM/XMPP is definitely better than HTML/HTTP.


On another note, I intend to add this feature to:

  1. Another "planet" software.
  2. A static site generator.

@geraldb
Copy link
Member

geraldb commented May 17, 2024

thanks for the update. if i find time i try to learn more about pubsub / xmpp (subscribe).

ps: for static site generatation - a basic static site generator with ready-to-use templates is built-in. as alternative you can use any static site generator. many use jekyll - see planet opensuse and others for how to setup with pluto.

@sjehuda
Copy link
Author

sjehuda commented May 19, 2024

if i find time i try to learn more about pubsub / xmpp (subscribe).

This feature is not directly related to "subscribe"; it is only related to uploading XML data (Atom Syndication Format) to PubSub nodes.

The publishing is done by server (e.g. eJabberd, Openfire, Prosody etc.) and subscription is done by client (e.g. Dergchat, Gajim, Kaidan, Psi, Movim etc.)

Software which upload data to PubSub nodes:

Results can be tested with Movim:
https://mov.im/community/news.movim.eu
https://mov.im/community/blabla.movim.eu

Note: news.movim.eu and blabla.movim.eu function as PubSub services which enclose nodes within them. Each node represents an Atom Syndication Feed.


I have updated the scheme in the initial post which shows plant feed as node and the rest of the feeds as nodes too.

@geraldb
Copy link
Member

geraldb commented May 19, 2024

i see. thanks for the update & comments. if i understand this works like publishing with a new template / setup. if yes, have a look at the open suse and friends setup that use their own site generator (jekyll) that formula might work for you too.

@sjehuda
Copy link
Author

sjehuda commented May 19, 2024

I am not sure what you mean by template.

All I send to XMPP PubSub node is Atom Syndication Format compliant XML elements, including HTML enclosed inside XML (this is part of the RFC 4287 standard).

Concerning to Jekyll, I have posted a similar ticket at jekyll/jekyll#9583

@geraldb
Copy link
Member

geraldb commented May 19, 2024

I am not sure what you mean by template.

you can generate (export) your feed items (with or without templates) as you like. for an example again see planet open suse (in action) here -> https://github.com/opensuse/planet-o-o
and the generation script here -> https://github.com/openSUSE/planet-o-o/blob/master/bin/jekyll_planet.rb

@sjehuda
Copy link
Author

sjehuda commented May 23, 2024

@mattr has wrote that it can be a plugin.

I might volunteer to work on it too. I might join another friend who codes in Ruby too.

If it is relevant to both Jekyll and Pluto, please inform me of your progress in order to coordinate our efforts.

@geraldb
Copy link
Member

geraldb commented May 23, 2024

yes please, write a plugin. nothing here (planned). it's all up-to-you. all the best.

@sjehuda
Copy link
Author

sjehuda commented May 23, 2024

Alright. I might want to use these projects to accomplish this task:

https://git.singpolyma.net/xmpp-blog-utils

https://github.com/adhearsion/blather

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

No branches or pull requests

2 participants