How rakesh-myana/mark-sheet-generator works
Main Components
a. Python Script (xlsheet.py): This is the core of the project where the orchestration happens.
b. Web Automation Module: Using Selenium, this component handles browser interactions to navigate, input roll numbers, and scrape result data from the JNTUH Results website.
c. Excel Generation Module: Utilizing xlsxwriter, this module takes the scraped data and organizes it into an Excel sheet.
d. External Dependencies:
• Selenium WebDriver: Controlled via the chromedriver (chromedriver.exe and possibly LICENSE.chromedriver) to interact with the dynamic content on the website.
• JNTUH Results Website: An external system being scraped for data.
e. Data Flow Input: The roll numbers which serve as input for data retrieval.
Relationships and Interactions
• The Python script (xlsheet.py) acts as the main controller.
• It initiates the Selenium WebDriver to load the external website.
• The Web Automation component (built into the script using Selenium) navigates to the results website and inputs individual roll numbers, waiting for the dynamic elements (using explicit waits) to load.
• Once the required data (student name, roll number, semester SGPA, and overall CGPA) is retrieved using appropriate XPath/CSS selectors, it is then passed to the Excel Generation module.
• The data is then organized and written into an Excel file using xlsxwriter.
Architectural Patterns and Technology Choices
• Web Scraping with Selenium: Use of explicit waits and dynamic locator strategies indicates thoughtful handling of asynchronous web content.
• Data Processing and Storage: Data is transformed into a structured format (Excel) using a library designed specifically for that purpose.
• The design demonstrates a linear data pipeline: Input (Roll Numbers) → Web Automation (Data Retrieval) → Data Processing (Extraction & Transformation) → Data Output (Excel Sheet).
a. Component Labels:
• "Python Script (xlsheet.py)"
• "Selenium WebDriver (chromedriver.exe)"
• "JNTUH Results Website" (marked as an external system)
• "Excel Generation (xlsxwriter)"
b. Data Flow Direction:
• From "Python Script" → launch Selenium WebDriver.
• From "Selenium WebDriver" → interact with "JNTUH Results Website".
• Data flows back from "JNTUH Results Website" to "Selenium WebDriver".
• "Selenium WebDriver" → passes the retrieved data to "Excel Generation".
c. Additional Elements:
• “Input Roll Numbers” as an initial step/data source feeding into the "Python Script" module.
• Any intermediate error handling or retry logic can be briefly noted if necessary.