Fix README.md
This commit is contained in:
parent
32d03d211e
commit
18894e767c
1 changed files with 10 additions and 15 deletions
25
README.md
25
README.md
|
@ -8,29 +8,25 @@ A script that sends a message to a Matrix room.
|
||||||
|
|
||||||
**Syntax:** `matrix-send message room`
|
**Syntax:** `matrix-send message room`
|
||||||
|
|
||||||
**For example:** `matrix-send "Hello world\!" \!aBcDeFgHiJkLmNoP:example.org`
|
**Example:** `matrix-send "Hello world\!" \!aBcDeFgHiJkLmNoP:example.org`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
`matrix-send` is a simple script that sends a message to a Matrix room.
|
matrix-send is a simple script that sends a message to a Matrix room.
|
||||||
|
|
||||||
It does this by sending a JSON message to your Matrix server. The message types that are supported are *m.text*, and *m.notice*.
|
It does this by sending a JSON message to your Matrix server. The message types that are supported are *m.text*, and *m.notice*.
|
||||||
|
|
||||||
It is mainly designed for automation. I use it on a private Matrix room of mine.
|
It is mainly designed for automation. I use it on a private Matrix room of mine.
|
||||||
|
|
||||||
There aren't any plans for `matrix-send` to support encryption.
|
There aren't any plans for matrix-send to support encryption.
|
||||||
|
|
||||||
## Get started
|
## Get started
|
||||||
|
|
||||||
In order to start using `matrix-send` you need a config file. To copy the configuration to .config, clone this repository and type:
|
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).
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make config
|
|
||||||
```
|
|
||||||
|
|
||||||
Now edit the file ~/.config/matrix-send.conf. You will see three (uncommented) lines.
|
Now edit the file ~/.config/matrix-send.conf. You will see three (uncommented) lines.
|
||||||
|
|
||||||
```shell
|
```
|
||||||
Server ...
|
Server ...
|
||||||
Username ...
|
Username ...
|
||||||
Password ...
|
Password ...
|
||||||
|
@ -38,7 +34,7 @@ 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, since matrix-send.conf is a shell script, you could do something like this:
|
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:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
Password $(gpg -d /path/to/passwd.gpg)
|
Password $(gpg -d /path/to/passwd.gpg)
|
||||||
|
@ -51,15 +47,14 @@ For more configuration options, see [matrix-send.conf(5)](https://jtbx.codeberg.
|
||||||
---
|
---
|
||||||
|
|
||||||
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.
|
||||||
```
|
|
||||||
# make install
|
|
||||||
```
|
|
||||||
|
|
||||||
In order to send messages, you will need your Room ID. 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.
|
||||||
|
|
||||||
To send a message, type `matrix-send` followed by your message and then your Room ID. You may need to escape the exclamation mark(s). For example:
|
To send a message, type `matrix-send` followed by your message and then your Room ID. You may need to escape the exclamation mark(s). For example:
|
||||||
|
|
||||||
matrix-send 'Hi!' \!asdfasdfasdfasdf:matrix.org
|
```shell
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue