This repository hosts a bot that automates the process of logging into the ATEC training server, capturing a screenshot of your personal calendar, and posting it to a specified Discord channel.
- ✨ Features
⚠️ Requirements- 🛠️ Installation
- ⚙️ Usage
- 🧾 Logging
- 🔨 Troubleshooting
- 🗂️ Project Structure
- 🤝 Contributing
- 🛑 Issues
- 📢 Acknowledgements
- 📜 License
- Automated login to the ATEC training server.
- Navigation to the personal calendar page.
- Capture of the calendar as a .png screenshot.
- Automated posting of the screenshot to a specified Discord server.
- Python 3.6+
selenium
pillow
discord.py
aiohttp
python-dotenv
- Google Chrome
- ChromeDriver
-
Clone the Repository:
git clone https://github.com/rubsxyz/ATEC-Calendar-Discord-Bot.git cd atec_send_calendar_discord
-
Set Up a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Variables:
Create a
.env
file in the root directory of the project with the following content:USERNAME=your_username PASSWORD=your_password DISCORD_TOKEN=your_discord_token
Replace
your_username
,your_password
andyour_discord_token
with your actual ATEC login credentials and Discord bot token.To create a Discord bot and get the token, follow this guide.
-
Ensure ChromeDriver is in Your PATH:
Make sure that ChromeDriver is installed and added to your system PATH. You can download ChromeDriver from here.
To run the script, execute:
python main.py
- Log into the ATEC training server using the provided credentials.
- Navigate to the personal calendar page.
- Capture a screenshot of the calendar.
- Send the screenshot to the specified Discord channel.
The script logs its actions and any errors encountered in a bot.log
file in the root directory. This file is overwritten each time the script runs.
- Login Issues: Ensure that your username and password are correctly entered in the
.env
file. - Discord Bot Issues: Ensure that your Discord bot token and channel ID are correctly entered in the
.env
file and that your bot has permission to post in the specified channel. - ChromeDriver Issues: Ensure that ChromeDriver is correctly installed and added to your system PATH.
ATEC-Calendar-Discord-Bot/
│
├── src/
│ ├── init.py
│ ├── calendar_interaction.py
│ ├── config.py
│ ├── discord_bot.py
│ ├── web_interaction.py
│
├── images/ (created at first run)
│ └── (Captured images are stored here)
│
├── .env (read Installation)
├── .gitignore
├── bot.log (created at first run)
├── LICENSE.txt
├── main.py
├── README.md
└── requirements.txt
Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
If you encounter any issues, please open a new issue in the Issues section of the repository.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.