2024-11-12 14:25:05 +01:00
# Rivista XJP
2024-07-08 10:57:51 +02:00
2024-11-12 14:25:05 +01:00
Rivista XJP ("XMPP Journal Publisher"); previously XMPP PubSub To Atom ("XPTA").
2024-07-08 23:26:18 +02:00
2024-11-12 14:25:05 +01:00
Rivista is a software that parses XMPP Pubsub Nodes and sends them as Atom
Syndication Format or OPML over HTTP.
2024-07-08 23:26:18 +02:00
2024-11-12 14:25:05 +01:00
Rivista generates Atom syndication feeds
([RFC 4287](https://www.rfc-editor.org/rfc/rfc4287)) from XMPP PubSub nodes
([XEP-0060](http://xmpp.org/extensions/xep-0060.html)).
2024-07-11 16:43:28 +02:00
2024-11-12 14:25:05 +01:00
Rivista includes [XSLT ](https://www.w3.org/TR/xslt/ ) stylesheets that transform
PubSub nodes into static XHTML journal sites.
2024-07-11 19:56:20 +02:00
2024-07-13 21:16:25 +02:00
Rivista was inspired from Tigase and was motivated by Movim.
2024-07-08 23:26:18 +02:00
2024-09-05 10:08:26 +02:00
## Instances
2024-11-12 14:25:05 +01:00
* https://rivista.woodpeckersnest.eu
2024-09-05 10:08:26 +02:00
2024-07-09 16:02:03 +02:00
## Preview
2024-11-12 14:37:40 +01:00
[<img alt="berlin-xmpp-meetup" src="rivista/screenshot/berlin-xmpp-meetup.png" width="200px"/> ](rivista/screenshot/berlin-xmpp-meetup.png )
[<img alt="let-s-talk-about-xmpp-tricks-with-conversations-author-daniel-gultsch-OqjaQh" src="rivista/screenshot/let-s-talk-about-xmpp-tricks-with-conversations-author-daniel-gultsch-OqjaQh.png" width="200px"/> ](rivista/screenshot/let-s-talk-about-xmpp-tricks-with-conversations-author-daniel-gultsch-OqjaQh.png )
[<img alt="59d860ab-d7c8-477c-bb4b-86924485cbbb" src="rivista/screenshot/59d860ab-d7c8-477c-bb4b-86924485cbbb.png" width="200px"/> ](rivista/screenshot/59d860ab-d7c8-477c-bb4b-86924485cbbb.png )
[<img alt="selection" src="rivista/screenshot/selection.png" width="200px"/> ](rivista/screenshot/selection.png )
2024-07-09 16:02:03 +02:00
2024-07-10 04:11:18 +02:00
## Motivation
2024-11-12 14:25:05 +01:00
Rivista is a syndication project which makes journals and publications that are
hosted on XMPP PubSub nodes, available from HTTP to both, XML news readers and
even HTML browsers.
2024-07-10 04:11:18 +02:00
2024-11-12 14:25:05 +01:00
This means that instead of hosting a journal or publication site in the old
fashion (i.e. HTML documents hosted on an HTTP server), one only has to have an
HTTP server to operate Rivista, and the rest of the content is delivered from an
XMPP server (i.e. PubSub nodes).
2024-07-10 04:11:18 +02:00
2024-11-12 14:25:05 +01:00
The project also showcases the non-necessity of HTML, as it automatically
generates valid XHTML pages by HTML browsers (client-side) from XSLT
stylesheets.
2024-07-09 16:02:03 +02:00
2024-11-12 14:25:05 +01:00
Because Rivista reads XMPP PubSub nodes, it is possible to view a complete set
of node items, and even a single node item, which means, that a considered and
carefully earnest use of Rivista would save bandwidth and system overhead, which
includes CPU, I/O and RAM usage.
2024-07-10 04:29:56 +02:00
2024-07-08 23:26:18 +02:00
## Requirements
* Python >= 3.5
2024-11-12 14:25:05 +01:00
* beautifulsoup4
2024-07-08 23:26:18 +02:00
* fastapi
* lxml
2024-11-12 14:25:05 +01:00
* markdown
2024-07-08 23:26:18 +02:00
* slixmpp
2024-07-12 17:27:21 +02:00
* tomllib (Python < = 3.10)
2024-07-09 15:54:37 +02:00
* uvicorn
2024-07-08 23:26:18 +02:00
## Installation
2024-11-12 14:25:05 +01:00
It is possible to install Rivista using pip and pipx.
2024-07-09 18:13:32 +02:00
2024-11-12 14:25:05 +01:00
#### pip inside venv
```
$ python3 -m venv .venv
$ source .venv/bin/activate
2024-07-09 18:13:32 +02:00
```
2024-11-12 14:25:05 +01:00
##### Install
```
$ pip install git+https://git.xmpp-it.net/sch/Rivista
```
2024-07-09 14:29:22 +02:00
2024-11-12 14:25:05 +01:00
#### pipx
2024-07-08 23:26:18 +02:00
2024-11-12 14:25:05 +01:00
##### Install
```
$ pipx install git+https://git.xmpp-it.net/sch/Rivista
```
##### Update
```
$ pipx uninstall rivista
$ pipx install git+https://git.xmpp-it.net/sch/Rivista
2024-07-09 14:29:22 +02:00
```
### Configure
2024-11-12 14:25:05 +01:00
Add account credentials to file `settings.toml` .
2024-07-09 14:29:22 +02:00
2024-11-12 14:25:05 +01:00
Copy file`settings.toml` to `~/.config/rivista/` .
Copy directories `css` , `graphics` , `img` , `script` , and `xsl` to
`~/.local/share/rivista/` .
2024-07-09 14:29:22 +02:00
2024-11-12 14:25:05 +01:00
Copy directory `json` to `~/.cache/rivista/` .
### Start
2024-07-08 23:26:18 +02:00
2024-11-12 14:25:05 +01:00
```
$ rivista
2024-07-08 23:26:18 +02:00
```
## Usage
2024-11-12 14:25:05 +01:00
It is possible to view a complete node and even a single item, which means, that
it is possible to save bandwidth and it further means that a considered and
carefully earnest use of this software would save system overhead, which
includes CPU, I/O and RAM usage.
2024-07-08 23:26:18 +02:00
2024-07-09 14:29:22 +02:00
### Viewing PubSub
2024-07-08 23:26:18 +02:00
2024-07-10 05:10:55 +02:00
Suppose you have the following PubSub nodes and items.
2024-07-08 23:26:18 +02:00
2024-07-12 17:27:21 +02:00
|Jabber ID |Node |Item |
|--- |--- |--- |
|blog.jmp.chat |urn:xmpp:microblog:0 |launch-2023 |
|edhelas%40movim.eu |urn:xmpp:microblog:0 |working-on-launching-the-movim-network-qPBzwc |
|goffi%40goffi.org |urn:xmpp:microblog:0 |libervia-v0-8-la-cecilia-BdQ4 |
|news.movim.eu |Phoronix | |
|pubsub.movim.eu |berlin-xmpp-meetup |7363a41d-1146-40b3-ac0f-8ee2559591a3 |
|pubsub.movim.eu |berlin-xmpp-meetup |let-s-talk-about-the-xsf-and-possibly-other-things-6A8eV4 |
|pubsub.movim.eu |jesus-christ-son-of-god|the-passion-of-christ-redemption-and-salvation-for-all-who-believe-moSqXO|
|pubsub.woodpeckersnest.space|PlanetJabber | |
|pubsub.woodpeckersnest.space|xmpp-it | |
|pubsub%40sure.im |news | |
#### To view pubsub nodes
```
2024-07-12 17:33:51 +02:00
http://127.0.0.1:8000/opml?pubsub=news.movim.eu
http://127.0.0.1:8000/opml?pubsub=pubsub.woodpeckersnest.space
2024-07-12 17:27:21 +02:00
```
2024-07-08 23:26:18 +02:00
2024-07-09 14:29:22 +02:00
#### To view node items
2024-07-08 23:26:18 +02:00
2024-07-09 15:54:37 +02:00
```
http://127.0.0.1:8000/atom?pubsub=edhelas%40movim.eu& node=urn%3Axmpp%3Amicroblog%3A0
http://127.0.0.1:8000/atom?pubsub=news.movim.eu& node=Phoronix
http://127.0.0.1:8000/atom?pubsub=pubsub.movim.eu& node=berlin-xmpp-meetup
2024-07-12 17:27:21 +02:00
http://127.0.0.1:8000/atom?pubsub=pubsub.movim.eu& node=jesus-christ-son-of-god
http://127.0.0.1:8000/atom?pubsub=pubsub.woodpeckersnest.space& node=PlanetJabber
http://127.0.0.1:8000/atom?pubsub=pubsub.woodpeckersnest.space& node=xmpp-it
2024-07-10 05:10:55 +02:00
http://127.0.0.1:8000/atom?pubsub=pubsub%40sure.im& node=news
2024-07-09 15:54:37 +02:00
```
2024-07-08 23:26:18 +02:00
2024-07-09 14:29:22 +02:00
#### To view a node item
2024-07-08 23:26:18 +02:00
2024-07-09 15:54:37 +02:00
```
http://127.0.0.1:8000/atom?pubsub=blog.jmp.chat& node=urn%3Axmpp%3Amicroblog%3A0& item=launch-2023
http://127.0.0.1:8000/atom?pubsub=edhelas%40movim.eu& node=urn%3Axmpp%3Amicroblog%3A0& item=working-on-launching-the-movim-network-qPBzwc
http://127.0.0.1:8000/atom?pubsub=goffi%40goffi.org& node=urn%3Axmpp%3Amicroblog%3A0& item=libervia-v0-8-la-cecilia-BdQ4
http://127.0.0.1:8000/atom?pubsub=pubsub.movim.eu& node=berlin-xmpp-meetup& item=7363a41d-1146-40b3-ac0f-8ee2559591a3
http://127.0.0.1:8000/atom?pubsub=pubsub.movim.eu& node=berlin-xmpp-meetup& item=let-s-talk-about-the-xsf-and-possibly-other-things-6A8eV4
2024-07-12 17:27:21 +02:00
http://127.0.0.1:8000/atom?pubsub=pubsub.movim.eu& node=jesus-christ-son-of-god& item=the-passion-of-christ-redemption-and-salvation-for-all-who-believe-moSqXO
2024-07-09 15:54:37 +02:00
```
2024-07-08 23:26:18 +02:00
2024-07-10 05:27:05 +02:00
## Supported XEPs
- [XEP-0060: Publish-Subscribe ](https://xmpp.org/extensions/xep-0060.html )
2024-07-14 11:35:59 +02:00
- [XEP-0277: Microblogging over XMPP ](https://xmpp.org/extensions/xep-0277.html )
2024-07-10 05:27:05 +02:00
- [XEP-0472: Pubsub Social Feed ](https://xmpp.org/extensions/xep-0472.html )
2024-07-08 23:26:18 +02:00
## Author
Schimon Jehudah Zackary
## License
CSS and XSLT stylesheets are licensed under the license MIT.
2024-07-08 23:33:48 +02:00
JS scripts are licensed under the license MIT.
2024-07-08 23:26:18 +02:00
Python code is licensed under the license AGPL-3.0 only.
## Acknowledgement
2024-11-12 14:25:05 +01:00
Thank you to Mr. Peter Saint-Andre ([stpeter](https://stpeter.im/journal/731.html))
for manifesting [Atom Over XMPP ](https://www.ietf.org/archive/id/draft-saintandre-atompub-notify-07.html ).
2024-07-09 19:55:57 +02:00
2024-11-12 14:25:05 +01:00
Thank you to Mr. Wojtek and [Tigase ](https://tigase.org/ ) for publicly exposing
an implementation of PubSub as Syndication at [Sure.IM ](https://sure.im/ ) as
[feeds.tigase.im ](http://feeds.tigase.im/atom?server=pubsub@sure.im&node=news ).
2024-07-10 04:51:09 +02:00
2024-11-12 14:25:05 +01:00
Thank you to to Mr. Timothée Jaussoin ([edhelas](https://edhelas.movim.eu/)) who
consistently and earnestly showcases the potential of PubSub as a publication
platform with project [Movim ](https://movim.eu/ ).
2024-07-10 04:51:09 +02:00
2024-11-12 14:25:05 +01:00
A special thank you to the gentlemen "d3x" and "cchianel" from IRC channel
#python on irc.libera.chat for initial references concerning code, servers and
FastAPI.
2024-07-10 04:51:09 +02:00
2024-11-12 14:25:05 +01:00
And an important thank you to Mr. Simone Canaletti
([roughnecks](https://blog.woodpeckersnest.space)) for testing and deploying
Rivista into production.
2024-07-08 23:26:18 +02:00
## Similar Projects
2024-11-12 14:25:05 +01:00
* [AtomEntry ](https://github.com/tigase/sureim/blob/master/site/src/main/java/tigase/sure/web/site/client/pubsub/AtomEntry.java )
and [PubSubPublishViewImpl ](https://github.com/tigase/sureim/blob/master/site/src/main/java/tigase/sure/web/site/client/pubsub/PubSubPublishViewImpl.java ) -
Convert XMPP Pubsub Nodes to Atom Syndication Format and convey them over HTTP.
* [AtomToPubsub ](https://github.com/edhelas/atomtopubsub ) - A little client that
parses Atom + RSS feeds and send them on XMPP Pubsub Nodes.
2024-07-08 23:26:18 +02:00
2024-11-12 14:25:05 +01:00
# Home site
- https://schapps.woodpeckersnest.eu/rivista/
- gemini://woodpeckersnest.space/~schapps/rivista.gmi