← 返回
效率工具 中文

QR Code Generator

Generate QR codes for text, URLs, WiFi connections, and business cards (vCard). Use when: (1) creating QR codes for websites or text, (2) generating WiFi con...
生成二维码,用于文本、网址、Wi‑Fi 连接和名片(vCard)。适用场景:(1)为网站或文本生成二维码;(2)生成 Wi‑Fi 连接二维码。
ouyangabel
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 862
下载
💾 4
安装
1
版本
#generator#latest#qr#qrcode#tools#vcard#wifi

概述

QR Code Generator

Generate QR codes locally for various use cases. No API calls required - everything is generated on your machine.

When to Use

  • Share URLs quickly via QR codes
  • Create WiFi connection codes for guests
  • Generate digital business cards (vCard)
  • Encode any text data into QR format

Prerequisites

Install the required Python package:

pip3 install qrcode[pil]
# or on Ubuntu/Debian:
sudo apt-get install python3-qrcode

Quick Start

Generate URL QR Code

python3 scripts/qr-code.py text "https://example.com"
# Output: QR code saved to ~/qrcode_output.png

Generate WiFi QR Code

python3 scripts/qr-code.py wifi "MyNetwork" "myPassword"
# Scan with phone to auto-connect

Generate Business Card

python3 scripts/qr-code.py vcard --name "John Doe" --phone "+1234567890" --email "john@example.com"

Commands

text [output_path]

Generate a QR code containing any text or URL.

Parameters:

  • content: The text or URL to encode
  • output_path: Optional. Where to save the PNG file. Defaults to ~/qrcode_output.png

Examples:

# Basic URL
python3 scripts/qr-code.py text "https://github.com"

# Custom output location
python3 scripts/qr-code.py text "Hello World" ./hello_qr.png

# Long URL (auto-fits to QR version)
python3 scripts/qr-code.py text "https://example.com/very/long/path?with=parameters"

wifi [output_path]

Generate a QR code that allows phones to connect to WiFi automatically.

Parameters:

  • ssid: WiFi network name
  • password: WiFi password
  • output_path: Optional output path

Supported phones:

  • iOS 11+ (Camera app)
  • Android 9+ (Camera or WiFi settings)
  • Most QR scanner apps

Example:

python3 scripts/qr-code.py wifi "HomeWiFi" "secretPass123" ~/wifi_qr.png

vcard --name [options] [output_path]

Generate a vCard (digital business card) QR code.

Options:

  • --name, -n (required): Full name
  • --phone, -p: Phone number
  • --email, -e: Email address
  • --org, -o: Organization/Company
  • --title, -t: Job title
  • --url, -u: Website URL
  • output: Optional output path

Examples:

# Simple card
python3 scripts/qr-code.py vcard --name "张三"

# Full business card
python3 scripts/qr-code.py vcard \
  --name "John Smith" \
  --phone "+1-555-1234" \
  --email "john@company.com" \
  --org "Acme Corp" \
  --title "Senior Developer" \
  --url "https://johnsmith.dev" \
  ~/business_card.png

Tips

  • QR codes use high error correction - they still work even if partially obscured
  • For large amounts of text, the QR code will automatically use a larger version
  • Generated files are standard PNG images that can be printed or shared digitally
  • WiFi QR codes follow the universal WIFI: format standard

Troubleshooting

"Missing qrcode module" error:

pip3 install qrcode[pil]

Permission denied when saving:

  • Check that the output directory exists
  • Ensure you have write permissions

Output

All generated QR codes are saved as PNG images. The output path will be displayed after successful generation.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 18:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,777
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,178
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,361