GuardianChrono is a Telegram bot built with Python's python-telegram-bot library. It is designed to provide a range of useful time-related features, including obtaining the current time and timezone of any city, converting timezones, and calculating the time difference between cities. To use the bot, simply send a message with the name of a city you're interested in, and GuardianChrono will promptly respond with the current local time and timezone.
Note
Status: Feature-Complete
GuardianChrono is considered a finished project. It works as intended for time tracking and timezone conversions, and no further development or maintenance is planned.
The repository is provided as-is for reference and personal use. You are welcome to fork the project if you wish to make modifications or continue development independently.
To get started with this project, follow these steps:
- Create a new Telegram Bot and obtain a token following the instructions
- Clone this repository and navigate to the project directory
- Create a
.envfile in the project directory and define a variable namedTELEGRAM_API_TOKENwith your Telegram Bot token. The contents of your.envfile should look like this:
TELEGRAM_API_TOKEN = YOUR_TELEGRAM_API_TOKEN- In your existing
config.pyfile within the project directory, make sure to adjust the setup accordingly to load and use this environmental variable
Native Installation
- Install the required dependencies using
pip3 install -r requirements.txt - Run the
main.pyscript usingpython3 main.py
Docker Installation
- Build the Docker container using
docker build -t guardian-chrono .- Run the Docker container using the command
docker run --mount type=bind,source="$(pwd)"/config.py,target=/config.py,readonly guardian-chronoDocker Compose Installation
- Build and run the Docker container using
docker-compose up -dAfterwards, start the bot in Telegram by searching for the bot name and clicking on the start button
This Telegram bot offers the following features:
- Discover Local Time: Type the name of a city to get the current local time.
- Get City Timezone: Enter a city name to retrieve its timezone.
- Convert Timezone: Convert a specific time to your local timezone.
- Compare Time Difference: Easily compare the time difference between two cities.
To learn more about the bot's features, visit the bot at GuardianChrono.
This project is archived and does not accept contributions. You are welcome to fork it for your own use.
This project is licensed under the MIT License - see the LICENSE.md file for details.
