comparison doc/jp/pubsub_node.rst @ 3041:72583524cfd3

doc (jp): jp commands are now fully documented: rel 232
author Goffi <goffi@goffi.org>
date Tue, 01 Oct 2019 22:49:06 +0200
parents
children cea52c9ddfd9
comparison
equal deleted inserted replaced
3040:fee60f17ebac 3041:72583524cfd3
1 .. _jp-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:`jp-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 $ jp pubsub node info -n urn:xmpp:microblog:0
21
22 Only print ``access_model`` and ``publish_model``::
23
24 $ jp pubsub node info -n urn:xmpp:microblog:0 -k access_model -k publish_model
25
26 create
27 ======
28
29 Create a node. Node configuration can be specified using ``-f KEY VALUE, --field KEY
30 VALUE`` where ``KEY`` is a pubsub option. By default the ``pubsub#`` prefix will be
31 appended, as it is used with standard options (see `XEP-0060`_ for more details); to
32 change this behaviour, use the ``-F, --full-prefix`` flag.
33
34 .. _XEP-0060: https://xmpp.org/extensions/xep-0060.html
35
36 example
37 --------
38
39 Create a node called ``notes`` with a ``whitelist`` access model (so only you and people
40 you may authorize later can access it)::
41
42 $ jp pubsub node create -n notes
43
44 purge
45 =====
46
47 Remove all items from a node (but don't delete the node).
48
49 A confirmation is requested by default, you can override this behaviour by using ``-f, --force`` option.
50
51 example
52 -------
53
54 Remove all items from a blog comments node (in other words, removing all comments while
55 letting the node so people can add new comments)::
56
57 $ jp pubsub node purge -n "urn:xmpp:microblog:0:comments/123-456-789"
58
59 delete
60 ======
61
62 Delete a node (note that this will delete definitively all items that where published to
63 this node).
64
65 A confirmation is requested by default, you can override this behaviour by using ``-f, --force`` option.
66
67 example
68 -------
69
70 Delete the ``temporary_notes`` node::
71
72 $ jp pubsub node delete -n temporary_notes
73
74 set
75 ===
76
77 Update a node configuration.
78
79 Configuration options are specified using ``-f KEY VALUE, --field KEY VALUE`` argument
80 where ``KEY`` is a PubSub option. If ``KEY`` doesn't start with ``pubsub#`` prefix, it is
81 added automatically, except if ``-F, --full-prefix`` argument is used (in which case the
82 ``KEY`` is used as specified.
83
84 example
85 -------
86
87 Make the ``public_notes`` node accessible to the world::
88
89 $ jp pubsub node set -n public_notes -f access_model open
90
91 import
92 ======
93
94 Import a raw XML containing items to create in the node. The path to the XML file is used
95 as positional argument.
96
97 The XML file must contain full `<item>` element for each item to import. The output of ``pubsub get`` can be used directly.
98
99 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.
100
101 example
102 -------
103
104 Import a node backup which has previously been saved using ``jp blog get -M -1 -n
105 some_node > some_node_backup.xml``::
106
107 $ jp pubsub node import -n some_node ~/some_node_backup.xml
108
109 .. note::
110
111 If your node is big, -M 1 option is not adapted as it will get all items at once and
112 may be blocked by your server stanza size limit. The possibility to use RSM to
113 retrieve all items by pages is planned in a future version.
114
115 affiliations
116 ============
117
118 Subcommands for node affiliations management. Please check :ref:`jp-pubsub_node_affiliations`.
119
120 subscriptions
121 =============
122
123 Subcommands for node subscriptions management. Please check
124 :ref:`jp-pubsub_node_subscriptions`.