birthday-boy/README.org
Mike Russo 1ad02db75f Readme
2025-04-18 17:11:10 -06:00

78 lines
2 KiB
Org Mode

#+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