Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraction APIs #42

Open
Srikar-V675 opened this issue May 18, 2024 · 0 comments
Open

Extraction APIs #42

Srikar-V675 opened this issue May 18, 2024 · 0 comments
Assignees
Labels
feature New feature

Comments

@Srikar-V675
Copy link
Owner

Start
|
v
Identify Subjects and Enter Credits
|
v
POST /identify_subjects/{section_id}
|
|-- Input: section_id, usn (optional)
|-- Process:
| 1. Fetch section by section_id.
| 2. If usn not provided, select a random usn from the section's USN range.
| 3. Scrape the result for the usn to identify subjects.
| 4. Return identified subjects to the user for credit input.
|
v
Output: List of subjects with subject codes and names
|
v
Enter Credits for Identified Subjects
|
v
POST /add_subjects/{section_id}
|
|-- Input: List of subjects with credits
|-- Process:
| 1. Store subjects and their credits in the subjects table.
|
v
Output: Confirmation of successful addition
|
v
Extract Data for All USNs in Section
|
v
POST /extract/{section_id}
|
|-- Input: section_id
|-- Process:
| 1. Fetch section by section_id.
| 2. Generate USN range for the section.
| 3. Initiate background task to scrape results for all USNs.
|
v
Output: Confirmation that extraction process has started
|
v
Background Task: Scrape and Store Data
|
|-- For each usn in the range:
| 1. Scrape result for usn.
| 2. Fetch or create student in database.
| 3. For each subject mark:
| a. Match subject code with subjects table.
| b. Store marks in the marks table.
| 4. Calculate total marks and SGPA.
| 5. Store student performance in the student_performance table.
|
v
End

@Srikar-V675 Srikar-V675 added the feature New feature label May 18, 2024
@Srikar-V675 Srikar-V675 added this to the Complete building API milestone May 18, 2024
@Srikar-V675 Srikar-V675 self-assigned this May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant