Compare commits

...

2 commits

Author SHA1 Message Date
Mike Russo
1ad02db75f Readme 2025-04-18 17:11:10 -06:00
Mike Russo
5538222af5 flake fluff 2025-04-18 17:05:21 -06:00
2 changed files with 78 additions and 7 deletions

78
README.org Normal file
View file

@ -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

View file

@ -32,13 +32,6 @@
alexandria alexandria
]); ]);
in { in {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
packages.default = pkgs.hello;
packages.birthday-boy = pkgs.stdenv.mkDerivation { packages.birthday-boy = pkgs.stdenv.mkDerivation {
name = "birthday-boy"; name = "birthday-boy";
src = ./.; src = ./.;