annotate doc/libervia-cli/pubsub_attachments.rst @ 4303:a7ec325246fb

component email-gateway: first draft: Initial implementation of the Email Gateway. This component uses XEP-0100 for registration. Upon registration and subsequent startups, a connection is made to registered IMAP services, and incoming emails (in `INBOX` mailboxes) are immediately forwarded as XMPP messages. In the opposite direction, an SMTP connection is established to send emails on incoming XMPP messages. rel 449
author Goffi <goffi@goffi.org>
date Fri, 06 Sep 2024 18:07:17 +0200
parents 8b76caa89aa0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3873
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 .. _libervia-cli_pubsub_attachments:
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
2
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 =======================================================
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 pubsub/attachments: (Un)Attach Metadata to Pubsub Items
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 =======================================================
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
6
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 ``attachments`` is a subcommand grouping all pubsub commands related to "pubsub
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 attachments" specification.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
9
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 With them, you can (un)attach data to any pubsub item. This is notably used to handle
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 data like saying if an item is (un)noticed, or add emoji reactions.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
12
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 get
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 ===
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
15
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 Retrieve a list of all attached data to an item.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
17
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 By default all attachments of the item are returned, this can be filtered by using ``-j
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 JIDS, --jid JIDS``
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
20
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 example
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 -------
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
23
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 Louise check all attachments on her last blog post::
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
25
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 $ li pubsub attachments get -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
27
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
28 set
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
29 ===
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
30
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 Update or replace attachments. By default new attachments are updated, but if the ``-R,
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 --replace`` is used, new attachments replace the whole former one where it make sense. For
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 instance, ``-R`` doesn't change anything for ``noticed`` attachments, but it will replace
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 all reactions (potentially with no reaction at all), where the default behaviour is to
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 merge former and new reactions.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
36
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 Note that only specified attachments are affected, if unknown or unspecified attachments
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 exist, they will stay unmodified.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
39
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 For now, only ``noticed`` (to say that an element has been seen and taken into account)
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 and ``reactions`` (emojis to show emotion or other kind of reaction about something) are
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 managed.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
43
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 ``-N [BOOLEAN], --noticed [BOOLEAN]`` takes on optional argument to say if the item is
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 noticed or not. If the optional argument is not specified, if will be the same as if the
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 ``true`` value was used.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
47
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 examples
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 --------
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
50
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 Pierre wants to indicate to Louise that is has seen and he took into account her last blog post::
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
52
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
53 $ li pubsub attachments set -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0 -N
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
54
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 Louise wants to react to Pierre blog post about night trains::
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
56
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 $ li pubsub attachments set -s pierre@example.net -n urn:xmpp:microblog:0 -i nigh-train-are-great-f120 -r 🚆🌜💤