Automated, bilingual (Bangla/English) examination-bill generation for the teachers of Khulna University of Engineering & Technology (KUET).
- Overview
- Key Features
- How It Works
- The Input Document & Bill Categories
- System Requirements
- Tech Stack
- Project Structure
- Installation
- Usage Guide
- Authentication & Security
- Configuration Files
- Packaging as an Executable
- Contributing
- Authors & Acknowledgements
- License
BillForge is a desktop-based automation tool that drastically reduces the manual effort involved in preparing examination remuneration bills for teachers. Every semester and during backlog examinations, KUET's departments must compute individual payments for dozens of teaching staff based on a wide variety of examination duties (question setting, script examining, tabulation, viva-voce, and many more).
Manually extracting this data from consolidated duty sheets and calculating the exact amount owed to each teacher — in Bengali, with numbers converted to words — is tedious and error-prone. BillForge reads a structured Microsoft Word (.docx) duty document, parses every relevant table, applies the official rate logic, and produces a ready-to-print individual Excel bill (.xlsx) for each teacher in Bengali. It can even dispatch those bills by email automatically.
BillForge ships with two specialised pipelines, selectable from the welcome screen:
| Edition | Use Case | Theme |
|---|---|---|
| General Version | Regular semester examinations | Green |
| Backlog Version | Backlog / supplementary examinations | Red |
- Fully automated bill generation — reads a
.docxduty document and outputs one bilingual Excel bill per teacher. - Two processing pipelines — dedicated logic for General and Backlog examinations.
- Bilingual output — generates bills in Bangla, with English department names, designations, and years translated automatically.
- Number-to-words conversion — converts any monetary figure into Bangla words (e.g.
১২৫০.৫০→ "এক হাজার দুইশত পঞ্চাশ টাকা পঞ্চাশ পয়সা মাত্র"). - Automatic rate logic — applies per-student and per-khata rates, minimum charges, and lab-credit scaling defined in the rate template.
- Built-in authentication — secure user sign-up and login with SHA-256 hashed credentials stored in an embedded SQLite database.
- Email distribution — automatically emails each generated bill to the corresponding teacher via SMTP (Gmail).
- Progress & loading UI — animated GIF welcome screen and threaded progress bars so the GUI never freezes during long operations.
- Error reporting — a dedicated window lists any data mismatches (e.g. an unrecognised teacher name in a table) so the document can be corrected.
- Standalone executable — distributable as a one-file Windows
.exevia PyInstaller.
┌──────────────┐ ┌─────────────────┐ ┌────────────────────┐
│ .docx duty │ ──▶ │ Table Parser │ ──▶ │ Per-teacher data │
│ document │ │ (python-docx) │ │ models (Teacher) │
└──────────────┘ └─────────────────┘ └─────────┬──────────┘
│
┌──────────────────────────────┘
▼
┌─────────────────┐ ┌─────────────────┐ ┌────────────────────┐
│ Rate template │ ──▶ │ Bill Calculator │ ──▶ │ Bangla .xlsx bill │
│ (.xlsx) │ │ + Bangla │ │ per teacher │
└─────────────────┘ │ translator │ └─────────┬──────────┘
└─────────────────┘ │
▼
┌────────────────────────┐
│ Email dispatch (SMTP) │
└────────────────────────┘
Step-by-step workflow:
- Launch the app and pick General or Backlog on the welcome screen.
- Log in (or sign up the first time) with your credentials.
- On the dashboard, select three inputs:
- the
.docxduty document, - the
.xlsxemail/contact file, - the destination folder for the generated bills.
- the
- Click Generate — BillForge parses the document's tables, builds a
Teacherobject per staff member, applies the rate logic, writes a personalised Bangla bill, and saves it as<Teacher Name>.xlsx. - (Optional) Click Send Email to dispatch each bill to the teacher's email address automatically.
BillForge expects a single .docx file whose body contains a sequence of underlined-heading tables. Each table corresponds to one examination duty category. The parser maps table-by-table to the following bill categories:
| # | Category (Table) | Description |
|---|---|---|
| 1 | Teacher Information | Name, designation, department |
| 2 | Question Paper Moderation Board | Chairman / Member roles |
| 3 | Question Paper Setter & Script Examiner | Per-student script counts & rates |
| 4 | Examiners of Class Tests | Class-test counts per course |
| 5 | Examiners of Sessional Classes | Lab-credit-scaled payments |
| 6 | Script Scrutinizer | Scrutiny duties |
| 7 | Tabulation | Tabulation work |
| 8 | Typing & Drawing | Typing/drawing duties |
| 9 | Central Viva-Voce | Viva participation |
| 10 | Student Advising | Advising duties |
| 11 | Seminar | Seminar participation (group size aware) |
| 12 | Thesis Progress Defense | Thesis committee work |
| 13 | Final Grade Sheet Verification | Verification duties |
| 14 | Course Coordinator | Coordination allowance |
| 15 | List of Duty | Miscellaneous duty list |
The parser recognises tables by their order and validates that every teacher name it encounters exists in Table 1. Any mismatch is surfaced in the Error Report window.
- OS: Windows 10 / 11 (the app uses
win32com/xlwingsand Windows-specific resource paths). - Python: 3.8 or newer.
- Microsoft Excel installed (required by
xlwingsfor live recalculation of totals). - Microsoft Word
.docxdocuments as input.
| Area | Technology |
|---|---|
| Language | Python 3 |
| GUI | Tkinter + Pillow (images / animated GIFs) |
| Word parsing | python-docx, docx2txt |
| Excel I/O | openpyxl, xlwings, pandas, xlrd |
| Storage | sqlite3 + pickle (credentials & app data) |
smtplib (MIME) |
|
| Windows interop | pywin32 (win32com.client) |
| Translation | Custom Bangla dictionaries + googletrans |
| Packaging | PyInstaller |
BillForge/
├── BillForge.mp4 # Demo video
├── BillForge - Swaraj.pptx # Project presentation
├── User Manual.pptx # User manual deck
├── Dependencies.txt # Dependency list & driver info
├── README.md # This file
└── Billforge_Project_Code/
├── GUI_WelcomeScreen.py # ENTRY POINT — version selection
├── GUI_Login_For_BacklogDataProcessing.py
├── GUI_Login_ForGeneralDataProceaaingDashboard.py
├── GUI_Dashboard_Backlog.py # Backlog dashboard
├── GUI_Dashboard_For_GeneralDataProcessing.py # General dashboard
├── GUI_Sign_Up.py # Sign-up screen
├── datasave.py # SQLite save (credentials/data)
├── showdata.py # SQLite read (credentials/data)
├── test.py / showdata.py
├── License.txt
├── Backend/
│ ├── BacklogProcessing.py # Core backlog bill engine
│ ├── GeneralDataProcessing.py # Core general bill engine
│ ├── Year_Extractor_Module.py # Extracts year/semester from .docx
│ ├── Digit_To_BanglaTaka_ConverterApi.py # Number → Bangla words
│ ├── EmailProcessing.py # Reads email list, triggers sends
│ └── EmailSendingModule.py # SMTP send per teacher
└── data/
├── database/ # BillForge.db, summarydb.db (SQLite)
├── excel-files/ # Templates & lookup tables
│ ├── templatebill.xlsx # General rate template
│ ├── templatebill_backlog.xlsx # Backlog rate template
│ ├── bangla_teachers_name.xlsx # English → Bangla name map
│ └── Additional_data.xlsx # Email credentials config
└── images/ # UI assets, logos, animated GIFs
-
Clone the repository
git clone https://github.com/Swaraj44/BillForge.git cd BillForge/Billforge_Project_Code -
(Recommended) Create and activate a virtual environment
python -m venv venv venv\Scripts\activate # Windows
-
Install the dependencies
pip install openpyxl requests xlwings python-docx googletrans==4.0.0-rc1 \ pywin32 pillow docx2txt pandas xlrdsqlite3,pickle,tkinter,pathlib,email,smtplib,threading,hashlib,webbrowser,os,sysandtimeare part of the Python Standard Library and need no installation. -
Launch the application
python GUI_WelcomeScreen.py
A ready-to-use Windows setup executable is available on Google Drive — see the link in the original project distribution. No Python installation is required.
- Start the app (
python GUI_WelcomeScreen.py). The animated welcome screen appears. - Choose an edition:
- Button 1 → General Version (green login)
- Button 2 → Backlog Version (red login)
- Authenticate. On first run, click Sign Up to create a user, then log in.
- Provide inputs on the dashboard:
- Select Bill Docx File → the examination duty
.docx. - Select Excel File → the
.xlsxcontaining teacher names + email addresses. - Select Destination → the output folder for generated bills.
- Select Bill Docx File → the examination duty
- Generate. Click the Generate button. A progress bar appears while bills are produced. Each teacher receives a file named
<Teacher Name>.xlsx. - (Optional) Edit Email — opens the selected Excel file so contacts can be adjusted.
- (Optional) Send Email — dispatches every generated bill to its teacher via email.
- Review errors — if any table contains an unrecognised teacher or empty cell, the Error Report window lists the problems for correction.
- Credentials are stored locally in an embedded SQLite database (
data/database/BillForge.db). - Passwords are never stored in plain text — they are hashed with SHA-256 before being persisted (see
GUI_Sign_Up.pyand the login modules). - Each record is serialised with
pickleinto aBLOBcolumn, keyed by username.
Located under Billforge_Project_Code/data/excel-files/:
| File | Purpose |
|---|---|
templatebill.xlsx |
General rate template — per-student charges, minimum script charges, sessional per-student charge, etc. |
templatebill_backlog.xlsx |
Backlog rate template (same role, backlog rules). |
bangla_teachers_name.xlsx |
Lookup of English teacher names → Bangla names + salary ID. |
Additional_data.xlsx |
Sender email address and app password used by the email module. |
Tip: To enable email sending, enter a Gmail sender address and a Google App Password into
Additional_data.xlsx(Sheet1).
BillForge is designed to be frozen with PyInstaller. The code already provides a resource_path() helper in every module that resolves bundled assets both in development and inside the PyInstaller _MEIPASS temporary folder.
Example one-file build (run from Billforge_Project_Code/):
pyinstaller --noconfirm --onefile --windowed ^
--add-data "data;data" ^
--icon "data/images/general_logo.ico" ^
GUI_WelcomeScreen.pyThe resulting dist/GUI_WelcomeScreen.exe is a standalone Windows application.
Developed by
- Swaraj Chandra Biswas
- Chinmoy Modak Turjo
Department of Computer Science and Engineering, Khulna University of Engineering & Technology (KUET), Khulna, Bangladesh.
Under the supervision of
- Dr. Sheikh Imran Hossain — Assistant Professor, Department of Computer Science and Engineering, KUET.
Copyright © 2024 Swaraj Chandra Biswas & Chinmoy Modak Turjo .
This project is licensed under the MIT License. See Billforge_Project_Code/License.txt for the full notice. The software is provided "as is", without warranty of any kind.