You can use the qr
command to convert any character string into a QR code and display it.
It is assumed that the pip
command is available.
https://pypi.org/project/pip/
Click here for the package to use qrcode https://pypi.org/project/qrcode/
Install with pip
.
Install ** pil ** (Pillow) at the same time to export the image file.
pip install qrcode[pil]
When you execute the following command in the terminal, the QR code will be displayed immediately.
qr 'Hello, World!'
If you specify the file name after >
, you can export it as image data.
qr 'Hello, World!' > qr.png
There are many useful web services, but are there any scenes where you hesitate to use them? In such a case, it is very convenient at the time of development and operation check if you have a means to generate it quickly at hand.
Recommended Posts