Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
materials
Commits
999640e8
Commit
999640e8
authored
12 years ago
by
Björn Guth
Browse files
Options
Downloads
Patches
Plain Diff
added crappy support for old qr codes to qr_reader.py
parent
06644edd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
qr_reader/qrreader.py
+7
-3
7 additions, 3 deletions
qr_reader/qrreader.py
with
7 additions
and
3 deletions
qr_reader/qrreader.py
+
7
−
3
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment