At the beginning of the year, I went to issue a commuter pass (reissue) for commuting.
Great procession. .. ..
What is this? Disneyland-like.
I write the same thing every time. Line up. Troublesome.
So, isn't it possible to improve efficiency by issuing a QR code once and holding it over each person's smartphone? ??
First, install the module for QR code creation with pip.
$ pip install qrcode
After that, ask for attribute information for the first time and QR code it.
qrmake.py
import qrcode
name=input('Your name is?')
address=input('address?')
age=input('How old are you?')
tel=input('telephone number is?')
start=input('What is your departure?')
goal=input('How are you arriving?')
via=input('What is the waypoint?')
img=qrcode.make('Full name:'+str(name) + ' address:' + 'age:' +str(age) +'phone number' + str(tel) + 'Departure point:' +str(start) + 'arrival:'+str(goal) +'via:' +str(via))
img.save('Attribute information')
Like this.
(kyoto) MacBook-Air% python3 qrmake.py
Your name is?Tanaka
address? Kyoto City A Town B Street Mansion C101
How old are you? 40 years old
telephone number is? 090-000-0000
What is your departure? Kyoto Station
How are you arriving? Gojo Station
What is the waypoint?
Then a QR code will be issued.
You can either hand over the code on paper or skip it by email.
I'll ask Kyoto City.
<Addition 2020.1.12>
I wrote the mechanism for creating a database and automatically issuing a QR code in the advanced version.
Reference: [The phone of the cleaning shop in the neighborhood kept ringing, so let's create a customer database that automatically issues a QR code in Python] (https://qiita.com/youichiokuda/items/c2fcfbae92c7f8c3d0ce)
Recommended Posts