Python Script to download results of whole class/branch by providing attendance Excel file. ๐
##Description This script created by iamareebjamal batch downloads the result of B.Tech students hosted on http://ctengg.amu.ac.in by reading student information from Attendance Excel files.
This script is provided on as-is basis and there is no responsibility of the developer to ensure proper working and genuinety of results downloaded. Use on your risk. ๐
Code of the program is open (obviously, Python) and it is encouraged to use it for educational purposes, tweaking, merging with other programs strictly till it remains personal. If intended otherwise, it should follow the GNU LICENSE provided.
There's no guarantee that code will be easy to understand. Program is modular and does similar works in different modules so redundancy is natural. Assume it to be dirty coded. Be my guest to optimise it. Don't expect helpful comments. ๐
######Requirements
- Requires Python 3 Environment set up, (duh). ๐
- Needs these Python Modules to be installed -
BeautifulSoup
,requests
,xlsxwriter
,xlrd
. Install libraries usingpip install -module_name-
. Currently, script is made to run on Android, but will only require change of directories inenlist.py
andutils.py
for working in Windows, Linux, and OS X.- Works on Windows, Linux and Mac. Although script is tested briefly on Windows only.
- This branch hosts Windows, Linux and Mac script while Android one will be found in
android
branch. - Requires internet connection to download results. Option 2 and 3 (Read Instructions in
main.py
) do not require internet if result has been downloaded previously. - Requires an Attendance Excel file to access student name, faculty number and enrolment number.
######To-Do
- Create android branch.
- Fix master branch for Windows, Linux, Mac.
- Fix and generalize directories and test.
######Functions The program does 3 tasks :
- Reads information from Attendance Excel file and downloads the result from site and saves in
/iaj/Store/
as HTML file. - Iterates through downloaded HTML and loads CPI and SPI of students.
- Creates an Excel file with Student information and their CPI and SPI.
####Instructions
- Place all 3
.py
files in any folder in which you have writing permissions. LikeD:\Results\
or~/home/user/results/
. *Normally,C:\
drive on Windows doesn't have writing permissions. - Run the main script,
main.py
so it creates all necessary folders and read the instructions it prints. - Now, script will demand a file name. You need to put the Attendance Excel file in
/Input/
folder in order to do so. - Now give the exact name of Excel file to the script. Eg:
AM111.xlsx
- Now, the script will present 3 options if file is loaded successfully:
- Download Results.
- Load Marks.
- Create Worksheet. Choose relevant option based on functions listed above or the instructions printed by the script.
- Downloaded results are stored in
/iaj/Store
. You can check individual results in any HTML Viewer or Browser. - The worksheet is created in
/Output/
folder and contains CPI and SPI along with student information.
Note : The script saves some configuration and database files in /iaj/
folder for future faster loading and performance purposes. Please don't delete them ๐. You can delete the HTML files in Store folder to download result again. ๐
Happy 'Result'ing and best of luck! ๐ฏ
All Hail Python ๐