Skip to content

Commit 5b83a82

Browse files
Merge pull request #65 from jinwandalaohu66/submission/script_mnfqk5cz
2 parents 31129e5 + d9eab4c commit 5b83a82

2 files changed

Lines changed: 40 additions & 2 deletions

File tree

script_library/index.json

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"format_version": 1,
3-
"data_version": 45,
4-
"updated": "2026-03-31T15:17:18.975Z",
3+
"data_version": 46,
4+
"updated": "2026-04-01T07:40:10.066Z",
55
"announcement": null,
66
"categories": [
77
{
@@ -1098,6 +1098,29 @@
10981098
"updated": null,
10991099
"status": "active",
11001100
"lines": 1122
1101+
},
1102+
{
1103+
"id": "script_mnfqk5cz",
1104+
"name": "二维码生成器",
1105+
"name_en": "二维码生成器",
1106+
"desc": "生成二维码(需拓展qrcode库)",
1107+
"desc_en": "生成二维码(需拓展qrcode库)",
1108+
"category": "basic",
1109+
"file": "scripts/basic/script_mnfqk5cz.py",
1110+
"thumbnail": null,
1111+
"version": 1,
1112+
"file_type": "py",
1113+
"author": "爱玩Arduino",
1114+
"author_en": "爱玩Arduino",
1115+
"tags": [
1116+
"community"
1117+
],
1118+
"requires": [],
1119+
"min_app_version": "1.5.0",
1120+
"added": "2026-04-01",
1121+
"updated": null,
1122+
"status": "active",
1123+
"lines": 15
11011124
}
11021125
]
11031126
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import qrcode
2+
3+
qr = qrcode.QRCode(
4+
version=1,
5+
error_correction=qrcode.constants.ERROR_CORRECT_L,
6+
box_size=10,
7+
border=4,
8+
)
9+
10+
qr.add_data("https://doubao.com")
11+
qr.make(fit=True)
12+
13+
# 前景黑,背景白
14+
img = qr.make_image(fill_color="black", back_color="white")
15+
img.save("qr_custom.png")

0 commit comments

Comments
 (0)