Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
loukamb committed May 3, 2024
1 parent d484ad3 commit c54e054
Show file tree
Hide file tree
Showing 13 changed files with 895 additions and 40 deletions.
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# Changelog

## Kaab'ot 1.3.0 (in progress)
## Kaab'ot 1.3.0

### User

- **`/salat` is a command that can be used to retrieve the Salat timings.**
- **`/5v` is a command that can be used to retrieve Holy Quran commentary from the [Five Volume Commentary](https://www.booksonislam.org/products/five-volume-commentary) collection.**
- Give it a single verse (e.g. `1:1`) and the bot will post the relevant page of the verse into chat.
- **`/salat` is a command that can be used to retrieve Salat timings.** (experimental)
- Salat timings are computed from the provided location (city name or precise address).
- An optional date can be provided to retrieve Salat timings for a specific day.
- Requires a Nominatim instance to be setup. See Technical section for details.
- **Experimental feature.** It must be manually enabled by bot administrators.
- `/verse` now accepts the `translations` parameter, which is a comma-separated list of translations to include in the output.
- Currently only supports `en`, `ar`, and `ur`.
- Translated name of chapter now included in `/verse` outputs.

### Technical

- Bot can now use a Nominatim instance to enable geolocalization features. **Without a Nominatim instance, the `/salat` command (and other geolocalization features) will be disabled.**
- Address to the Nominatim instance must be provided as the `NOMINATIM_URL` environment variable in `.env`.
- Bot can now use a Nominatim instance to enable geolocalization features. This feature is experimental, and not enabled by default. **Without a Nominatim instance, the `/salat` command (and other geolocalization features) will be disabled.**
- Address to the Nominatim instance must be provided as the `geolocalizationUrl` field in `settings.json`.
- Read [here](https://github.com/mediagis/nominatim-docker/tree/master/4.4) to learn how to self-host a Nominatim instance within a Docker container. Do note that you need _plenty_ of storage space to store all the data.

The [public instance](https://kaabot.org) of Kaab'ot uses its own hosted Nominatim instance with full global data, so if you don't feel like hosting your own, just [add](https://add.kaabot.org) the public instance of the bot to your Discord server to spare you the trouble.
- A cache engine is now implemented to memoize lookups wherever possible. Set `cache` to false in `settings.json` if you want to disable this for some reason.
- Console outputs are now more readable.
- Fixed bug with verse numbering.

## Kaab'ot 1.2.0

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
- Cite verses from the Holy Quran with the `/verse` command. Provides English, Arabic, and Urdu translations automatically.
- Analyze the individual Arabic words of each verse by passing the optional `analyse` parameter.
- Verses provided from [OpenQuran](https://www.openquran.com/), an easy-to-use Quran search engine.
- Retrieve interesting commentary of the Holy Quran with the `/5v` command. Sources commentary from the [Five Volume Commentary](https://www.booksonislam.org/products/five-volume-commentary) collection (thus `5v`).
- Give it a single verse (e.g. `1:1`) and the bot will post the relevant page of the verse into chat.
- On-demand retrieval of Salat timings with the `/salat` command, as well as an opt-in notifier/reminder for prayers with configurable location(s).
- Uses [Nominatim](https://github.com/osm-search/Nominatim) for geolocalization. If you are hosting Kaab'ot yourself, you will also have to host your own Nominatim instance.
- **Work in progress.** Currently only available in the nightly version of the bot.
- **Experimental feature.** Must be manually enabled by administrators of self-hosted bots.
- Fetch Friday Sermons from [Muslim Television Ahmadiyya International](https://beta.mta.tv/).
- Provides both a permalink on MTA **and** a direct download link to a 1920x1080 (full HD) MP4 of the sermon.
- Pass `list` parameter to retrieve the last 10 Friday sermons.
Expand Down Expand Up @@ -82,9 +84,6 @@ DISCORD_BOT_CLIENT="..."

# Insert your bot's token here.
DISCORD_BOT_SECRET="..."

# (optional) Nominatim URL for geolocalization.
NOMINATIM_URL="..."
```

Afterwards, run the following commands and the bot will launch automatically:
Expand All @@ -108,7 +107,7 @@ Not all writings will be retrieved (as not all books are available in PDF format

### Geolocalization setup

To enable use of `/salat` commands (and anything else that supports geolocalization queries), you have to provide a URL to a [Nominatim](https://github.com/osm-search/Nominatim) backend as an environment variable (`NOMINATIM_URL`). The bot will automatically detect the environment variable and enable the relevant commands.
To enable use of `/salat` commands (and anything else that supports geolocalization queries), you have to provide a URL to a [Nominatim](https://github.com/osm-search/Nominatim) backend as the `geolocalizationUrl` field of your `settings.json` file. The bot will automatically detect the setting and enable the relevant commands.

The public instance of Kaab'ot uses its own self-hosted backend, but it is _exclusively_ for the use of the public instance (as to avoid overuse from other bots). You will have to host your own if you want to self-host Kaab'ot. If you want to avoid this, just [add](https://add.kaabot.org) the public instance of the bot to your server instead.

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@
"author": "https://github.com/mblouka",
"license": "AGPL-3.0-or-later",
"dependencies": {
"chalk": "^5.3.0",
"chrono-node": "^2.7.5",
"dayjs": "^1.11.10",
"discord.js": "^14.14.1",
"dotenv": "^16.4.5",
"html-entities": "^2.5.2",
"jsdom": "^24.0.0",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"node-html-markdown": "^1.3.0",
"node-html-parser": "^6.1.12",
"sharp": "^0.33.3",
"tz-lookup": "^6.1.25"
},
"devDependencies": {
"@types/jsdom": "^21.1.6",
"@types/node": "^20.11.25",
"esbuild": "^0.20.1"
}
Expand Down
Loading

0 comments on commit c54e054

Please sign in to comment.