qr-gen

TotalClaw 作者 totalclaw

从文本、URL、WiFi 凭证、vCard 或任何数据生成 QR 码。当用户想要创建 QR 码、将链接共享为可扫描代码、生成 WiFi 登录 QR 代码、创建联系人/vCard QR 代码或生成任何可扫描条形码图像时使用。输出 PNG、SVG 或 ASCII 艺术作品。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~claudiodrusus-qr-gen
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~claudiodrusus-qr-gen/file -o claudiodrusus-qr-gen.md
## 概述(中文)

从文本、URL、WiFi 凭证、vCard 或任何数据生成 QR 码。当用户想要创建 QR 码、将链接共享为可扫描代码、生成 WiFi 登录 QR 代码、创建联系人/vCard QR 代码或生成任何可扫描条形码图像时使用。输出 PNG、SVG 或 ASCII 艺术作品。

## 原文

# QR Code Generator

Generate QR codes via the bundled Python script.

## Quick Start

```bash
python3 scripts/generate_qr.py "https://example.com" -o qr.png
```

## Common Patterns

### URL or text
```bash
python3 scripts/generate_qr.py "https://example.com" -o link.png
```

### WiFi network (scannable by phones)
```bash
python3 scripts/generate_qr.py "wifi" --wifi-ssid "MyNetwork" --wifi-pass "secret123" -o wifi.png
```

### vCard contact
Generate the vCard string and pipe it:
```bash
python3 scripts/generate_qr.py "BEGIN:VCARD
VERSION:3.0
FN:Jane Smith
TEL:+1234567890
EMAIL:jane@example.com
END:VCARD" -o contact.png
```

### ASCII art (terminal preview)
```bash
python3 scripts/generate_qr.py "hello" --format ascii
```

### SVG (scalable, web-friendly)
```bash
python3 scripts/generate_qr.py "data" -o code.svg
```

## Options

- `-o FILE` — output path (default: qr.png)
- `-s N` — box size in pixels (default: 10)
- `--border N` — border width (default: 4)
- `--format png|svg|ascii` — force format (auto-detected from extension)
- `--error-correction L|M|Q|H` — error correction level (default: M; use H for logos/damage tolerance)

## Dependencies

The script auto-installs `qrcode[pil]` via pip if missing. No manual setup needed.