Skip to content

ENH: code to handle QR special text#45

Open
norok2 wants to merge 5 commits intomnooner256:masterfrom
norok2:master
Open

ENH: code to handle QR special text#45
norok2 wants to merge 5 commits intomnooner256:masterfrom
norok2:master

Conversation

@norok2
Copy link

@norok2 norok2 commented Sep 4, 2016

I believe this project may benefit from handling QR special text, as commonly accepted by other QR implementation, e.g. ZXing.
This code should correctly handle: QrPhone, QrEmail, QrMessage, QrGeolocation, QrUrl, QrContact (MeCard), QrWifi.

It is meant to run unmodified on both Python2 and Python3 identically.

I have copy-pasted some code that I have written for myself, so apologies if the docstrings may not comply to what you usually use. Feel free to modify to fit your project better.

I have also adapted the copyright notice to comply with yours.

Generate the QrSpecial-derived e-mail address.

Args:
url (str|unicode): The e-mail address.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e-mail address?

Fixed URL to support more protocols. The documentation should be fixed now.
@norok2
Copy link
Author

norok2 commented Sep 5, 2016

Thanks for spotting that, it should be fixed now :-)

@norok2
Copy link
Author

norok2 commented Sep 5, 2016

I actually believe it shoul be modified again, as url should be the first argument of the constructor

inverted 'url' and 'protocol' in QrUrl.__init__ signature
@norok2
Copy link
Author

norok2 commented Sep 5, 2016

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants