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