@@ -133,7 +133,14 @@ Options:
133
133
verbosity will be very high. Verbosity only affects the debug
134
134
information. So, if '--debug' is not used then '--verbose' will be
135
135
ignored
136
- -c, --credentials <PATH TO FILE>
136
+ --plain
137
+ Disable encryption for a specific action. By default encryption is
138
+ turned on wherever possible. E.g. rooms created will be created by
139
+ default with encryption enabled. To turn encryption off for a
140
+ specific action use --plain. Currently --plain is supported by
141
+ --room-create and --room-dm-create. See also --room-enable-encryption
142
+ which sort of does the opossite for rooms
143
+ -c, --credentials <PATH_TO_FILE>
137
144
Path to a file containing credentials. At login (--login),
138
145
information about homeserver, user, room id, etc. will be written to
139
146
a credentials file. By default, this file is "credentials.json". On
@@ -142,7 +149,7 @@ Options:
142
149
room. If this option is provided, the provided path to a file will be
143
150
used as credentials file instead of the default one [default:
144
151
/home/user/.local/share/matrix-commander-rs/credentials.json]
145
- -s, --store <PATH TO DIRECTORY >
152
+ -s, --store <PATH_TO_DIRECTORY >
146
153
Path to a directory to be used as "store" for encrypted messaging.
147
154
Since encryption is always enabled, a store is always needed. If this
148
155
option is provided, the provided directory name will be used as
@@ -151,7 +158,7 @@ Options:
151
158
same device. The store directory can be shared between multiple
152
159
different devices and users [default:
153
160
/home/user/.local/share/matrix-commander-rs/sledstore/]
154
- --login <LOGIN METHOD >
161
+ --login <LOGIN_METHOD >
155
162
Login to and authenticate with the Matrix homeserver. This requires
156
163
exactly one argument, the login method. Currently two choices are
157
164
offered: 'password' and 'SSO'. Provide one of these methods. If you
@@ -173,7 +180,7 @@ Options:
173
180
browser. So, don't use SSO on headless homeservers where there is no
174
181
browser installed or accessible [default: none] [possible values:
175
182
none, password, access-token, sso]
176
- --verify <VERIFICATION METHOD >
183
+ --verify <VERIFICATION_METHOD >
177
184
Perform verification. By default, no verification is performed.
178
185
Verification is currently only offered via Emojis. Hence, specify
179
186
'--verify emoji'. If verification is desired, run this program in the
@@ -295,17 +302,20 @@ Options:
295
302
of text formatted in MarkDown language. '--code' allows sending of
296
303
text as a Code block
297
304
-r, --room [<ROOM>...]
298
- Optionally specify one or multiple rooms by room ids. '--room' is
299
- used by various options like '--message', '--file', some variants of
300
- '--listen', '--delete-device', etc. If no '--room' is provided the
301
- default room from the credentials file will be used. If a room is
302
- provided in the '--room' argument, then it will be used instead of
303
- the one from the credentials file. The user must have access to the
304
- specified room in order to send messages to it or listen on the room.
305
- Messages cannot be sent to arbitrary rooms. When specifying the room
306
- id some shells require the exclamation mark to be escaped with a
307
- backslash. Not all listen operations allow setting a room. Read more
308
- under the --listen options and similar
305
+ Optionally specify one or multiple rooms via room ids or room
306
+ aliases. '--room' is used by various options like '--message',
307
+ '--file', some variants of '--listen', '--delete-device', etc. The
308
+ default room is provided in the credentials file (specified at
309
+ --login with --room-default). If a room (or multiple ones) is (or
310
+ are) provided in the --room arguments, then it (or they) will be used
311
+ instead of the one from the credentials file. The user must have
312
+ access to the specified room in order to send messages there or
313
+ listen on the room. Messages cannot be sent to arbitrary rooms. When
314
+ specifying the room id some shells require the exclamation mark to be
315
+ escaped with a backslash. Not all listen operations allow setting a
316
+ room. Read more under the --listen options and similar. Most actions
317
+ also support room aliases or local canonical short aliases instead of
318
+ room ids. Using a room id is always faster than using a room alias
309
319
-f, --file [<FILE>...]
310
320
Send one or multiple files (e.g. PDF, DOC, MP4). First files are
311
321
sent, then text messages are sent. If you want to feed a file into
@@ -316,7 +326,8 @@ Options:
316
326
indirectly a MIME type to the piped data. E.g. if you pipe in a PNG
317
327
file, you might want to specify additionally '--file-name image.png'.
318
328
As such, the label 'image' will be given to the data and the MIME
319
- type 'png' will be attached to it
329
+ type 'png' will be attached to it. Furthermore, '-' can only be used
330
+ once
320
331
--notice
321
332
There are 3 message types for '--message'. Text, Notice, and Emote.
322
333
By default, if no command line options are specified, 'Text' will be
@@ -329,7 +340,7 @@ Options:
329
340
used. Use '--notice' or '--emote' to set the type to Notice or Emote
330
341
respectively. '--notice' allows sending of text as a notice.
331
342
'--emote' allows sending of text as an emote
332
- --sync <SYNC TYPE >
343
+ --sync <SYNC_TYPE >
333
344
This option decides on whether the program synchronizes the state
334
345
with the server before a 'send' action. Currently two choices are
335
346
offered: 'full' and 'off'. Provide one of these choices. The default
@@ -339,7 +350,7 @@ Options:
339
350
before a 'send'. If you have chosen 'off', synchronization will be
340
351
skipped entirely before the 'send' which will improve performance [default:
341
352
full] [possible values: off, full]
342
- -l, --listen <LISTEN TYPE >
353
+ -l, --listen <LISTEN_TYPE >
343
354
The '--listen' option takes one argument. There are several choices:
344
355
'never', 'once', 'forever', 'tail', and 'all'. By default, --listen
345
356
is set to 'never'. So, by default no listening will be done. Set it
@@ -378,7 +389,7 @@ Options:
378
389
--whoami
379
390
Print the user id used by "matrix-commander-rs" (itself). One can get
380
391
this information also by looking at the credentials file
381
- -o, --output <OUTPUT FORMAT >
392
+ -o, --output <OUTPUT_FORMAT >
382
393
This option decides on how the output is presented. Currently offered
383
394
choices are: 'text', 'json', 'json-max', and 'json-spec'. Provide one
384
395
of these choices. The default is 'text'. If you want to use the
@@ -636,6 +647,41 @@ Options:
636
647
Get the profile of itself, i.e. of the 'matrix-commander-rs' user
637
648
account. This is getting both display name and avatar MXC URI in a
638
649
call
650
+ --media-upload [<FILE>...]
651
+ Upload one or multiple files (e.g. PDF, DOC, MP4) to the homeserver
652
+ content repository. If you want to feed a file for upload into
653
+ "matrix-commander-rs" via a pipe, via stdin, then specify the special
654
+ character '-' as stdin indicator. See description of '--message' to
655
+ see how the stdin indicator '-' is handled. Use --mime to optionally
656
+ specify the MIME type of the file. If you give N arguments to
657
+ --media-upload, you can give N arguments to --mime. See --mime. If
658
+ you pipe a file into stdin, the MIME type cannot be guessed. It is
659
+ hence more recommended that you specify a MIME type via '--mime' when
660
+ using '-'. Furthermore, '-' can only be used once. Upon being stored
661
+ in the homeserver's content repository, the data is assigned a Matrix
662
+ MXC URI. For each file uploaded successfully, a single line with the
663
+ MXC URI will be printed
664
+ --media-download [<MXC_URI>...]
665
+ Download one or multiple files from the homeserver content
666
+ repository. You must provide one or multiple Matrix URIs (MXCs) which
667
+ are strings like this 'mxc://example.com/SomeStrangeUriKey'. If found
668
+ they will be downloaded, decrypted, and stored in local files. If
669
+ file names are specified with --file-name the downloads will be saved
670
+ with these file names. If --file-name is not specified, then the file
671
+ name 'mxc-<mxc-id>' will be used. If a file name in --file-name
672
+ contains the placeholder __mxc_id__, it will be replaced with the
673
+ mxc-id. If a file name is specified as empty string in --file-name,
674
+ then also the name 'mxc-<mxc-id>' will be used. Do not confuse
675
+ --media-download with --download-media. See --download-media
676
+ --mime [<MIME_TYPE>...]
677
+ Specify the Mime type of certain input files. Specify '' if the Mime
678
+ type should be guessed based on the filename. If input is from stdin
679
+ (i.e. '-' and piped into 'matrix-commander-rs') then Mime type cannot
680
+ be guessed. If not specified, and no filename available for guessing
681
+ it will default to 'application/octet-stream'. Some example mime
682
+ types are: 'image/jpeg', 'image/png', 'image/gif', 'text/plain', and
683
+ 'application/pdf'. For a full list see
684
+ 'https://docs.rs/mime/latest/mime/#constants'
639
685
-h, --help
640
686
Print help information (use `--help` for more detail)
641
687
```
0 commit comments