From abb8a9b2b9867766513cdb6050218bc09b2da4b3 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 6 Mar 2021 13:03:20 +0100 Subject: update README --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 8d340ea..b89a6ec 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,22 @@ To do that, add the following to `Cargo.toml`: lto = true ``` +Optional Features +----------------- + +The Discord and Matrix functions pull some further dependencies, which are not needed for a basic usage. +Therefore, those features are optional and must be enabled by hand if you wish to use either the Discord integration or the Matrix integration! +To do so, simply adjust your cargo command by adding `--features`: + +```sh +# Discord +cargo build --release --features "im-discord" +# Matrix +cargo build --release --features "im-matrix" +# Both +cargo build --release --features "im-matrix im-discord" +``` + Configuration ------------- @@ -78,6 +94,28 @@ auth_token = "foobar" # Channel ID of the channel to which the message should be posted. # (mandatory) channel_id = 123 + +# Matrix messaging section. +# Seee Discord notes. +# (optional) +[matrix] +# Matrix homeserver for the user +# (mandatory) +homeserver = "https://awesome-matrix-server.org" +# Matrix username +# (mandatory) +username = "foobar" +# Matrix password +# (mandatory) +password = "secret-foo" +# Device ID +# If not given, a new one will be created - it is advised though to supply it +# after the first connection. +# (optional) +device_id = "ASDFGH" +# Room ID to which the message should be posted +# (mandatory) +room_id = "!room123456:homeserver.org" ``` Usage -- cgit v1.2.3