diff --git a/script_library/index.json b/script_library/index.json index f382cf1..ae4163d 100644 --- a/script_library/index.json +++ b/script_library/index.json @@ -1,7 +1,7 @@ { "format_version": 1, - "data_version": 45, - "updated": "2026-03-31T15:17:18.975Z", + "data_version": 46, + "updated": "2026-04-01T07:40:10.066Z", "announcement": null, "categories": [ { @@ -1098,6 +1098,29 @@ "updated": null, "status": "active", "lines": 1122 + }, + { + "id": "script_mnfqk5cz", + "name": "二维码生成器", + "name_en": "二维码生成器", + "desc": "生成二维码(需拓展qrcode库)", + "desc_en": "生成二维码(需拓展qrcode库)", + "category": "basic", + "file": "scripts/basic/script_mnfqk5cz.py", + "thumbnail": null, + "version": 1, + "file_type": "py", + "author": "爱玩Arduino", + "author_en": "爱玩Arduino", + "tags": [ + "community" + ], + "requires": [], + "min_app_version": "1.5.0", + "added": "2026-04-01", + "updated": null, + "status": "active", + "lines": 15 } ] } diff --git a/script_library/scripts/basic/script_mnfqk5cz.py b/script_library/scripts/basic/script_mnfqk5cz.py new file mode 100644 index 0000000..ce11ce4 --- /dev/null +++ b/script_library/scripts/basic/script_mnfqk5cz.py @@ -0,0 +1,15 @@ +import qrcode + +qr = qrcode.QRCode( + version=1, + error_correction=qrcode.constants.ERROR_CORRECT_L, + box_size=10, + border=4, +) + +qr.add_data("https://doubao.com") +qr.make(fit=True) + +# 前景黑,背景白 +img = qr.make_image(fill_color="black", back_color="white") +img.save("qr_custom.png") \ No newline at end of file