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