Mercurial > libervia-backend
comparison doc/libervia-cli/pubsub_node.rst @ 3488:c80a0f864b5d
doc: updated doc following global renaming
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 21 Mar 2021 18:23:58 +0100 |
parents | doc/jp/pubsub_node.rst@cea52c9ddfd9 |
children | 524856bd7b19 |
comparison
equal
deleted
inserted
replaced
3487:75427f0a5445 | 3488:c80a0f864b5d |
---|---|
1 .. _libervia-cli_pubsub_node: | |
2 | |
3 ==================================== | |
4 pubsub/node: PubSub nodes management | |
5 ==================================== | |
6 | |
7 ``node`` is a subcommands grouping all PubSub commands related to node management. For | |
8 details on ``pubsub`` command itself, refer to :ref:`libervia-cli_pubsub`. | |
9 | |
10 info | |
11 ==== | |
12 | |
13 Get settings of the node. Use ``-k KEYS, --key KEYS`` to select data to print. | |
14 | |
15 examples | |
16 -------- | |
17 | |
18 Get informations on our personal microblog node:: | |
19 | |
20 $ li pubsub node info -n urn:xmpp:microblog:0 | |
21 | |
22 Only print ``access_model`` and ``publish_model``:: | |
23 | |
24 $ li pubsub node info -n urn:xmpp:microblog:0 -k access_model -k publish_model | |
25 | |
26 .. _libervia-cli_pubsub_node_create: | |
27 | |
28 create | |
29 ====== | |
30 | |
31 Create a node. Node configuration can be specified using ``-f KEY VALUE, --field KEY | |
32 VALUE`` where ``KEY`` is a pubsub option. By default the ``pubsub#`` prefix will be | |
33 appended, as it is used with standard options (see `XEP-0060`_ for more details); to | |
34 change this behaviour, use the ``-F, --full-prefix`` flag. | |
35 | |
36 .. _XEP-0060: https://xmpp.org/extensions/xep-0060.html | |
37 | |
38 example | |
39 -------- | |
40 | |
41 Create a node called ``notes`` with a ``whitelist`` access model (so only you and people | |
42 you may authorize later can access it):: | |
43 | |
44 $ li pubsub node create -n notes | |
45 | |
46 purge | |
47 ===== | |
48 | |
49 Remove all items from a node (but don't delete the node). | |
50 | |
51 A confirmation is requested by default, you can override this behaviour by using ``-f, --force`` option. | |
52 | |
53 example | |
54 ------- | |
55 | |
56 Remove all items from a blog comments node (in other words, removing all comments while | |
57 letting the node so people can add new comments):: | |
58 | |
59 $ li pubsub node purge -n "urn:xmpp:microblog:0:comments/123-456-789" | |
60 | |
61 delete | |
62 ====== | |
63 | |
64 Delete a node (note that this will delete definitively all items that where published to | |
65 this node). | |
66 | |
67 A confirmation is requested by default, you can override this behaviour by using ``-f, --force`` option. | |
68 | |
69 example | |
70 ------- | |
71 | |
72 Delete the ``temporary_notes`` node:: | |
73 | |
74 $ li pubsub node delete -n temporary_notes | |
75 | |
76 set | |
77 === | |
78 | |
79 Update a node configuration. | |
80 | |
81 Configuration options are specified using ``-f KEY VALUE, --field KEY VALUE`` argument | |
82 where ``KEY`` is a PubSub option. If ``KEY`` doesn't start with ``pubsub#`` prefix, it is | |
83 added automatically, except if ``-F, --full-prefix`` argument is used (in which case the | |
84 ``KEY`` is used as specified. | |
85 | |
86 example | |
87 ------- | |
88 | |
89 Make the ``public_notes`` node accessible to the world:: | |
90 | |
91 $ li pubsub node set -n public_notes -f access_model open | |
92 | |
93 import | |
94 ====== | |
95 | |
96 Import a raw XML containing items to create in the node. The path to the XML file is used | |
97 as positional argument. | |
98 | |
99 The XML file must contain full `<item>` element for each item to import. The output of ``pubsub get`` can be used directly. | |
100 | |
101 If you want to change publisher of one or more items (i.e. if you want to use an other ``jid`` than the jid of the profile as publisher), you must use the ``--admin`` arguments. This needs a PubSub service supporting this feature (and you must of course be an administrator of this service). The new publisher must be allowed to publish to the node. | |
102 | |
103 example | |
104 ------- | |
105 | |
106 Import a node backup which has previously been saved using ``li blog get -M -1 -n | |
107 some_node > some_node_backup.xml``:: | |
108 | |
109 $ li pubsub node import -n some_node ~/some_node_backup.xml | |
110 | |
111 .. note:: | |
112 | |
113 If your node is big, -M 1 option is not adapted as it will get all items at once and | |
114 may be blocked by your server stanza size limit. The possibility to use RSM to | |
115 retrieve all items by pages is planned in a future version. | |
116 | |
117 affiliations | |
118 ============ | |
119 | |
120 Subcommands for node affiliations management. Please check :ref:`libervia-cli_pubsub_node_affiliations`. | |
121 | |
122 subscriptions | |
123 ============= | |
124 | |
125 Subcommands for node subscriptions management. Please check | |
126 :ref:`libervia-cli_pubsub_node_subscriptions`. |