read_qrcode_credential.py Source

#!/usr/bin/env python3
import os
import subprocess
def main():
    proc = subprocess.run(
        ['zbarimg', '--raw', '-1', '--quiet', 'example_credential_qrcode.svg'],
        capture_output=True)
    
    with open('example_credential_scanned.jose', 'wb') as outfile:
        outfile.write(proc.stdout)
if __name__ == '__main__':
    main()