Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
Hackspace Device Info
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
infrastructure
Hackspace Device Info
Commits
a01d8cfa
Commit
a01d8cfa
authored
May 14, 2014
by
Markus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit
parents
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
README.md
README.md
+0
-0
hack_count
hack_count
+19
-0
No files found.
README.md
0 → 100644
View file @
a01d8cfa
hack_count
0 → 100755
View file @
a01d8cfa
#!/usr/bin/env python2.7
import
urllib
import
json
import
pynotify
import
getopt
import
sys
if
__name__
==
'__main__'
:
var
=
urllib
.
urlopen
(
"http://hack-hro.de/api/users"
)
device_count
=
json
.
loads
(
var
.
read
().
decode
())[
'deviceCount'
]
if
not
pynotify
.
init
(
"HackHro"
):
sys
.
exit
(
1
)
n
=
pynotify
.
Notification
(
"DeviceCount"
,
str
(
device_count
)
+
" Devices"
)
if
not
n
.
show
():
print
(
"Failed to send notification"
)
sys
.
exit
(
1
)
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