Skip to content

brianoy/linebot_qr_code_decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using linebot to decode the QR anf bar code via heroku inside the chatroom

A simple side project. If you create a linebot channel which is not the type of "login", then it is not possible for us to scan the qr code via "Liff". With PIL and pyzbar, We can scan the qr code and bar code ones user send the picture in the channel. In this demonstration, We deploy the app in the heroku, so we have to add the apt option in the buildpacks of heroku dashboard. Create a file named "apt" in the root directory, and add two lines of words in the file

libzbar0

libzbar-dev

The picture user sent would save at under ./static temporarily. Heroku might clear the cache every dyno restart.(not sure)

Requirements

  1. A heroku app (https://dashboard.heroku.com/apps)

  2. A line bot channel in line developer console

  3. Enable the webhook function in your line bot channel console (https://manager.line.biz/account/[your_linebot_id]/setting)

  4. Link the webhook in the line bot channel console to https://[your_app_name].herokuapp.com/callback

Add the env config manually

Copy the CHANNEL_SECRET and CHANNEL_ACCESS_TOKEN into the env config image

Add the build pack

heroku/python and https://github.com/heroku/heroku-buildpack-apt image

Result

Heroku had changed their terms of use, free Heroku Dynos are no longer available. This line-bot might not respond any more. try it out https://line.me/R/ti/p/%40127axkbn

image

About

Using line bot as a qr/bar code decoder (via heroku)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published