Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arkaeriit/devzat_time_teller
A plugin for Devzat that can tell the time at various timezones.
https://github.com/arkaeriit/devzat_time_teller
Last synced: 26 days ago
JSON representation
A plugin for Devzat that can tell the time at various timezones.
- Host: GitHub
- URL: https://github.com/arkaeriit/devzat_time_teller
- Owner: Arkaeriit
- License: bsd-3-clause
- Created: 2022-06-24T12:18:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-08T16:42:29.000Z (12 months ago)
- Last Synced: 2024-01-08T17:58:51.280Z (12 months ago)
- Language: Rust
- Size: 22.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Devzat Time Teller
On [Devzat](https://github.com/quackduck/devzat), people come from all around the time. It is sometime hard to know what time it is for other peoples. This plugin let you see the current time at any timezone with a command.
## In-chat usage
For the people in the chat-room, this plugin exposes the command, `time_at`. This command takes as argument an IANA timezone.
Here is an example of in-chat use:
```
Arkaeriit: time_at CET
Time-teller: At the timezone CET, it is 14:29.
Arkaeriit: time_at Europe/Paris
Time-teller: At the timezone Europe/Paris, it is 14:29.
Arkaeriit: time_at NotATimeZone
Time-teller: Error, NotATimeZone is not a valid time zone.
```As a bonus, this plugin also exposes the commands `rpn` which perform an RPN calculation and `calc` which performs infix calculation using the library Math-Parse.
```
Arkaeriit: rpn 2 2 +
2 + 2 = 4
```## Admin usage
The plugin is made for a single-file executable. It is configured with the following environment variable.
|Variable name |Description |Default |
|--------------|--------------------------------------------------------------|----------------------------------------------------------------------------|
|`PLUGIN_HOST` |URL of the chat-room interface |`https://devzat.hackclub.com:5556` |
|`PLUGIN_TOKEN`|Authentication token |Does not defaults to anything. The program panics if the token is not given.|
|`LOGIN_ROOM` |Name of the room where the bot will tell when it is connected.|`#bots` |
|`DEV_NICK` |Nickname of the user the bot will tell when it is connected |`Arkaeriit` |
|`BOT_NAME` |Name used by the bot to introduce itself. |`Time-teller` |## Acknowledgment
Special thanks to [Tommy](https://github.com/TommyPujol06) for the [library](https://github.com/TommyPujol06/devzat-rs) he made to make Devzat plugins in Rust.