Programming Language: Python 🐍
Image Processing: Pillow (PIL) 🎨
Data Handling: Pandas 📊
Font Management: Custom TTF Font (Bricolage Grotesque) 🎨
Scheduling: Schedule library 📅
python -m venv venv # Create virtual environment
source venv/bin/activate # Activate on macOS/Linux
venv\Scripts\activate # Activate on Windows
pip install -r requirements.txt
pip install -r post_scheduler/requirements.txt
uvicorn app.main:app --reload
python post_scheduler/scheduler.py
- Generate motivational quotes using Gemini AI
- Support for different templates based on the day
- Image processing with proper text wrapping
- API endpoints for template management and carousel generation
- Runs daily at 5:40 PM IST
- Automatically selects templates based on the day:
- Monday: Uses "Freaking Monday" template
- Friday: Uses "Weekend Mode" template
- Other days: Uses generic template
- Ensures quote uniqueness by maintaining a history
- Generates and saves quotes with proper formatting
- Support for multi-slide carousel posts
- Custom background colors (green/yellow)
- Proper text formatting and positioning
├── app/ # FastAPI application
├── generators/ # Quote and carousel generation scripts
├── post_scheduler/ # Automated scheduling system
│ ├── scheduler.py # Main scheduler script
│ ├── requirements.txt # Scheduler-specific dependencies
│ └── quotes.csv # Quote history database
├── templates/ # Image templates
└── assets/ # Fonts and other assets
- Runs daily at 5:40 PM IST
- Maintains quote history in
post_scheduler/quotes.csv
- Automatically selects appropriate templates
- Prevents duplicate quotes
freakin-monday.png
: Used for Monday postsweekend-mode.png
: Used for Friday/weekend postsgeneric.png
: Used for other days- Carousel templates in both green and yellow variants
-
Adding New Templates
- Place templates in
templates/motivation-quotes/
- Update
template_map
ingenerate_quotes_content.py
- Place templates in
-
Modifying Schedule
- Edit the time in
post_scheduler/scheduler.py
- Default: 5:40 PM IST
- Edit the time in
-
Quote Generation
- Uses Gemini AI API
- Requires API key in
.env
file - Ensures uniqueness through CSV history
-
Instagram Integration
- TODO: Add Instagram posting logic in scheduler
- Current version generates images locally
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Add Instagram API integration
- Implement retry mechanism for failed generations
- Add monitoring and notifications
- Create admin dashboard for quote management
- Add support for multiple social media platforms
Happy Generating! 🚀# sm-ai-agent-v2.0