Remove doc/ and config.md

This commit is contained in:
Jeremy Baxter 2022-08-02 19:02:55 +12:00
parent b156cb0247
commit 9c636a88e3
5 changed files with 0 additions and 232 deletions

View file

@ -1,24 +0,0 @@
# Configuration
This file will list all the possible configuration directives and statements.
Comments can be made in the file with a hashtag (`#`).
---
## Directives
Options that take an argument.
* `Server`: The server to log into
* `Username`: The user's name used to log in
* `Password`: The user's password used to log in
* `AccessToken`: A custom access token to use for logging in (overrides username+password)
* `CacheLocation`: A custom location to cache access tokens in. Defaults to $HOME/.cache
## Statements
Options that do not take an argument.
* `NoCache`: Don't cache access tokens
For more information, take a look at the manual page (`man matrix-send.conf`).

View file

@ -1,3 +0,0 @@
generate:
man -cT markdown ../matrix-send.1 > matrix-send.1.md
man -cT markdown ../matrix-send.conf.5 > matrix-send.conf.5.md

View file

@ -1,7 +0,0 @@
# Manual pages
This directory contains the manual pages for matrix-send.
They are automatically generated from the man page, so if you already have matrix-send installed you can view these documents offline by typing `man matrix-send`.
To generate these Markdown documents, enter this directory and type `make generate`.

View file

@ -1,132 +0,0 @@
MATRIX-SEND(1) - General Commands Manual
# NAME
**matrix-send** - send a message to a Matrix room
# SYNOPSIS
**matrix-send**
\[**-t** *type*]
\[**-c**]
\[**-h**]
\[**-v**]
*message room*
# DESCRIPTION
**matrix-send**
is a script to send a message to a Matrix room.
It works by sending a JSON message to your Matrix server. The default message
type is m.text, but you can specify a custom type with
*-t*.
The options are as follows:
**-t** *type*
> Change the event type to
> *type*.
> Currently supported types are
> *m.text*
> and
> *m.notice*.
> Default is
> *m.text*.
**-c**
> Clear cached access tokens.
**-h**
> Show the help menu, then exit.
**-V**
> Print version and program information, then exit.
To begin, start by making a configuration file. This always has the location of
*~/.config/matrix-send.conf*.
At the very least, your configuration file has to contain 3 directives:
*Server*,
*Username*,
and
*Password*.
Let's say your Matrix server is envs.net. Your username is john, and your password
is supersecretpassword. Your configuration could look like this:
Server matrix.envs.net
Username john
Password supersecretpassword
In that example, we used matrix.envs.net instead of envs.net. This is because
matrix.envs.net is the address in which the Client-Server API is listening on.
You can find your server's Client-Server API URL in Element by entering in
your server into the Homeserver dialogue in the sign-in screen, then hovering
over it once entered. Your server's Client-Server API URL should appear once
you hover over it. If it doesn't appear, you've already got it.
You may have noticed that with this configuration, your password
is visible in plain sight.
At its most basic, matrix-send.conf is a shell script. This means you could
replace the
*Password*
line with something similar to this
Password $(gpg -d /path/to/passwd.gpg)
where
*/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
matrix-send.conf(5).
To use
**matrix-send**,
you will need to get the Room ID of the room you'd like to send to.
This will be something like
*!zyxwvutsrq:example.org*.
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:
matrix-send "Hello world!" \!zyxwvutsrq:example.org
That should send a message saying
*Hello world!*
to the room with the Room ID !zyxwvutsrq:example.org.
By default,
**matrix-send**
caches access tokens in
*$HOME/.cache/matrix-send/access-token*.
If you would like to disable caching of access tokens, add NoCache to your
*matrix-send.conf*.
Encryption is not supported. All messages will be sent unencrypted.
There are currently no plans to add encryption to
**matrix-send**.
# FILES
*~/.config/matrix-send.conf*
> configuration file for
> **matrix-send**
*~/.cache/matrix-send/access-token*
> access token cache file
# SEE ALSO
matrix-send.conf(5)
OpenBSD 7.1 - July 29, 2022

View file

@ -1,66 +0,0 @@
MATRIX-SEND.CONF(5) - File Formats Manual
# NAME
**matrix-send.conf** - configuration file for matrix-send(1)
# DESCRIPTION
matrix-send(1)
sends messages to Matrix rooms. In order to send a message however, it needs
credentials for the account sending the message. These credentials are provided
in the
**matrix-send.conf**
configuration file, as well as other options if you need them.
The following directives are available:
* Server
*server*
The Client-Server API URL for your Matrix server.
* Username
*username*
The username of your Matrix account.
* Password
*password*
The password to your Matrix account.
* AccessToken
*token*
Instead of using a username and password to obtain an access token, use
*token*.
* CacheLocation
*location*
Instead of caching access tokens to ~/.cache, cache them to
*location*.
* DefaultEvent
*type*
Use
*type*
as the default event type instead of m.text.
The following statements are available:
* NoCache
Don't cache access tokens.
# FILES
*~/.config/matrix-send.conf*
> configuration file for
> **matrix-send.conf**
*~/.cache/matrix-send/access-token*
> default access token cache file
# SEE ALSO
matrix-send(1)
OpenBSD 7.1 - July 29, 2022