[PYTHON] Quickly display the QR code on the command line

Final image

You can use the qr command to convert any character string into a QR code and display it.

Screen Shot 2020-07-17 at 9.51.46.png

Preparation

Prerequisites

It is assumed that the pip command is available. https://pypi.org/project/pip/

qrcode installation

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]

Run

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

in conclusion

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

Quickly display the QR code on the command line
QR code display
Keep getting RSS on the command line
You search commandlinefu on the command line
Arduino development on the command line: vim + platformio
Syntax highlighting on the command line using Pygments
Convert XLSX to CSV on the command line
Operate Route53 on the command line using AWS-CLI.
Think about the selective interface on the command line
Create a QR code for the URL on Linux
Execute the command on the web server and display the result
(Remember quickly) How to use the LINUX command line
Command to generate QR code
Search for large files on Linux from the command line
Decrypt the QR code with CNN
Display the absolute path on the Finder
Python standard module that can be used on the command line
Get, test, and submit test cases on the command line in the AtCoder contest
Display the graph of tensorBoard on jupyter
Install Chrome on the command line on Sakura VPS (Ubuntu) and launch Chrome with python from virtual display and selenium
Shell command to visualize line feed code
Look up your Mac's Wi-Fi network name (SSID) on the command line
Get only the source code of the PyPI package with pip from the command line
Correspondence memo when the direction key cannot be used on the python command line
Try using a QR code on a Raspberry Pi
Frequently used (personally) notes on the tar command
Simply display a line graph on Jupyter Notebook
Try CIing the pushed python code on GitHub.
The story of misreading the swap line of the top command
My thoughts on python2.6 command line app template
Display the edge
How to pass arguments when invoking python script from blender on the command line
Steps to use the AWS command line interface (Python / awscli) on Mac OS X
How to create an article from the command line
Gradually display the output of the command executed by subprocess.Popen
python2 series / 3 series, character code and print statement / command line
Open Chrome version of LINE from the command line [Linux]
Multiply PDF by OCR on command line on Linux (Ubuntu)
Display Matsuya coupon (QR code) with Pythonista for iOS
I tried to notify the honeypot report on LINE
Display the weather forecast on M5Stack + Google Cloud Platform
How to display a specified line of a file or command result on Linux (sed, awk)