commit ac641111a6ab29e75d0dc84701a1488ed3e5aabb Author: Daniel Mason Date: Wed May 7 00:05:31 2025 +1200 Reupload diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0ab317b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +src/main \ No newline at end of file diff --git a/OneNightSansBlack.ttf b/OneNightSansBlack.ttf new file mode 100644 index 0000000..cdcdcfb Binary files /dev/null and b/OneNightSansBlack.ttf differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..fc7a7f7 --- /dev/null +++ b/README.md @@ -0,0 +1,73 @@ +# GoMatrixBot + +Listens to matrix events and performs many actions: +- Can upload text/images to a [snac2 instance](https://codeberg.org/grunfink/snac2) by reacting +- Quote bot - React with a šŸ“ to store quotes in a database +- Gifs / Weather / IMDB / Wiki / UrbanDictionary / XKCD searches +- Downloads videos from links and uploads using yt-dlp +- Fetches metar/tafs +- Much more.. But this is constantly evolving proof of concept :) + +This project has evolved and not had much love, but it works for us. I have tried to document as much config/setup as possible but some things may be missing. + +### Setup +As I have build this an run it in an isolated LXC container - Beware, everything is set to run as root. You can change the config as needed. + +1. [Install Go](https://go.dev/doc/install) +2. Clone repository + create directories + create environment file +```shell +git clone git@github.com:idanoo/gomatrixbot.git ~/gomatrixbot +mkdir -p ~/data/output +mkdir -p ~/data/reaction_pics +mkdir -p ~/data/the_greats +echo 'MATRIX_HOST="" +MATRIX_USERNAME="" +MATRIX_PASSWORD="" +MATRIX_ADMIN_ROOM="" + +GIPHY_API_KEY="" +TENOR_API_KEY="" +OPENWEATHERMAP_API_KEY="" + +SNAC_HOST="" +SNAC_ACCESS_TOKEN="" +' > ~/data/environment + +```shell +~/data/output # This is used for temp files/uploads +~/data/reaction_pics # Used with .rb to generate text on images +~/data/the_greats # used with šŸ“·ļø to store a legendary image +``` + +### Commands +These may become outdated and may not _all_ work: +```shell + +🤠 react to faceswap iamge +šŸŒ react to upload to is.probablya.bot +šŸ“ react to quote message +🐫 react to save picture for future quote usage +ā˜ļø react to set room topic +šŸ“·ļø react to save picture for future lulz + +.r - Returns a random quote (can search quotes) +.rb - Returns a random quote on a random bird pic (with optional search) +.remindme