Metadata-Version: 2.1
Name: guc-cms-scrapper
Version: 0.2.2
Summary: A package to scrap the GUC university CMS to get the courses and their details
Author: Mathew Hany
Author-email: mathew.hanybb@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
Requires-Dist: google-generativeai (>=0.8.3,<0.9.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: requests-ntlm (>=1.3.0,<2.0.0)
Description-Content-Type: text/markdown

# GUC CMS Scrapper

A Python package to scrape the German University in Cairo (GUC) Course Management System (CMS) to retrieve courses and their details.

## Installation


### Pip
```bash
pip install guc-cms-scrapper
```

### Poetry
```bash
poetry add guc-cms-scrapper
```

## Usage

### Authentication

```python
from guc_cms_scrapper import GucCmsScrapper

# Initialize the scrapper with your GUC credentials
scrapper = GucCmsScrapper(username='<your guc username>', password='<your guc password>')
```

### Getting Course List

```python
# Fetch all available courses
courses = scrapper.get_courses()

for course in courses:
  print(f"Course: {course.name}")
  print(f"Code: {course.code}")
  print(f"ID: {course.id}")
  print(f"Semester: {course.semester}")
  print("---")
```

### Getting Course Data

```python
# Fetch detailed data for a specific course
course_data = scrapper.get_course_data(course_id="12345", semester="52")

# Access course announcements
print(course_data.announcements)

# Access weekly content
for week in course_data.weeks:
  print(f"\nWeek starting {week.start_date}")
  print(f"Description: {week.description}")
  
  for item in week.items:
    print(f"Title: {item.title}") # 1 - Practice Assignment 3
    print(f"Clean Title: {item.clean_title}") # Practice Assignment 3 (without the leading number)
    print(f"Type: {item.type}") # Lecture, Assignment, Solution, Other
    print(f"Description: {item.description}")
    print(f"URL: {item.url}")
```

## Development

### Pre-requisites
- Python
- Poetry

### Useful Commands
TODO: Add useful commands (building, publishing, etc.)

