diff --git a/qr_reader/qrreader.py b/qr_reader/qrreader.py index e9d0bb9856518445fae73be09a878470ce841869..e45082a33138981afe2087dd60ca69ad643b08b9 100755 --- a/qr_reader/qrreader.py +++ b/qr_reader/qrreader.py @@ -12,6 +12,7 @@ import zbar, Image # zbar (http://pypi.python.org/pypi/zbar) # Python Imaging Library (http://www.pythonware.com/products/pil/index.htm) # gstreamer python bindings (http://gstreamer.freedesktop.org/modules/gst-python.html) +# firefox (http://www.mozilla.org/en-US/firefox/fx/#desktop) # class GTK_Main: @@ -109,10 +110,13 @@ tee name=t ! queue ! autovideosink t. no_qr = True result = '' for symbol in image: - url = symbol.data - print(url) - if url.find('http://fsmpi.rwth-aachen.de/lip/view/') >= 0: + qr = symbol.data + print(qr) + if qr.find('http://fsmpi.rwth-aachen.de/lip/view/') >= 0: os.system('firefox -new-tab '+url) + elif qr.find('pk: ') >= 0: + pk = string.split(string.split(qr,'%')[0],': ')[1] + os.system('firefox -new-tab http://fsmpi.rwth-aachen.de/lip/view/' + pk + '+0') else: self.invalid_code() no_qr = False