A comprehensive automation tool designed for ALX Software Engineering students to monitor project deadlines, receive educational content, and stay updated with their intranet activities through Telegram notifications.
- Project Monitoring: Automatically scrapes ALX intranet to track active projects, deadlines, and progress
- Daily Educational Content: Generates and sends programming quizzes, facts, and inspirational quotes
- Telegram Integration: Delivers all notifications directly to your Telegram chat
- Automated Scheduling: Runs daily at 6:30 AM (Africa/Lagos timezone) to keep you updated
- Multi-User Support: Manages multiple ALX student accounts simultaneously
- Smart Notifications: Different message formats for various project statuses and content types
- Python 3.9+
- Telegram Bot Token
- Google Generative AI API Key
- ALX Intranet credentials
-
Clone the repository
git clone https://github.com/yourusername/alx-productivity_tool.git cd alx-productivity_tool -
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
Create a
.envfile in the root directory with the following structure:USER_EMAIL="[email protected]" USER_PASSWORD="your_password" TELEGRAM_TOKEN="your_bot_token" TELEGRAM_CHAT_ID="your_chat_id" GENAI_API_KEY="your_google_ai_api_key" # Multiple users (format: email_password_chatid) ALX_USER_1="[email protected]_password1_chatid1" ALX_USER_2="[email protected]_password2_chatid2" ALX_USER_3="[email protected]_password3_chatid3"
-
Run the application
python scheduler.py
- Create a bot through @BotFather
- Get your bot token
- Find your chat ID by messaging @userinfobot
- Visit Google AI Studio
- Create an API key for Gemini
- Add it to your
.envfile
scheduler.py: Main orchestrator that manages timed execution of all functionsintranet_login.py: Web scraper for ALX intranet data extractiongenai.py: AI content generator using Google's Gemini modeltelegram_notify.py: Telegram Bot API integration for message deliverycredentials.py: Secure credential management system
Scheduler (6:30 AM) → Intranet Scraper → Project Data → Telegram
→ AI Generator → Educational Content → Telegram
- 📌 Current active projects with progress percentages
- 📆 Start dates and deadlines
- 📊 Monthly performance averages
- 🔗 Direct links to intranet projects
⚠️ Evaluation quiz notifications
- 🧠 Programming quizzes (Python, JavaScript, C, Bash)
- 📖 Interesting programming facts
- 💡 Inspirational quotes for developers
Modify timing in scheduler.py:
trigger_projects = CronTrigger(hour='6', minute='30', second='0', timezone=timezone)
trigger_ai = CronTrigger(hour='6', minute='30', second='3', timezone=timezone)Adjust AI prompts in genai.py:
prompts = [
f"Generate an interesting quiz question for {languages[random_number]}",
f"Give me a unique programming fun fact on {languages[random_number]}",
"Give me an inspirational quote for a programmer"
]Modify supported programming languages:
languages = ["python", "javascript", "c", "bash"]Build and run with Docker:
docker build -t alx-productivity-tool .
docker run -d --name alx-tool alx-productivity-toolalx-productivity_tool/
├── scheduler.py # Main scheduler and orchestrator
├── intranet_login.py # ALX intranet web scraper
├── genai.py # AI content generation
├── telegram_notify.py # Telegram bot integration
├── credentials.py # Credential management
├── requirements.txt # Python dependencies
├── .env # Environment variables
├── Dockerfile # Container configuration
└── README.md # Documentation
- Credentials stored securely in environment variables
- Session-based authentication with CSRF protection
- No hardcoded sensitive information
- Dockerized deployment option
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ALX Software Engineering Program
- Google Generative AI (Gemini)
- Telegram Bot API
- Beautiful Soup for web scraping
- APScheduler for task scheduling
This tool is designed for educational purposes to help ALX students manage their coursework. Please ensure compliance with ALX's terms of service when using automated tools to access their intranet.