找传奇、传世资源到传世资源站!

二维码批量生成[PYTHON脚本]

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

根据文本数据列表,批量生成二维码的Python程序。本示例源文件PL_XLD_CODE.txt生成目标文件在同一目录下:from clipboard
运行过程:from clipboard
def make_qr_code(contentsave_path=None):    """     Generate QR Code by given params     :param content: The content encoded in QR Code     :param save_path: The path where the generated QR Code image will be saved in.                       If the path is not given the image will be opened by default.     """     qr_code_maker = qrcode.QRCode(version=2,                                  error_correction=qrcode.constants.ERROR_CORRECT_M,                                  box_size=4,                                  border=1,                                  )    qr_code_maker.add_data(data=content)    qr_code_maker.make(fit=True)    img = qr_code_maker.make_image(fill_color="black"back_color="white")    if save_path:        img.save(save_path)    else:        img.show()
另外还有带ICON的,详见源文件。

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复