Update README and fix manpage format problems
This commit is contained in:
parent
1b3bd8db45
commit
01cc0c4a35
2 changed files with 48 additions and 35 deletions
59
README.md
59
README.md
|
@ -18,29 +18,33 @@ There aren't any plans for matrix-send to support encryption.
|
||||||
|
|
||||||
In order to start using matrix-send, you need a config file. To copy the default configuration to .config, clone this repository and type `make config` as the desired user (not root).
|
In order to start using matrix-send, you need a config file. To copy the default configuration to .config, clone this repository and type `make config` as the desired user (not root).
|
||||||
|
|
||||||
Now edit the file ~/.config/matrix-send.conf. You will see three (uncommented) lines.
|
Now edit the file ~/.config/matrix-send/config.lua. You will first see the `login` table.
|
||||||
|
|
||||||
```
|
```lua
|
||||||
Server ...
|
-- This is a comment
|
||||||
Username ...
|
login = {
|
||||||
Password ...
|
server = "matrix-client.matrix.org" -- matrix.org
|
||||||
|
username = "user"
|
||||||
|
password = "password"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Delete the example values and enter in your credentials.
|
Delete the example values and enter in your credentials.
|
||||||
|
|
||||||
If you don't want to put your password in plain text, as matrix-send.conf is a shell script, you could do something like this:
|
For more configuration options, see [matrix-send-config(5)](https://jtbx.codeberg.page/man/matrix-send-config.5).
|
||||||
|
|
||||||
```shell
|
|
||||||
Password $(gpg -d /path/to/passwd.gpg)
|
|
||||||
```
|
|
||||||
|
|
||||||
/path/to/passwd.gpg is a GPG-encrypted file containing only your password, once decrypted.
|
|
||||||
|
|
||||||
For more configuration options, see [matrix-send.conf(5)](https://jtbx.codeberg.page/man/matrix-send.conf.5).
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Before you install, you will need a few dependencies:
|
||||||
|
|
||||||
|
* lua: >= 5.3
|
||||||
|
* [luarocks](https://luarocks.org)
|
||||||
|
* plus some luarocks packages...
|
||||||
|
|
||||||
To install matrix-send, run `make install` as root, in the cloned repository's directory.
|
To install matrix-send, run `make install` as root, in the cloned repository's directory.
|
||||||
|
This will install all required packages, and copy matrix-send and its documentation to your system.
|
||||||
|
|
||||||
In order to send messages, you will need the Room ID of your choice. Find the room you want to send to, and find its Room ID in the settings or somewhere else. It will likely be under Advanced or something similar.
|
In order to send messages, you will need the Room ID of your choice. Find the room you want to send to, and find its Room ID in the settings or somewhere else. It will likely be under Advanced or something similar.
|
||||||
|
|
||||||
|
@ -52,4 +56,31 @@ matrix-send 'Hi!' \!asdfasdfasdfasdf:matrix.org
|
||||||
|
|
||||||
That will send the message "Hi!" to the Matrix room !asdfasdfasdfasdf:matrix.org.
|
That will send the message "Hi!" to the Matrix room !asdfasdfasdfasdf:matrix.org.
|
||||||
|
|
||||||
|
If you don't want to type the long room ID every time, you can add an alias.
|
||||||
|
|
||||||
|
Open your configuration file, and create a `rooms` table like so:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
rooms = {
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, you can add aliases. Say you wanted to add an alias called `lounge` for a room with room ID `!AbCdEfGhIjKlMn:matrix.org`.
|
||||||
|
You would make it this way:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
rooms = {
|
||||||
|
lounge = "!AbCdEfGhIjKlMn:matrix.org"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Multiple aliases are separated by commas (as with any Lua table):
|
||||||
|
|
||||||
|
```lua
|
||||||
|
rooms = {
|
||||||
|
lounge = "!AbCdEfGhIjKlMn:matrix.org", -- <-- notice the comma
|
||||||
|
bathroom = "!OpQrStUvWxYz:matrix.org"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
For more information, see [matrix-send(1)](https://jtbx.codeberg.page/man/matrix-send.1).
|
For more information, see [matrix-send(1)](https://jtbx.codeberg.page/man/matrix-send.1).
|
||||||
|
|
|
@ -71,24 +71,6 @@ Homeserver dialogue in the sign-in screen, then hovering
|
||||||
over it once entered. Your server's Client-Server API URL should appear once
|
over it once entered. Your server's Client-Server API URL should appear once
|
||||||
you hover over it. If it doesn't appear, you should already have it.
|
you hover over it. If it doesn't appear, you should already have it.
|
||||||
.Pp
|
.Pp
|
||||||
You may have noticed that with this configuration, your password
|
|
||||||
is visible in plain sight.
|
|
||||||
|
|
||||||
If you would like to have to encrypt your password before use,
|
|
||||||
you could
|
|
||||||
replace the
|
|
||||||
.Em login.password
|
|
||||||
line with something similar to this
|
|
||||||
.Pp
|
|
||||||
login.password = sh "gpg -d /path/to/passwd.gpg"
|
|
||||||
.Pp
|
|
||||||
where
|
|
||||||
.Em /path/to/passwd.gpg
|
|
||||||
is a GPG-encrypted plain text file containing only your password.
|
|
||||||
This line would mean that you would be asked for the passphrase required to
|
|
||||||
decrypt your password file before authenticating. This way, your password
|
|
||||||
is not in plain text.
|
|
||||||
|
|
||||||
More information on configuration options can be found in
|
More information on configuration options can be found in
|
||||||
.Xr matrix-send-config 5 .
|
.Xr matrix-send-config 5 .
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -99,9 +81,9 @@ This will be something like
|
||||||
.Em !zyxwvutsrq:example.org .
|
.Em !zyxwvutsrq:example.org .
|
||||||
|
|
||||||
Type the Room ID as the argument after the message you wish to send.
|
Type the Room ID as the argument after the message you wish to send.
|
||||||
You may have to escape the exclamation mark with a backslash. For example:
|
You may have to write the Room ID in quotes to avoid shell patterns.
|
||||||
.Pp
|
.Pp
|
||||||
.Dl matrix-send "Hello world!" \\!zyxwvutsrq:example.org
|
.Dl matrix-send 'Hello world!' '!zyxwvutsrq:example.org'
|
||||||
.Pp
|
.Pp
|
||||||
That would send a message saying
|
That would send a message saying
|
||||||
.Em Hello world!
|
.Em Hello world!
|
||||||
|
@ -135,7 +117,7 @@ cache directory
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
Send a message saying "Hello world!" to the Matrix room !TfbDbeqp:example.org:
|
Send a message saying "Hello world!" to the Matrix room !TfbDbeqp:example.org:
|
||||||
.Pp
|
.Pp
|
||||||
.Dl matrix-send 'Hello world!' \\!TfbDbeqp:example.org
|
.Dl matrix-send 'Hello world!' '!TfbDbeqp:example.org'
|
||||||
.Pp
|
.Pp
|
||||||
|
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue