QR code generation from markmin

65 views
Skip to first unread message

Peter Woolf

unread,
Mar 1, 2021, 2:59:28 PM3/1/21
to web2py-users
Hello,
I see that web2py has documentation for generating QR codes from links using markmin, but it isn't working in my hands.  Am I doing it incorrectly or is there a bug?

Here is a minimal example of code in a view:
---------------
{{from gluon.contrib.markmin.markmin2html import markmin2html}}
{{=XML(markmin2html("Hello **world** [[link qr:http://web2py.com]]"))}}
{{=markmin2html("Hello **world** [[link qr:http://web2py.com]]")}}
------------
This just creates a normal link:

-----------

Hello world link

<p>Hello <strong>world</strong> <a href="qr:http://web2py.com">link</a></p>

----------

Thoughts?  Seems a useful feature if it really exists in there! :)

Thanks,

--Peter

Kevin Keller

unread,
Mar 3, 2021, 7:38:31 AM3/3/21
to web2py-users
Hey Peter!

I don't see any code in the markmin python script that could generate qr codes. 

I think the ones that are there are static. 

You can use a qr code generator lib with python and combine with markmin qr Syntax though. 

I think. 



--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/57f0ea98-db5a-4211-9e24-e8ce3d7271fbn%40googlegroups.com.

Peter Woolf

unread,
Mar 3, 2021, 3:54:20 PM3/3/21
to web2py-users
Thanks!  I was hoping that Web2py had this function already based on the documentation for MARKMIN Links:

----------

Adding a link with the qr: prefix such as

results in the corresponding QR code being embedded and linking the said URL.

----------
I can write custom code to do it, but didn't want to reinvent the wheel if Web2py already had it! 

Thanks!
--Peter
Reply all
Reply to author
Forward
0 new messages