Compare commits
No commits in common. "1ad02db75f3edf4ef7f9917981cd4428e8c8556c" and "f1a3f67533458540f2a96f04f8028f5e4a448c10" have entirely different histories.
1ad02db75f
...
f1a3f67533
2 changed files with 7 additions and 78 deletions
78
README.org
78
README.org
|
|
@ -1,78 +0,0 @@
|
||||||
#+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
|
|
||||||
|
|
||||||
|
|
@ -32,6 +32,13 @@
|
||||||
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 = ./.;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue