Issue
I am trying to generate a vCard QR code with the pyqrcode library but I cannot figure out the way to do it.
I have read their documentation 5 times and it doesn't say anything about vCard, only about URL and on the internet, I could found only about wifi. Does anybody know how can I do it?
I want to make a vCard QR code and afterward to display it on django web page.
Solution
Let's say :
We've two libraries:
- pyqrcode : QR reader / writer
- vobject : vCard serializer / deserializer
Flow:
a. Generate a QR img from "some" web site :
web site send JSON info => get info from JSON and serialize using vobject to obtain a vcard string => pyqrcode.create(vcard string)
b. Show human redeable info from QR img :
pyqrcode read an QR img ( created from a. ) => deserialize using vobject to obtain a JSON => show info parsing JSON in the web site.
OR... after deserialize using vobject you can write a .vcard file
Answered By - Mate
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.