From 1ad02db75f3edf4ef7f9917981cd4428e8c8556c Mon Sep 17 00:00:00 2001 From: Mike Russo Date: Fri, 18 Apr 2025 17:11:10 -0600 Subject: [PATCH] Readme --- README.org | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 README.org diff --git a/README.org b/README.org new file mode 100644 index 0000000..e0d083a --- /dev/null +++ b/README.org @@ -0,0 +1,78 @@ +#+title: birthday-boy +A simple Matrix bot to send birthday reminder messages to chat rooms. + +** About + +Birthday Boy is a Common Lisp application that: +- Connects to a Matrix homeserver +- Tracks birthdays from a YAML configuration file +- Sends customizable birthday announcement messages to a specified room + +** Setup + +*** Prerequisites + +- [Nix](https://nixos.org/download.html) package manager (optional, for development/building) + +*** Configuration + +Create a =config.yml= file with the following structure: + +#+begin_src yaml +config: + homeserver_url: "https://matrix.example.com" # Your Matrix server URL + bot_name: "birthdaybot" # Bot username + bot_pw: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" # Bot password + bot_access_token: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" # Bot access token + room_id: "!AAAAAAAAAAAAAAAAAA:groupchattt.page" # Target room ID + bot_message_template: # List of random message templates + - "Hey hey hey, it's the birthday fairy, and I am pleased to announce that it is ~A's birthday today. Congratulations, I love you!" + - "Whoa there partner, looking like it's ~A's birthday today. From yours truly, the ole Birthday Fairy of the west!" + +birthdays: # List of birthdays to track + - person: joe + month: 4 + day: 13 + - person: carl + month: 7 + day: 12 + - person: noel + month: 9 + day: 10 +#+end_src + +** Usage + +*** Using Nix + +**** Build +#+begin_src bash +nix build +#+end_src + +**** Run +#+begin_src bash +./result/bin/birthday-boy /path/to/config.yml +#+end_src + +*** Development + +The repository includes a development shell with all necessary dependencies: + +#+begin_src bash +nix develop +#+end_src + +Inside the development shell, you can: +#+begin_src bash +sbcl --load ./bot.lisp --eval '(birthday-boy:main*)' +#+end_src + +** Features + +- Configurable messages with randomized templates +- Easy birthday management through YAML configuration +- Automated checking of birthdays against the current date +- Nix-based build and development environment +- Minimal dependencies +