Skip to content

cclljj/Name_Card_QRCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Personal Business Card QR Code Generator

License: MIT Python 3.8+ Flask

A Flask-based Web Application that generates a comprehensive vCard QR Code and a mobile-friendly PDF business card using a premium, responsive HTML interface.

Features

  • Premium UI: Modern, glassmorphism-inspired design using HTML5/CSS3.
  • Profile Management: Precise input for Chinese and English names (Surname/Given Name split) and dynamic list of affiliations/positions.
  • Primary Job Logic: Designate one job as "Primary" via radio button (updates DOM instantly) to appear on the main card face.
  • Unlimited Contact Details: Add unlimited phone numbers and emails with specific labels (Work, Home, Mobile, Other) via dynamic fields.
  • vCard QR Code: Generates a standard vCard 3.0 string encoded in a QR code for instant contact saving.
  • PDF Export: Generates a 54mm x 90mm (Standard Vertical) PDF business card with Mac-verified Chinese font support and vector iconography.

Installation

  1. Clone the repository:

    cd /Users/cclljj/Dropbox/Program/AntiGravity/Name_Card_QRCode
  2. Set up Virtual Environment:

    python3 -m venv .venv
    source .venv/bin/activate
  3. Install Dependencies:

    pip install -r requirements.txt

Usage

  1. Run the Application:

    ./run.sh

    Or manually:

    source .venv/bin/activate
    python main.py
  2. Access in Browser: Open http://localhost:8000

Technical Details

  • Backend: Python (Flask)
  • Frontend: Vanilla HTML/CSS/JS (No complex build steps)
  • PDF Generation: ReportLab (Python)
  • QR Generation: QRCode (Python)

Font Support

The application logic attempts to load PingFang.ttc, STHeiti Light.ttc, or Arial Unicode.ttf from standard macOS paths.

License

This project is licensed under the MIT License - see the LICENSE file for details.