slack-birthday-bot
slack-birthday-bot copied to clipboard
Improvements
This is almost like a whole re-factor of the bot. The commit messages should be self-explanatory.
-
Change birthdays database to YAML / JSON The YAML module can load and parse JSON files, so that's an added benefit. I initially thought of using only JSON since the configuration file was JSON too. But since YAML is a more easier-to-understand format for everyone, so I thought I'd add support for that as well.
-
Configurize
db_path
andmention
- The
birthdays.txt
was being hard-coded and loaded from the code. This makes the bot less-flexible in terms of the database filename. Since I was re-factoring the code, I thought why not. Configurizing the database filename would make it more flexible. But the database file should still be parse-able by the YAML module, so that's there. - Some people prefer wishing their team members with real names while others like mentioning them and spam them with mentions all day. Mentioning is configurable too. This too depends on what values are loaded from the database. If the database has real names and the
mention
flag istrue
, the purpose is defeated.
- The
-
Renaming
configurations.json
toconfigurations.json.example
- because that's what it is, only an example placeholder file, not an actual configuration file. -
The bot has been optimized to work with the above changes and the README file has been updated with more information with regard on how to configure the bot and use it.