From d2ca25a1925c07bea3de795b6b50eb6b49a33644 Mon Sep 17 00:00:00 2001 From: Marc Michalsky Date: Sat, 29 Jun 2024 01:12:14 +0200 Subject: [PATCH] update README.md --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 12b3caa..e3caf0c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,23 @@ # maubot-ntfy -This is a [maubot](https://maubot.xyz/) plugin to subscribe to [ntfy](https://ntfy.sh/) topics and send messages to a matrix room. +This is a [maubot](https://maubot.xyz/) plugin to subscribe +to [ntfy](https://ntfy.sh/) topics and send messages to a matrix room. ## Usage -Install as a maubot plugin and configure an instance. Until maubot supports installing python dependencies, you should install the `emoji` python package for full functionality. Alternatively, `@ntfy:catgirl.cloud` is available as well. +Install as a maubot plugin and configure an instance. Until maubot supports +installing python dependencies, you should install the `emoji` python package +for full functionality. Alternatively, `@ntfy:catgirl.cloud` is available as +well. -Use `!ntfy subscribe server/topic` (for example `!ntfy subscribe ntfy.sh/my_topic`) to subscribe the current room to the ntfy topic. Future messages will be sent to the room. +### Commands -Use `!ntfy subscribe server/topic ` (for example `!ntfy subscribe ntfy.sh/my_protected_topic tk_be6uc2ca1x1orakcwg1j3hp0ylot6`) to subscribe to a protected topic via [access token](https://docs.ntfy.sh/config/#access-tokens). - -To unsubscribe, use `!ntfy unsubscribe server/topic`. +| Command | Example | Description | +|---------------------------------------------------|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------| +| `!ntfy add-topic /` | `!ntfy add-topic ntfy.sh/my_topic` | Adds a topic to the database and makes it available globally within this bot instance. | +| `!ntfy remove-topic /` | `!ntfy remove-topic ntfy.sh/my_topic` | Removes an available topic from the database and to cancels all associated subscriptions. | +| `!ntfy list-topics` | | Lists all available topics for this bot instance. | +| `!ntfy subscribe /` | `!ntfy subscribe ntfy.sh/my_topic` | Subscribe the current room to the ntfy topic. Future messages will be sent to the room. | +| `!ntfy subscribe / ` | `!ntfy subscribe ntfy.sh/my_protected_topic tk_be6uc2ca1x1orakcwg1j3hp0ylot6` | Subscribes to a protected topic via [access token](https://docs.ntfy.sh/config/#access-tokens). | +| `!ntfy unsubscribe server/topic` | `!ntfy subscribe ntfy.sh/my_topic` | Unsubscribes a room from a topic. | +| `!ntfy list-subscriptions` | | Lists all active subscriptions for this bot room. |