Mercurial > libervia-backend
annotate doc/libervia-cli/blog.rst @ 4205:17a8168966f9
frontends (tools/webrtc): implement screensharing for Wayland + bug fixes:
- Freedesktop Desktop Screenshare port is now used when Wayland is detected (needs
`xdg-desktop-portal` with the implementation corresponding to desktop environment).
- Add a binding feature to feedback state to application (e.g. if desktop sharing is
cancelled from desktop environment, or at portal's permission request level).
- fix misnaming of video source (was wrongly named `camera` instead of `video`).
- fix desktop sharing pad selection in `input-selector` when it has been added once, then
removed, then added again.
rel 434
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 18 Jan 2024 23:29:25 +0100 |
parents | cf0ea77f9537 |
children |
rev | line source |
---|---|
2946 | 1 .. highlight:: sh |
2 | |
3 ================================ | |
4 blog: (micro)blogging management | |
5 ================================ | |
6 | |
7 Blog commands are high level tools to handle an XMPP blog. | |
8 They are using the generic pubsub arguments | |
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 |
4178
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
20 This option removes the randomly generated suffix from the auto-generated, |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
21 user-friendly ID. The suffix is initially added to ensure unique IDs, especially useful |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
22 when two posts have similar titles. |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
23 |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
24 .. note:: |
4174
6929dabf3a7e
doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents:
4037
diff
changeset
|
25 |
4178
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
26 When the ``--no-id-suffix`` option is selected, an extra validation is performed to |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
27 check for ID uniqueness. If an existing item already uses the same ID, a suffix is |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
28 added to the new ID regardless of the option, ensuring no existing content is |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
29 overwritten. This additional check incurs a slight performance impact due to the |
cf0ea77f9537
plugin XEP-0277, doc: conflict is now checked and avoided if `user_friendly_id_suffix` is `False`, doc updated
Goffi <goffi@goffi.org>
parents:
4177
diff
changeset
|
30 extra request needed. |
4174
6929dabf3a7e
doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents:
4037
diff
changeset
|
31 |
4177
0f1a4ffcd419
doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents:
4174
diff
changeset
|
32 ``--alt-link URL [MEDIA_TYPE]`` |
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 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
|
35 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
|
36 ``{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
|
37 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
|
38 double them: ``{{`` and ``}}``. |
0f1a4ffcd419
doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents:
4174
diff
changeset
|
39 |
0f1a4ffcd419
doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents:
4174
diff
changeset
|
40 example |
0f1a4ffcd419
doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents:
4174
diff
changeset
|
41 ------- |
0f1a4ffcd419
doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents:
4174
diff
changeset
|
42 |
0f1a4ffcd419
doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents:
4174
diff
changeset
|
43 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
|
44 |
0f1a4ffcd419
doc (cli/blog): Document new `--alt-link` option
Goffi <goffi@goffi.org>
parents:
4174
diff
changeset
|
45 $ 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
|
46 |
2946 | 47 set |
48 === | |
49 | |
50 publish a blog item. | |
51 | |
52 :ref:`pubsub_common` commands are used to specify the destination item. | |
53 | |
54 ``stdin`` is used to get the body of the blog post. | |
55 | |
4174
6929dabf3a7e
doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents:
4037
diff
changeset
|
56 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
|
57 |
3951
4b8776eb6826
doc (blog, pubsub): documentation on new e2ee arguments for pubsub, and shared secrets handling:
Goffi <goffi@goffi.org>
parents:
3873
diff
changeset
|
58 |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
|
59 |
3975
c4418949aa37
doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents:
3966
diff
changeset
|
60 |pte_arg| |
c4418949aa37
doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents:
3966
diff
changeset
|
61 |
3966
9f85369294f3
doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents:
3951
diff
changeset
|
62 |sign_arg| |
9f85369294f3
doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents:
3951
diff
changeset
|
63 |
2946 | 64 examples |
65 -------- | |
66 | |
67 Create a blog post with a body, a subject, 2 tags, and with comments allowed:: | |
68 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
69 $ echo "This is post body" | li blog set -T "This is a test message" -t test -t li -C |
2946 | 70 |
71 Create a blog post with rich content using `markdown` syntax, and no subject:: | |
72 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
73 $ echo "This is a **rich** body" | li blog set -S markdown |
2946 | 74 |
75 get | |
76 === | |
77 | |
2954
5e72efd2f95d
doc: minor fixes + use ".pot" extension instead of ".po" for template in README4TRANSLATORS
Goffi <goffi@goffi.org>
parents:
2946
diff
changeset
|
78 get command retrieves one or more blog post(s) from specified location (by default the |
2946 | 79 personal blog of the profile). |
80 | |
3021
8ec35cf13f66
doc: added, overview, configuration and Primitivus documentation + some small modifications
Goffi <goffi@goffi.org>
parents:
2999
diff
changeset
|
81 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
|
82 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
|
83 personal blog of the profile:: |
8ec35cf13f66
doc: added, overview, configuration and Primitivus documentation + some small modifications
Goffi <goffi@goffi.org>
parents:
2999
diff
changeset
|
84 |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
85 $ li blog get -k title -k published |
2946 | 86 |
87 :ref:`pubsub_common` commands are used to specify the blog location. | |
88 | |
89 examples | |
90 -------- | |
91 | |
92 Retrieve personal blog of the profile using `fancy` output with a verbosity of 1 (to show | |
93 publication date):: | |
94 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
95 $ li blog get -O fancy -v |
2946 | 96 |
97 Retrieve *title* and *publication date* of last 3 blog posts from the blog at | |
98 https://www.goffi.org:: | |
99 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
100 $ li blog get -m 3 -u https://www.goffi.org -k title -k published |
2946 | 101 |
102 Retrieve last 2 posts of personal blog, and output them in browser using default | |
103 template:: | |
104 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
105 $ li blog get -m 2 -O template --oo browser |
2946 | 106 |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
107 .. _libervia-cli_blog_edit: |
3041
72583524cfd3
doc (jp): jp commands are now fully documented:
Goffi <goffi@goffi.org>
parents:
3021
diff
changeset
|
108 |
2946 | 109 edit |
110 ==== | |
111 | |
112 With edit command you can create a new blog post or modify an existing one using your | |
113 local editor (the one set in ``$EDITOR``). You'll edit 2 things: the body of the post, and | |
114 the metadata which contain things like title, comments infos, or tags. | |
115 | |
116 For some common editors (like **vim** or **Emacs**), the editor will be automatially | |
117 opened using a split screen with *body* in one side, and metadata on the other. If the | |
118 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
|
119 the *metadata*. You can also specify editor and arguments in ``libervia.conf``, see |
2946 | 120 `configuration <edit_conf_>`_ below |
121 | |
122 If you don't change anything or publish an empty blog post, the edition will be cancelled. | |
123 | |
3177
f4914ce9d47d
jp (blog/edit): added `--no-publish` argument.
Goffi <goffi@goffi.org>
parents:
3041
diff
changeset
|
124 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
|
125 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
|
126 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
|
127 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
|
128 edition with the ``-D, --current`` option like this:: |
2946 | 129 |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
130 $ li blog edit -D |
2946 | 131 |
132 Note that item location must be re-specified if it has been used to create the draft, so | |
133 you'll have to reproduce the arguments to specify service, node or item (or the URL), | |
134 other data like tags will be restored from draft file of metadata. | |
135 | |
136 You can specify the syntax by using ``-S SYNTAX, --syntax SYNTAX``. If not specified, the | |
137 syntax set in your parameters will be used. | |
138 | |
139 When you edit a blog post, it is often useful to activate the ``-P, --preview`` option, | |
140 this will launch a web browser and refresh the page each time you save a modification in | |
141 your editor. By default, the browser registered as default in your system will be used, | |
142 and a new tab will be opened on each modification. This is not ideal, and we recommand to | |
143 set you configuration to activate automatic refreshing of the page instead, see `preview | |
144 configuration <edit_preview_>`_ below to see how to do. | |
145 | |
2999
85d8e9a7284b
doc (jp/blog): added note for --preview
Goffi <goffi@goffi.org>
parents:
2996
diff
changeset
|
146 .. note:: |
85d8e9a7284b
doc (jp/blog): added note for --preview
Goffi <goffi@goffi.org>
parents:
2996
diff
changeset
|
147 |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
148 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
|
149 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
|
150 |
4174
6929dabf3a7e
doc (cli/blog): documentation of the new `--no-id-suffix` option.
Goffi <goffi@goffi.org>
parents:
4037
diff
changeset
|
151 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
|
152 |
3951
4b8776eb6826
doc (blog, pubsub): documentation on new e2ee arguments for pubsub, and shared secrets handling:
Goffi <goffi@goffi.org>
parents:
3873
diff
changeset
|
153 |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
|
154 |
3975
c4418949aa37
doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents:
3966
diff
changeset
|
155 |pte_arg| |
c4418949aa37
doc (encryption, cli): document Pubsub Targeted Encryption:
Goffi <goffi@goffi.org>
parents:
3966
diff
changeset
|
156 |
3966
9f85369294f3
doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents:
3951
diff
changeset
|
157 |sign_arg| |
9f85369294f3
doc (encryption, cli): pubsub signing documentation:
Goffi <goffi@goffi.org>
parents:
3951
diff
changeset
|
158 |
2946 | 159 examples |
160 -------- | |
161 | |
162 Edit a new blog post with comments on your personal blog, using default syntax and preview:: | |
163 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
164 $ li blog edit -P --comments |
2946 | 165 |
166 Modifiy a draft previously saved using the ``"publish": false`` metadata:: | |
167 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
168 $ li blog edit -D |
2946 | 169 |
170 Correct a typo in your last published blog post:: | |
171 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
172 $ li blog edit --last-item |
2946 | 173 |
174 Edit the blog item at an HTTPS URL using XHTML syntax:: | |
175 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
176 $ li blog edit -u https://www.example.net/some_xmpp_blog_article.html -S xhtml |
2946 | 177 |
178 Create a new blog post on a XMPP blog node using its HTTPS URL (supposing here that | |
179 https://example.net is a XMPP blog node):: | |
180 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
181 $ li blog edit -u https://www.example.net |
2946 | 182 |
183 .. _edit_metadata: | |
184 | |
185 metadata | |
186 -------- | |
187 | |
188 Metadata is set using a JSON object. The key you can use are: | |
189 | |
190 publish | |
191 boolean indicating if item can be published. Set to ``false`` if you want to work on a | |
192 draft and to avoid accidental publication. | |
193 | |
194 atom_id | |
195 atom entry identifier. This should not be modified manually. | |
196 | |
197 published | |
198 time of initial publication (unix time). This should not be modified manually. | |
199 | |
200 language | |
201 language of the content | |
202 | |
203 comments | |
204 array of URIs to the comments node, if any. | |
205 | |
206 tag | |
207 array of tags, if any | |
208 | |
209 author | |
210 human readable name of the entry author | |
211 | |
212 author_jid | |
213 jid of the author. This should notbe modified manually. | |
214 | |
215 author_jid_verified | |
216 true if the pubsub service confirmed that author_jid is the one of the publisher. It is | |
217 useless to modify this variable. | |
218 | |
219 title | |
220 the title of the message | |
221 | |
222 title_rich | |
223 the rich title of the message, in current text syntax. It will be automatically | |
224 converted to xhtml. | |
225 | |
226 .. _edit_conf: | |
227 | |
228 configuration | |
229 ------------- | |
230 | |
231 editor | |
232 ^^^^^^ | |
233 | |
234 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
|
235 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
|
236 executable in the ``editor`` option in ``[li]`` section. |
2946 | 237 |
238 You can specify the args to use by using ``blog_editor_args`` option. Use | |
239 ``{content_file}`` to get the path of the main content file (the body of the blog post), | |
240 and ``{metadata_file}`` to get the path of the json metadata. | |
241 | |
242 .. sourcecode:: cfg | |
243 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
244 [li] |
2946 | 245 editor = kate |
246 blog_editor_args = {content_file} {metadata_file} | |
247 | |
248 .. _edit_preview: | |
249 | |
250 preview | |
251 ^^^^^^^ | |
252 | |
253 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
|
254 ``blog_preview_update_cmd`` in your ``[li]`` section. the former is the command to use to |
2946 | 255 open your browser when edition starts, and the later is the command to use when a |
256 modification is saved. In both cases you may use ``{url}`` to set the location of local HTML file. | |
257 | |
2954
5e72efd2f95d
doc: minor fixes + use ".pot" extension instead of ".po" for template in README4TRANSLATORS
Goffi <goffi@goffi.org>
parents:
2946
diff
changeset
|
258 This can be used to activate automatic refreshing of the page. |
2946 | 259 |
260 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
|
261 installed on your system, and enter the following lines in your ``libervia.conf``: |
2946 | 262 |
263 .. sourcecode:: cfg | |
264 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
265 [li] |
2946 | 266 blog_preview_open_cmd = konqueror {url} |
267 blog_preview_update_cmd = /bin/sh -c "qdbus $(qdbus org.kde.konqueror\*) /konqueror/MainWindow_1 reload" | |
268 | |
269 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
|
270 following lines in your ``libervia.conf``: |
2946 | 271 |
272 .. sourcecode:: cfg | |
273 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
274 [li] |
2946 | 275 blog_preview_open_cmd = firefox -new-tab {url} |
276 blog_preview_update_cmd = /bin/sh -c "WID=$(xdotool search --name 'Mozilla Firefox' | head -1); xdotool windowactivate $WID; xdotool key F5" | |
277 | |
278 This *xdotool* technique can be adapted to other browsers. | |
279 | |
280 syntax extensions | |
281 ^^^^^^^^^^^^^^^^^^ | |
282 | |
283 A dictionary with a mapping from syntax name to file extension can be used. This can be | |
284 useful to activate the right syntax highlighting in your editor. There is a default | |
285 mapping which can be overriden. | |
286 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
287 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
|
288 ``libervia.conf`` file. For instance, if your prefer do your ``.markdown`` for temp files |
2946 | 289 instead of the default ``.md``, you can use this: |
290 | |
291 .. sourcecode:: cfg | |
292 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
293 [li] |
2946 | 294 syntax_ext_dict = {"markdown": "markdown"} |
295 | |
2954
5e72efd2f95d
doc: minor fixes + use ".pot" extension instead of ".po" for template in README4TRANSLATORS
Goffi <goffi@goffi.org>
parents:
2946
diff
changeset
|
296 the first ``markdown`` is the name of the syntax (could be an other syntax like ``xhtml``), |
2946 | 297 while the second if the file extension. |
298 | |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
299 rename |
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 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
|
303 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
|
304 |
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
305 example |
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
306 ------- |
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
307 |
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
308 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
|
309 ``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
|
310 |
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
311 $ 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
|
312 |
3872
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
313 repeat |
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 |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
316 Re-publish a blog item on profile's blog. |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
317 |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
318 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
|
319 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
|
320 |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
321 It only needs arguments to get item to repeat location. |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
322 |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
323 example |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
324 ------- |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
325 |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
326 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
|
327 |
76fb0739cc9c
doc (cli/blog): `repeat` documentation:
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
328 $ 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
|
329 |
2946 | 330 preview |
331 ======= | |
332 | |
333 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
|
334 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
|
335 used if you have already started an edition with ``li blog edit`` but forgot to use the ``-P, --preview`` arguments. |
2946 | 336 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
337 example |
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
338 ------- |
2946 | 339 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
340 Preview the draft at ``~/.local/share/libervia/blog/some_name/blog_something.md``:: |
2946 | 341 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
342 $ li blog preview ~/.local/share/libervia/blog/some_name/blog_something.md |
2946 | 343 |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
344 .. _libervia-cli_blog_import: |
3041
72583524cfd3
doc (jp): jp commands are now fully documented:
Goffi <goffi@goffi.org>
parents:
3021
diff
changeset
|
345 |
2946 | 346 import |
347 ====== | |
348 | |
349 With this command you can import an external blog in a XMPP blog at the specified pubsub | |
350 location. | |
351 | |
352 The import is done using an *importer* name and a *location* which depends of the importer | |
2996 | 353 (it can be a path to a file, an URL to a blog, or something else). Let empty to get list |
354 of importers, and specify only importer name to get its description. | |
2946 | 355 |
356 By default, found images are re-uploaded to XMPP server, if you want to keep original | |
357 URLs, use the ``--no-images-upload`` option. | |
358 | |
359 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. | |
360 | |
361 You shoud specify original blog host using ``--host HOST`` argument, this is used notably | |
362 to reconstruct relative URLs of media. | |
363 | |
364 Importers may have specific options, you can set them using the ``-o NAME VALUE, --option NAME VALUE`` argument. Check the importer description for details. | |
365 | |
366 examples: | |
367 --------- | |
368 | |
369 List available importers:: | |
370 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
371 $ li blog import |
2946 | 372 |
373 Get description of ``dotclear`` importer:: | |
374 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
375 $ li blog import dotclear |
2946 | 376 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3975
diff
changeset
|
377 import a Dotclear blog:: |
2946 | 378 |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
379 $ li blog import dotclear /path/to/dotclear.dump |
2946 | 380 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3975
diff
changeset
|
381 import a Dotclear blog without uploading images:: |
2946 | 382 |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3177
diff
changeset
|
383 $ 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
|
384 |
8b76caa89aa0
doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
3872
diff
changeset
|
385 attachments |
8b76caa89aa0
doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
3872
diff
changeset
|
386 =========== |
8b76caa89aa0
doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
3872
diff
changeset
|
387 |
8b76caa89aa0
doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
3872
diff
changeset
|
388 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
|
389 :ref:`libervia-cli_blog_attachments`. |