annotate doc/libervia-cli/blog.rst @ 4177:0f1a4ffcd419

doc (cli/blog): Document new `--alt-link` option
author Goffi <goffi@goffi.org>
date Tue, 05 Dec 2023 13:14:55 +0100
parents 6929dabf3a7e
children cf0ea77f9537
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 .. highlight:: sh
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
2
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 ================================
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 blog: (micro)blogging management
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 ================================
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
6
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 Blog commands are high level tools to handle an XMPP blog.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 They are using the generic pubsub arguments
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
9
4174
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
10
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
11 .. _libervia_cli_blog_common_pub:
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
12
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
13 Common Publishing Options
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
14 =========================
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
15
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
16 The `set` and `edit` commands support a range of options for customizing blog post creation and editing. Some notable options include:
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
17
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
18 ``--no-id-suffix``
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
19
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
20 This option removes the randomly generated suffix from the auto-generated, user-friendly ID. The suffix is initially added to ensure unique IDs, especially useful when two posts have similar titles. Use this option with caution, as it may lead to ID conflicts and potential overwriting of existing posts.
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
21
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
22 .. warning::
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
23
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
24 Use this option judiciously to avoid unintended overwriting of blog posts.
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
25
4177
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
26 ``--alt-link URL [MEDIA_TYPE]``
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
27
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
28 Add an alternative link to a blog post, such as a corresponding HTTP page. The *URL*
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
29 parameter is mandatory, while *MEDIA_TYPE* is optional. Incorporate ``{service}``,
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
30 ``{node}``, and ``{item}`` as template values within the URL. These will be replaced
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
31 with the actual values when the item is published. To use curly braces literally,
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
32 double them: ``{{`` and ``}}``.
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
33
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
34 example
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
35 -------
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
36
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
37 Louise wants to add a link to her public facing HTML blog in her item::
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
38
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
39 $ li blog set --alt-link https://example.org/blog/{node}/{item}
0f1a4ffcd419 doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents: 4174
diff changeset
40
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 set
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 ===
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
43
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 publish a blog item.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
45
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 :ref:`pubsub_common` commands are used to specify the destination item.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
47
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 ``stdin`` is used to get the body of the blog post.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
49
4174
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
50 Also see :ref:`libervia_cli_blog_common_pub`.
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
51
3951
4b8776eb6826 doc (blog, pubsub): documentation on new e2ee arguments for pubsub, and shared secrets handling:
Goffi <goffi@goffi.org>
parents: 3873
diff changeset
52 |e2e_arg|
4b8776eb6826 doc (blog, pubsub): documentation on new e2ee arguments for pubsub, and shared secrets handling:
Goffi <goffi@goffi.org>
parents: 3873
diff changeset
53
3975
c4418949aa37 doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents: 3966
diff changeset
54 |pte_arg|
c4418949aa37 doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents: 3966
diff changeset
55
3966
9f85369294f3 doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents: 3951
diff changeset
56 |sign_arg|
9f85369294f3 doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents: 3951
diff changeset
57
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
58 examples
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
59 --------
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
60
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
61 Create a blog post with a body, a subject, 2 tags, and with comments allowed::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
62
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
63 $ echo "This is post body" | li blog set -T "This is a test message" -t test -t li -C
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
64
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
65 Create a blog post with rich content using `markdown` syntax, and no subject::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
66
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
67 $ echo "This is a **rich** body" | li blog set -S markdown
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
68
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
69 get
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
70 ===
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
71
2954
5e72efd2f95d doc: minor fixes + use ".pot" extension instead of ".po" for template in README4TRANSLATORS
Goffi <goffi@goffi.org>
parents: 2946
diff changeset
72 get command retrieves one or more blog post(s) from specified location (by default the
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
73 personal blog of the profile).
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
74
3021
8ec35cf13f66 doc: added, overview, configuration and Primitivus documentation + some small modifications
Goffi <goffi@goffi.org>
parents: 2999
diff changeset
75 output can be customised to only retrieve some keys, or to use a specific template. For
8ec35cf13f66 doc: added, overview, configuration and Primitivus documentation + some small modifications
Goffi <goffi@goffi.org>
parents: 2999
diff changeset
76 instance, the following command retrieves only the title and publication date of the
8ec35cf13f66 doc: added, overview, configuration and Primitivus documentation + some small modifications
Goffi <goffi@goffi.org>
parents: 2999
diff changeset
77 personal blog of the profile::
8ec35cf13f66 doc: added, overview, configuration and Primitivus documentation + some small modifications
Goffi <goffi@goffi.org>
parents: 2999
diff changeset
78
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
79 $ li blog get -k title -k published
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
80
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
81 :ref:`pubsub_common` commands are used to specify the blog location.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
82
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
83 examples
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
84 --------
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
85
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
86 Retrieve personal blog of the profile using `fancy` output with a verbosity of 1 (to show
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
87 publication date)::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
88
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
89 $ li blog get -O fancy -v
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
90
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
91 Retrieve *title* and *publication date* of last 3 blog posts from the blog at
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
92 https://www.goffi.org::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
93
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
94 $ li blog get -m 3 -u https://www.goffi.org -k title -k published
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
95
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
96 Retrieve last 2 posts of personal blog, and output them in browser using default
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
97 template::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
98
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
99 $ li blog get -m 2 -O template --oo browser
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
100
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
101 .. _libervia-cli_blog_edit:
3041
72583524cfd3 doc (jp): jp commands are now fully documented:
Goffi <goffi@goffi.org>
parents: 3021
diff changeset
102
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
103 edit
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
104 ====
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
105
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
106 With edit command you can create a new blog post or modify an existing one using your
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
107 local editor (the one set in ``$EDITOR``). You'll edit 2 things: the body of the post, and
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
108 the metadata which contain things like title, comments infos, or tags.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
109
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
110 For some common editors (like **vim** or **Emacs**), the editor will be automatially
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
111 opened using a split screen with *body* in one side, and metadata on the other. If the
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
112 editor is not supported or doesn't support split screen, you'll edit first the *body*, then
3536
0985c47ffd96 doc: config file is now `libervia.conf` (even if `sat.conf` still works, for now)
Goffi <goffi@goffi.org>
parents: 3488
diff changeset
113 the *metadata*. You can also specify editor and arguments in ``libervia.conf``, see
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
114 `configuration <edit_conf_>`_ below
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
115
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
116 If you don't change anything or publish an empty blog post, the edition will be cancelled.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
117
3177
f4914ce9d47d jp (blog/edit): added `--no-publish` argument.
Goffi <goffi@goffi.org>
parents: 3041
diff changeset
118 In the metadata (see `below <edit_metadata_>`_ for details), you can use ``"publish":
f4914ce9d47d jp (blog/edit): added `--no-publish` argument.
Goffi <goffi@goffi.org>
parents: 3041
diff changeset
119 false`` to forbid the publication (or set it with ``--no-publish argument``). In this
f4914ce9d47d jp (blog/edit): added `--no-publish` argument.
Goffi <goffi@goffi.org>
parents: 3041
diff changeset
120 case, when you'll save your modification and quit your editor, the blog post will not be
f4914ce9d47d jp (blog/edit): added `--no-publish` argument.
Goffi <goffi@goffi.org>
parents: 3041
diff changeset
121 published but saved locally in a draft. To continue your work later, just start your
f4914ce9d47d jp (blog/edit): added `--no-publish` argument.
Goffi <goffi@goffi.org>
parents: 3041
diff changeset
122 edition with the ``-D, --current`` option like this::
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
123
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
124 $ li blog edit -D
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
125
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
126 Note that item location must be re-specified if it has been used to create the draft, so
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
127 you'll have to reproduce the arguments to specify service, node or item (or the URL),
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
128 other data like tags will be restored from draft file of metadata.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
129
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
130 You can specify the syntax by using ``-S SYNTAX, --syntax SYNTAX``. If not specified, the
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
131 syntax set in your parameters will be used.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
132
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
133 When you edit a blog post, it is often useful to activate the ``-P, --preview`` option,
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
134 this will launch a web browser and refresh the page each time you save a modification in
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
135 your editor. By default, the browser registered as default in your system will be used,
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
136 and a new tab will be opened on each modification. This is not ideal, and we recommand to
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
137 set you configuration to activate automatic refreshing of the page instead, see `preview
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
138 configuration <edit_preview_>`_ below to see how to do.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
139
2999
85d8e9a7284b doc (jp/blog): added note for --preview
Goffi <goffi@goffi.org>
parents: 2996
diff changeset
140 .. note::
85d8e9a7284b doc (jp/blog): added note for --preview
Goffi <goffi@goffi.org>
parents: 2996
diff changeset
141
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
142 If --preview doesn't work, use ``li blog preview`` (see below) to get error messages.
2999
85d8e9a7284b doc (jp/blog): added note for --preview
Goffi <goffi@goffi.org>
parents: 2996
diff changeset
143 On GNU/Linux, Be sure that inotify Python module is installed correctly.
85d8e9a7284b doc (jp/blog): added note for --preview
Goffi <goffi@goffi.org>
parents: 2996
diff changeset
144
4174
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
145 Also see :ref:`libervia_cli_blog_common_pub`.
6929dabf3a7e doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents: 4037
diff changeset
146
3951
4b8776eb6826 doc (blog, pubsub): documentation on new e2ee arguments for pubsub, and shared secrets handling:
Goffi <goffi@goffi.org>
parents: 3873
diff changeset
147 |e2e_arg|
4b8776eb6826 doc (blog, pubsub): documentation on new e2ee arguments for pubsub, and shared secrets handling:
Goffi <goffi@goffi.org>
parents: 3873
diff changeset
148
3975
c4418949aa37 doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents: 3966
diff changeset
149 |pte_arg|
c4418949aa37 doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents: 3966
diff changeset
150
3966
9f85369294f3 doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents: 3951
diff changeset
151 |sign_arg|
9f85369294f3 doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents: 3951
diff changeset
152
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
153 examples
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
154 --------
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
155
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
156 Edit a new blog post with comments on your personal blog, using default syntax and preview::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
157
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
158 $ li blog edit -P --comments
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
159
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
160 Modifiy a draft previously saved using the ``"publish": false`` metadata::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
161
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
162 $ li blog edit -D
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
163
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
164 Correct a typo in your last published blog post::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
165
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
166 $ li blog edit --last-item
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
167
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
168 Edit the blog item at an HTTPS URL using XHTML syntax::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
169
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
170 $ li blog edit -u https://www.example.net/some_xmpp_blog_article.html -S xhtml
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
171
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
172 Create a new blog post on a XMPP blog node using its HTTPS URL (supposing here that
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
173 https://example.net is a XMPP blog node)::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
174
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
175 $ li blog edit -u https://www.example.net
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
176
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
177 .. _edit_metadata:
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
178
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
179 metadata
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
180 --------
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
181
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
182 Metadata is set using a JSON object. The key you can use are:
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
183
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
184 publish
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
185 boolean indicating if item can be published. Set to ``false`` if you want to work on a
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
186 draft and to avoid accidental publication.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
187
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
188 atom_id
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
189 atom entry identifier. This should not be modified manually.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
190
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
191 published
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
192 time of initial publication (unix time). This should not be modified manually.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
193
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
194 language
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
195 language of the content
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
196
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
197 comments
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
198 array of URIs to the comments node, if any.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
199
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
200 tag
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
201 array of tags, if any
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
202
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
203 author
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
204 human readable name of the entry author
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
205
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
206 author_jid
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
207 jid of the author. This should notbe modified manually.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
208
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
209 author_jid_verified
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
210 true if the pubsub service confirmed that author_jid is the one of the publisher. It is
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
211 useless to modify this variable.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
212
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
213 title
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
214 the title of the message
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
215
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
216 title_rich
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
217 the rich title of the message, in current text syntax. It will be automatically
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
218 converted to xhtml.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
219
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
220 .. _edit_conf:
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
221
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
222 configuration
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
223 -------------
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
224
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
225 editor
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
226 ^^^^^^
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
227
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
228 Local editor used is by default the one set in ``$EDITOR`` environment variable, but you
3536
0985c47ffd96 doc: config file is now `libervia.conf` (even if `sat.conf` still works, for now)
Goffi <goffi@goffi.org>
parents: 3488
diff changeset
229 can specify one in ``libervia.conf``. To do so, you have to set the name of an editor
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
230 executable in the ``editor`` option in ``[li]`` section.
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
231
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
232 You can specify the args to use by using ``blog_editor_args`` option. Use
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
233 ``{content_file}`` to get the path of the main content file (the body of the blog post),
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
234 and ``{metadata_file}`` to get the path of the json metadata.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
235
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
236 .. sourcecode:: cfg
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
237
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
238 [li]
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
239 editor = kate
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
240 blog_editor_args = {content_file} {metadata_file}
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
241
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
242 .. _edit_preview:
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
243
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
244 preview
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
245 ^^^^^^^
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
246
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
247 To set the preview, you can use the options ``blog_preview_open_cmd`` and
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
248 ``blog_preview_update_cmd`` in your ``[li]`` section. the former is the command to use to
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
249 open your browser when edition starts, and the later is the command to use when a
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
250 modification is saved. In both cases you may use ``{url}`` to set the location of local HTML file.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
251
2954
5e72efd2f95d doc: minor fixes + use ".pot" extension instead of ".po" for template in README4TRANSLATORS
Goffi <goffi@goffi.org>
parents: 2946
diff changeset
252 This can be used to activate automatic refreshing of the page.
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
253
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
254 For **Konqueror**, you can use its D-Bus API to do refreshing. Ensure that ``qdbus`` is
3536
0985c47ffd96 doc: config file is now `libervia.conf` (even if `sat.conf` still works, for now)
Goffi <goffi@goffi.org>
parents: 3488
diff changeset
255 installed on your system, and enter the following lines in your ``libervia.conf``:
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
256
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
257 .. sourcecode:: cfg
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
258
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
259 [li]
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
260 blog_preview_open_cmd = konqueror {url}
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
261 blog_preview_update_cmd = /bin/sh -c "qdbus $(qdbus org.kde.konqueror\*) /konqueror/MainWindow_1 reload"
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
262
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
263 For **Firefox**, you may use ``xdotool`` on X11. Once you have installed this tool, enter the
3536
0985c47ffd96 doc: config file is now `libervia.conf` (even if `sat.conf` still works, for now)
Goffi <goffi@goffi.org>
parents: 3488
diff changeset
264 following lines in your ``libervia.conf``:
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
265
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
266 .. sourcecode:: cfg
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
267
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
268 [li]
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
269 blog_preview_open_cmd = firefox -new-tab {url}
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
270 blog_preview_update_cmd = /bin/sh -c "WID=$(xdotool search --name 'Mozilla Firefox' | head -1); xdotool windowactivate $WID; xdotool key F5"
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
271
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
272 This *xdotool* technique can be adapted to other browsers.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
273
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
274 syntax extensions
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
275 ^^^^^^^^^^^^^^^^^^
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
276
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
277 A dictionary with a mapping from syntax name to file extension can be used. This can be
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
278 useful to activate the right syntax highlighting in your editor. There is a default
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
279 mapping which can be overriden.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
280
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
281 The mapping is set in the ``syntax_ext_dict`` option of the ``[li]`` section of your
3536
0985c47ffd96 doc: config file is now `libervia.conf` (even if `sat.conf` still works, for now)
Goffi <goffi@goffi.org>
parents: 3488
diff changeset
282 ``libervia.conf`` file. For instance, if your prefer do your ``.markdown`` for temp files
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
283 instead of the default ``.md``, you can use this:
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
284
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
285 .. sourcecode:: cfg
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
286
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
287 [li]
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
288 syntax_ext_dict = {"markdown": "markdown"}
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
289
2954
5e72efd2f95d doc: minor fixes + use ".pot" extension instead of ".po" for template in README4TRANSLATORS
Goffi <goffi@goffi.org>
parents: 2946
diff changeset
290 the first ``markdown`` is the name of the syntax (could be an other syntax like ``xhtml``),
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
291 while the second if the file extension.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
292
3563
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
293 rename
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
294 ======
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
295
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
296 Move a item to a new ID. This works the same as :ref:`li-pubsub_rename`, the only
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
297 difference is that node defaults to microblog default namespace.
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
298
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
299 example
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
300 -------
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
301
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
302 After a typo, a use want to rename the blog item with ID ``my_great_tittle_123a`` to
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
303 ``my_great_title_123a``::
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
304
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
305 $ li blog rename -i my_great_tittle_123a my_great_title_123a
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
306
3872
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
307 repeat
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
308 ======
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
309
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
310 Re-publish a blog item on profile's blog.
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
311
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
312 This is similar to may be called in other networks "share" or "boot", the goal is mainly
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
313 to send this post of interest to our subscribers to make it more visible.
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
314
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
315 It only needs arguments to get item to repeat location.
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
316
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
317 example
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
318 -------
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
319
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
320 Pierre wants to repeat a blog post from Louise to make it more visible::
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
321
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
322 $ li blog repeat -s louise@example.org -n urn:xmpp:microblog:0 -i culture-new-caledonia-456f
76fb0739cc9c doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents: 3563
diff changeset
323
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
324 preview
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
325 =======
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
326
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
327 This command will show the specified file in browser, and refresh it when changes are
2954
5e72efd2f95d doc: minor fixes + use ".pot" extension instead of ".po" for template in README4TRANSLATORS
Goffi <goffi@goffi.org>
parents: 2946
diff changeset
328 detected. Configuration is the same as for `edit preview <edit_preview_>`_. This can be
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
329 used if you have already started an edition with ``li blog edit`` but forgot to use the ``-P, --preview`` arguments.
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
330
3563
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
331 example
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
332 -------
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
333
3563
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
334 Preview the draft at ``~/.local/share/libervia/blog/some_name/blog_something.md``::
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
335
3563
267e4987b58b doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents: 3536
diff changeset
336 $ li blog preview ~/.local/share/libervia/blog/some_name/blog_something.md
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
337
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
338 .. _libervia-cli_blog_import:
3041
72583524cfd3 doc (jp): jp commands are now fully documented:
Goffi <goffi@goffi.org>
parents: 3021
diff changeset
339
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
340 import
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
341 ======
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
342
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
343 With this command you can import an external blog in a XMPP blog at the specified pubsub
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
344 location.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
345
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
346 The import is done using an *importer* name and a *location* which depends of the importer
2996
afad95f257c7 doc (jp/blog): minor fix
Goffi <goffi@goffi.org>
parents: 2954
diff changeset
347 (it can be a path to a file, an URL to a blog, or something else). Let empty to get list
afad95f257c7 doc (jp/blog): minor fix
Goffi <goffi@goffi.org>
parents: 2954
diff changeset
348 of importers, and specify only importer name to get its description.
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
349
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
350 By default, found images are re-uploaded to XMPP server, if you want to keep original
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
351 URLs, use the ``--no-images-upload`` option.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
352
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
353 Alternatively, you can re-upload images except for a specific host with ``--upload-ignore-host UPLOAD_IGNORE_HOST``. The images for the specified host will keep there original URLs while other will be uploaded to XMPP server.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
354
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
355 You shoud specify original blog host using ``--host HOST`` argument, this is used notably
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
356 to reconstruct relative URLs of media.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
357
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
358 Importers may have specific options, you can set them using the ``-o NAME VALUE, --option NAME VALUE`` argument. Check the importer description for details.
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
359
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
360 examples:
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
361 ---------
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
362
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
363 List available importers::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
364
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
365 $ li blog import
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
366
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
367 Get description of ``dotclear`` importer::
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
368
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
369 $ li blog import dotclear
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
370
4037
524856bd7b19 massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents: 3975
diff changeset
371 import a Dotclear blog::
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
372
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
373 $ li blog import dotclear /path/to/dotclear.dump
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
374
4037
524856bd7b19 massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents: 3975
diff changeset
375 import a Dotclear blog without uploading images::
2946
ce16847a7b6d doc: documentation first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
376
3488
c80a0f864b5d doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents: 3177
diff changeset
377 $ li blog import --no-images-upload dotclear /path/to/dotclear.dump
3873
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents: 3872
diff changeset
378
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents: 3872
diff changeset
379 attachments
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents: 3872
diff changeset
380 ===========
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents: 3872
diff changeset
381
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents: 3872
diff changeset
382 Subcommands to add or remove data attached to pubsub items. Please check
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents: 3872
diff changeset
383 :ref:`libervia-cli_blog_attachments`.