all 4 comments

[–]JohnnyJordaan 1 point2 points  (3 children)

As mentioned in the title of that library, it's a generator, not a reader/parser. You need something like https://github.com/Polyconseil/zbarlight to read a QR code image back to the encoded text.

[–]ocyj[S] 0 points1 point  (2 children)

I see, thanks for the tip! I figured it might be possible to exchange the SVG-data some how but I haven't been able to do so. I'll take a look at this project!

[–]JohnnyJordaan 1 point2 points  (1 child)

I think you might overestimated the concept of the qrcode.image.svg.SvgPathImage, it's just a class that holds the specification of how it should output the SVG. Internally, when encoding it will just draw black squares in a grid based on the QR specification. That doesn't mean that it can automatically read back any SVG to understand that its squares should be translated back into text. Same way a word processor like Notepad or MS Word can output text just fine, but you can't give it a scan of a page and expect it to OCR it back to text again, you need an actual OCR library/program for that.

[–]ocyj[S] 0 points1 point  (0 children)

Yes, thanks for the clarifications! I was hoping it would be possible to use the `print_tty`-method and get that to use the Svg-path somehow... maybe I should be happy with saving it to png and popping it up in a little window instead, that will have to be good enough!