comparison doc/libervia-cli/event.rst @ 3909:3c3275a6dc8f

doc (cli/event): update doc following changes: rel 372
author Goffi <goffi@goffi.org>
date Thu, 22 Sep 2022 12:01:44 +0200
parents c80a0f864b5d
children 524856bd7b19
comparison
equal deleted inserted replaced
3908:d43b197735d1 3909:3c3275a6dc8f
3 ======================== 3 ========================
4 4
5 Event commands allows you to create/modify or get data about an event, and to manage your 5 Event commands allows you to create/modify or get data about an event, and to manage your
6 invitees. 6 invitees.
7 7
8 list 8 get
9 ==== 9 ===
10 10
11 List events available on a service 11 Get metadata about one or more event(s).
12
13 By default the events are displayed in a format readable, and ``--verbose, -v`` can be
14 used one or more times to show more or less data. As usual, :ref:`libervia-cli_output` can
15 be used to get the data in a different way.
12 16
13 example 17 example
14 ------- 18 -------
15 19
16 Retrieve events of profile:: 20 Retrieve events from personal agenda::
17 21
18 $ li event list 22 $ li event get
19 23
20 .. _libervia-cli_event_get: 24 Get details of a next dentist appointment from personal agenda::
21 25
22 get 26 $ li event get -i dentist -vv
23 ===
24
25 Get metadata about a specific event.
26
27 example
28 -------
29
30 Retrieve an event metadata::
31
32 $ li event get -n org.salut-a-toi.event:0__BsyCsXpcrRh44CQhSVTUMi -i 'org.salut-a-toi.event:0'
33 27
34 .. _libervia-cli_event_create: 28 .. _libervia-cli_event_create:
35 29
36 create 30 create
37 ====== 31 ======
38 32
39 Create a new event. You can specify the date of the event with ``-d DATE, --date DATE``, 33 Create a new event. You can specify the starting time of the event with ``-S TIME_PATTERN, --start TIME_PATTERN``, and either its end time with ``-E TIME_PATTERN, --end TIME_PATTERN`` or its duration with ``-D DURATION, --duration DURATION``. ``--start`` and ``--end`` use a full :ref:`time_pattern` when ``--duration`` uses the relative delta part of it. It's mandatory when creating and event to specify starting and ending time (or duration).
40 and an id with ``-i ID, --id ID`` (default id is used if omitted).
41 34
42 Configuration options are specified using ``-f KEY VALUE, --field KEY VALUE`` where key 35 If your organsise an item, the ``--rsvp`` flag should be used: it will use the default
43 can be a custom data or one of: 36 RSVP form which ask for attendance. If you want to request more information to your guest,
37 ``--rsvp_json JSON`` can be used: the JSON argument is a data dict as described in
38 ``dataDict2dataForm`` function where the ``namespace`` key is not necessary (it's set
39 automatically):
44 40
45 name 41 .. autofunction:: sat.tools.xml_tools.dataDict2dataForm
46 name of the event 42
47 description 43 If the event links to an other one, ``--external JID NODE ITEM`` can be user
48 details of the event
49 image
50 URL of the main picture of the event
51 background-image
52 URL of image to use as background
53 register
54 a boolean value, set to ``true`` if you want to register the event in your local list
55 44
56 example 45 example
57 ------- 46 -------
58 47
59 Create an event about to celebrate New Year:: 48 Create an event about to celebrate New Year::
60 49
61 $ li event create -d 2019-12-31 -f name "New Year's Eve" -f description "Party to celebrate new year" -f register true -f image https://example.net/some_image.jpg 50 $ li event create -s some_pubsub@example.net -n urn:xmpp:events:0/party -i new_year_eve_2022 --start 2022-12-31 --end 2023-01-01 -d "Party to celebrate new year" -H https://example.net/some_image.jpg "New Year's Eve"
51
52 Add the dentist appointement on coming Tuesday to our personal agenda::
53
54 $ li event create -S tuesday -D "1 hour" Dentist
62 55
63 56
64 modify 57 modify
65 ====== 58 ======
66 59
67 This command in the same way as libervia-cli_event_create_ but modify an existing event. You need to 60 This command works in the same way as libervia-cli_event_create_ but modify an existing
68 specify the node of the event to modify using ``-n NODE, --node NODE``. 61 event: all arguments are optional, those specified will override the original ones from
62 the updated event.
63
64 If the ending time or duration must be modified, the starting must be specified again.
69 65
70 example 66 example
71 ------- 67 -------
72 68
73 Add a background image to the New Year event created above:: 69 Change the head picture from the New Year event created above::
74 70
75 $ li event modify -n org.salut-a-toi.event:0__d8QQLJvbcpDXxK66UBXKfT -f background-image https://example.net/some_background_image.jpg 71 $ li event modify -s some_pubsub@example.net -n urn:xmpp:events:0/party -i new_year_eve_2022 -H https://example.net/some_other_image.jpg
76 72
77 73
78 invitee 74 invitee
79 ======= 75 =======
80 76