Convert university calendar from HTML page to subscribable iCalendar (.ics) format for Google Calendar, Apple Calendar, Outlook, and more.
- 🔄 Auto-sync: Fetches data from university website automatically
- 🔔 Smart Alerts: Reminder 1 day before events at 9 AM
- 📱 Universal Compatibility: Works with all major calendar apps
- ⚡ Fast: CDN caching for optimal performance
- 🎯 Student Filter: Separate calendar with student-relevant events only
The students calendar shows only events that contain these keywords (in Arabic):
- Registration (تسجيل)
- Exams/Tests (امتحان، اختبار)
- Study/Semester (دراسة، فصل دراسي)
- Vacations/Holidays (إجازة، عطلة)
- Add/Drop period (حذف، إضافة)
- Withdrawal (انسحاب)
- Results/Grades (نتائج، درجات)
- Lectures/Classes (محاضرة، دوام)
- Semester start/end (بداية، نهاية)
- Students (الطلاب، طالب)
Visit: https://bau-cal.vercel.app
Choose your version:
- Students Calendar (filtered): Only student-relevant events
- Full Calendar: All university events
These links will open directly in your calendar app and auto-subscribe:
Students Calendar: webcal://bau-cal.vercel.app/api/calendar-students
Full Calendar: webcal://bau-cal.vercel.app/api/calendar-full
Students Calendar: https://bau-cal.vercel.app/api/calendar-students
Full Calendar: https://bau-cal.vercel.app/api/calendar-full
# Clone the repository
git clone https://github.com/SalehAlSalem/BAU_cal.git
cd BAU_cal
# Install dependencies
npm install
# Create .env file
echo "SOURCE_URL=https://your-university-calendar-url" > .env
# Run locally with Vercel CLI
npm install -g vercel
vercel devBAU_cal/
├── api/
│ ├── lib/
│ │ └── calendar-fetcher.js # Shared library
│ ├── calendar.js # Legacy API endpoint
│ ├── calendar-students.js # Students calendar
│ └── calendar-full.js # Full calendar
├── public/
│ └── index.html # Landing page
├── package.json
├── vercel.json # Vercel configuration
└── README.md
Add the following variable in Vercel settings:
SOURCE_URL=https://example.com/calendar-page
To modify filtering keywords, edit the isStudentEvent function in api/lib/calendar-fetcher.js:
function isStudentEvent(title) {
const studentKeywords = [
'تسجيل', 'امتحان', 'اختبار', 'دراسة',
// Add more keywords here
];
return studentKeywords.some(kw => title.includes(kw));
}Current configuration: 1 alert, 1 day before at 9 AM
To modify alert timing, edit api/lib/calendar-fetcher.js:
// Current: Alert 1 day before at 9 AM (15 hours before midnight)
"TRIGGER:-P1DT15H"
// Examples of other timings:
// "TRIGGER:-P1D" = 1 day before at midnight
// "TRIGGER:-PT12H" = 12 hours before
// "TRIGGER:-P3D" = 3 days before- Fetch Data: Reads HTML page from university website
- Extract Table: Finds calendar table using cheerio
- Parse Dates: Extracts dates and events
- Filter (Students): Filters events by keywords
- Generate ICS: Creates iCalendar file in RFC5545 format
- Cache: Stores result on CDN for 6 hours
Contributions are welcome! You can:
- Open an issue to report a bug
- Submit a pull request to add a new feature
- Improve documentation
MIT License - See LICENSE file for details
- Vercel - Hosting
- Cheerio - HTML parsing
- Node Fetch - HTTP requests
Made with ❤️ for students