make_svg_qrcode.py Source

#!/usr/bin/env python3
import os
import qrcode
import qrcode.image.svg
def main():
    factory = qrcode.image.svg.SvgPathImage
    with open("example_credential.jose", "r") as infile:
        img = qrcode.make(infile.read(), image_factory=factory)
    img.save('example_credential_qrcode.svg')
if __name__ == '__main__':
    main()