Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
osak
materials
Commits
999640e8
Commit
999640e8
authored
Oct 03, 2012
by
Björn Guth
Browse files
added crappy support for old qr codes to qr_reader.py
parent
06644edd
Changes
1
Hide whitespace changes
Inline
Side-by-side
qr_reader/qrreader.py
View file @
999640e8
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment