Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ID Automation System

Automated student ID card generation using Python, Pillow, and QR encoding.

This package dynamically generates identity cards by combining:

  • Profile photo processing (circular masking)
  • QR code encoding
  • Signature overlay
  • Custom typography
  • Template-based rendering
  • CLI + batch CSV support

Designed as a modular, installable Python package.


✨ Features

  • Circular profile photo masking
  • Dynamic QR code generation
  • Template-based ID layout system
  • Batch generation from CSV
  • Modular architecture
  • Installable CLI command
  • Pip-installable package

📦 Installation

From TestPyPI

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple \
  id-automation

From Source (Development Mode)

git clone https://github.com/yourusername/id-automation.git
cd id-automation
pip install -e .

🚀 Usage

Once installed, you can use the CLI command:

Make sure that you have the correct signature file in assets/signature/sign.png and all the people's photos in photos/


🔹 Generate a Single ID

id-automation --single \
  --name "Aayush Pokharel" \
  --program "Computer Science" \
  --year "2019" \
  --photo "Aayush.png"

Generated files will be saved in:

output/

🔹 Batch Generation (CSV)

id-automation --csv students.csv

Example students.csv

name,program,year,photo
Aayush Pokharel,Computer Science,2019,Aayush.png
John Doe,IT,2020,john.png

Required CSV columns:

  • name
  • program
  • year
  • photo

🗂 Project Structure

id-automation/
│
├── id_automation/
│   ├── generator.py
│   ├── qr.py
│   ├── image_utils.py
│   └── cli.py
│
├── assets/
│   ├── templates/
│   ├── fonts/
│   └── signature/
│
├── photos/
├── output/
├── pyproject.toml
└── README.md

🛠 Tech Stack

  • Python 3.9+
  • Pillow
  • qrcode
  • argparse
  • setuptools (PEP 621 packaging)

🧠 How It Works

  1. Loads ID base template
  2. Applies circular mask to profile image
  3. Generates QR code encoding user data
  4. Overlays name, program, and year using custom fonts
  5. Composites all layers into final ID image
  6. Saves result to output directory

🧪 Development

Install in editable mode:

pip install -e .

Run locally:

id-automation --help

👤 Author

Aayush Pokharel

Email: [email protected]

GitHub: github.com/AayushPokharel

LinkedIn: linkedin.com/in/AayushPokharel


📌 Status

Personal / KUCC Project

Version: 2.0.0

About

I built this Python system to automate ID card generation for KUCC back in my college days.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Contributors

Languages