From 4c7d4de0322be52ead7408bb594ea254061bd4ef Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 31 May 2024 11:08:20 +0200 Subject: [PATCH] doc: style/typos/URL fixes --- doc/overview.rst | 27 +++++++++++-------- .../backend/plugins/plugin_pubsub_cache.py | 16 +++++------ 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/doc/overview.rst b/doc/overview.rst index e193b0e5..7c082a57 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -157,7 +157,10 @@ parameters) even if this is not usual. On a Libervia installation used by a single user, the profiles are usually used for multiple accounts. On a multi-users installations, there is usually one profile per user. -When you connect to a Libervia frontend, you need to specify a profile and the associated password. The profile password is not the same as the password of the XMPP account. While this may sounds confusing, there are several reason why we use this notion of profile instead of directly the XMPP account/password: +When you connect to a Libervia frontend, you need to specify a profile and the associated +password. The profile password is not the same as the password of the XMPP account. While +this may sounds confusing, there are several reason why we use this notion of profile +instead of directly the XMPP account/password: - Libervia needs to know the plain XMPP password to connect, and it is encrypted in database. The profile password is used to encrypt/decrypt it, this way only a `password hash`_ is @@ -178,8 +181,8 @@ When you connect to a Libervia frontend, you need to specify a profile and the a whole XMPP identifier (also named "JID" for *Jabber ID*) You always have a *default* profile which is the profile used when you don't select any -(notably used in jp). This is the first profile that you have created except if you have -changed it using a frontend (you can change it with jp). +(notably used in Libervia CLI). This is the first profile that you have created except if +you have changed it using a frontend (you can change it with Libervia CLI). .. _password hash: https://en.wikipedia.org/wiki/Key_derivation_function .. _at rest: https://en.wikipedia.org/wiki/Data_at_rest @@ -219,17 +222,19 @@ Most of the frontends use images or other media. To avoid duplication and to mak repositories lighter, those media are grouped in a separate repository. The Libervia media repository is available at https://repos.goffi.org/sat_media. You can also download media at https://ftp.goffi.org/sat_media/sat_media.tar.bz2. The path where Libervia media are -installed must be specified in ``libervia.conf`` in ``media_dir`` option of the ``[DEFAULT`` +installed must be specified in ``libervia.conf`` in ``media_dir`` option of the ``[DEFAULT]`` section. Libervia Templates ------------------ -Libervia embeds a `Jinja2`_ template engine (see `Libervia Web`_ above). "Libervia templates" refers to -the default templates (i.e. the official templates, the ones used in default Libervia pages). Those template may also be used by other frontends than Libervia (jp can use them with the :ref:`libervia-cli_output` arguments). +Libervia embeds a `Jinja2`_ template engine (see `Libervia Web`_ above). "Libervia +templates" refers to the default templates (i.e. the official templates, the ones used in +default Libervia pages). Those template may also be used by other frontends than Libervia +(Libervia CLI can use them with the :ref:`libervia-cli_output` arguments). -Libervia templates repository is available at https://repos.goffi.org/sat_templates, they can -also be downloaded at `PyPI `_ and will be +Libervia templates repository is available at https://repos.goffi.org/libervia-templates, they can +also be downloaded at `PyPI `_ and will be installed automatically if you install Libervia. Related projects @@ -244,8 +249,8 @@ Libervia PubSub Numerous features of Libervia are taking profit of `PubSub`_ functionalities of XMPP. Because PubSub implementations in the wild are not all on the same level, and some experimental features are sometimes explored, a PubSub service as been written -specifically for the needs of Libervia (but it's not depending on Libervia and any XMPP software can -use it). +specifically for the needs of Libervia (but it's not depending on Libervia and any XMPP +software can use it). Libervia PubSub aims to be a feature complete, server-independent PubSub implementation, and try to be up-to-date with latest XMPP PubSub extensions. It is the privileged service to @@ -299,7 +304,7 @@ modules to use Libervia PubSub as a PEP service. Libervia official website ------------------------- -The official website is made with Libervia web framework. You'll find it at https://repos.goffi.org/sat_web_site +The official website is made with Libervia web framework. You'll find it at https://repos.goffi.org/libervia-website Salut ----- diff --git a/libervia/backend/plugins/plugin_pubsub_cache.py b/libervia/backend/plugins/plugin_pubsub_cache.py index 6434e733..baa5f6ca 100644 --- a/libervia/backend/plugins/plugin_pubsub_cache.py +++ b/libervia/backend/plugins/plugin_pubsub_cache.py @@ -136,33 +136,33 @@ class PubsubCache: (keys with a ``*`` are mandatory, at least one of ``node`` or ``namespace`` keys must be used): - :name (str)*: + name (str)* a unique name for this analyser. This name will be stored in database to retrieve the analyser when necessary (notably to get the parsing method), thus it is recommended to use a stable name such as the source plugin name instead of a name which may change with standard evolution, such as the feature namespace. - :type (str)*: + type (str)* indicates what kind of items we are dealing with. Type must be a human readable word, as it may be used in searches. Good types examples are **blog** or **event**. - :node (str): + node (str) prefix of a node name which may be used to identify its type. Example: - *urn:xmpp:microblog:0* (a node starting with this name will be identified as + *urnxmpp:microblog0* (a node starting with this name will be identified as *blog* node). - :namespace (str): + namespace (str) root namespace of items. When analysing a node, the first item will be retrieved. The analyser will be chosen its given namespace match the namespace of the first child element of ```` element. - :to_sync (bool): + to_sync (bool) if True, the node must be synchronised in cache. The default False value means that the pubsub service will always be requested. - :parser (callable): + parser (callable) method (which may be sync, a coroutine or a method returning a "Deferred") to call to parse the ``domish.Element`` of the item. The result must be dictionary which can be serialised to JSON. @@ -174,7 +174,7 @@ class PubsubCache: -> dict :noindex: - :match_cb (callable): + match_cb (callable) method (which may be sync, a coroutine or a method returning a "Deferred") called when the analyser matches. The method is called with the curreny analyse which is can modify **in-place**.