A Python application that extracts course grade data from a PDF file, calculates your current CGPA, and allows you to simulate grade improvements and plan for future courses.
VIT-GPA-Calculator is a Python application that extracts course grade data from a PDF file (specifically, your VIT grade history), calculates your current CGPA, and provides powerful simulation and planning tools. It uses the Camelot library to parse tables from PDFs and Pandas for data manipulation. The advanced version leverages the Rich library for a visually appealing and interactive command-line interface.
-
Data Extraction and Cleaning:
- Extracts table data from PDF files using Camelot.
- Cleans and processes data to extract course codes, course titles, credits, grades, and dates (or result declaration dates).
- Handles variations in PDF formats and automatically detects the header row.
- Normalizes course titles for accurate duplicate detection.
- Removes duplicate course entries, keeping the most recent grade.
- Filters out invalid grades.
-
CGPA Calculation and Analysis:
- Calculates current CGPA.
- Provides a detailed grade distribution analysis (number of credits for each grade).
- Presents a summary of total courses and current CGPA.
- Displays courses grouped by grade.
-
Simulations and Planning:
- Grade Improvement Simulation:
- Allows simulating the impact of improving grades in specific courses.
- Converts credits from a lower grade to a higher grade.
- Calculates and displays the projected CGPA after improvements.
- Interactive menu to add, view, reset, and finalize improvement changes.
- Future Courses Simulation:
- Allows adding planned future courses with predicted grades and credits.
- Calculates and displays the projected CGPA, including future courses.
- Interactive menu to add, view, reset, and finalize future course additions.
- Target CGPA Planning:
- Helps plan to reach a desired target CGPA.
- Two input modes:
- Course-by-Course: Enter details for individual future courses.
- Aggregate Mode: Enter groups of courses with total credits and descriptions.
- Calculates the required average grade points per credit to achieve the target.
- (Course-by-Course Mode) Simulates predicted grades and shows the projected CGPA.
- (Aggregate Mode) Displays valid grade combinations across course groups that meet or exceed the target CGPA.
- Grade Improvement Simulation:
-
Visualization:
- Grade History Visualization:
- Displays a table showing the cumulative CGPA progression over time.
- Includes a simple ASCII line graph visualizing the CGPA trend.
- Grade Distribution Visualization:
- Displays a bar chart of the grade distribution.
- Options to visualize the original distribution, the distribution after grade improvement simulation, or the distribution after future courses simulation.
- ASCII Line Graph Visualization:
- A general-purpose function to display a simple ASCII line graph for any numeric data.
- Grade History Visualization:
-
User Interface (main_advanced.py):
- Enhanced user interface using the Rich library.
- Interactive menus and prompts for easy navigation.
- Clear and visually appealing output with tables, panels, and progress bars.
- Comprehensive instructions and error handling.
- ASCII art banner.
This project includes two versions of the main application:
main.py
: A basic version of the GPA calculator with console output.main_advanced.py
: An advanced version with a richer user interface using the Rich library for better visualization and interactive features.
-
Clone the repository
git clone https://github.com/Kaos599/VIT-GPA-Calculator.git cd VIT-GPA-Calculator
-
Install dependencies
It's recommended to use a virtual environment. For example, using venv:
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate pip install -r requirements.txt
-
Install Ghostscript
Camelot requires Ghostscript. Please install it from Ghostscript Downloads.
-
Download your Grade History PDF from VTOP.
-
Run the application:
-
For the basic version:
python main.py
-
For the advanced version:
python main_advanced.py
-
-
When prompted, enter the full path to your PDF grade history file.
-
Follow the on-screen instructions to view your current grade analysis, simulate grade improvements, plan future courses, or visualize your data. The advanced version provides a menu-driven interface.
Contributions are welcome! Please fork this repository and submit pull requests.
This project is licensed under the MIT License.