الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ
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.
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).
The bin/quranbot script is written in POSIX shell, and the
rest of the project is written in TypeScript.
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