الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ
quranbot is a social media bot that posts reminders to read and listen to The Noble Quran, along with other Islamic content. The bot promotes the https://al-quran.reflectslight.io website as the preferred method for reading and listening to The Noble Quran, and other content (such as videos) is embedded into the bot's posts. The bot is still in the early stages of development.
Commands
- quranbot post-link
Posts a link to a surah on the https://al-quran.reflectslight.io website.
Posts both English and Arabic links (one after the other).
quranbot is implemented with a mixture of TypeScript, and POSIX shell.
The following dependencies are required:
Clone
The first step is to clone the repository.
Afterwards quranbot can be installed (and deinstalled) through make:
git clone https://github.com/ReflectsLight/quranbot
cd quranbot
doas -u root -- make install
doas -u root -- make deinstall
Configuration
The configuration file is normally located at '/usr/local/etc/quranbot/quranbot.json', and a sample file is included but with dummy values. See etc/quranbot/quranbot.json.sample. The configuration file should include the url of a mastodon instance, and an access token.
Cron
The
cron(8)
daemon is a simple way to schedule posts at regular intervals,
and it is easy to use with quranbot. After running crontab -e
an
editor should open, and the following content can be added to post
a link to a surah every 12 hours, on the 7th minute of the hour:
PATH=/bin:/usr/bin:/usr/local/bin
7 */12 * * * quranbot post-link
The following platforms have been tested and are known to work:
- FreeBSD
The following platforms remain untested but might work:
- OpenBSD
- NetBSD
The following platforms are known to be unlikely to work:
- Linux
- Windows
- MacOS
- github.com/@ReflectsLight
- gitlab.com/@ReflectsLight
- codeberg.org/@ReflectsLight
- brew.bsd.cafe/@ReflectsLight
The "source code" is released under the terms of the GPL
See LICENSE for details