update package structure, move non-executables to lib
This commit is contained in:
parent
629adc13cb
commit
c74b7b95fb
10 changed files with 21 additions and 16 deletions
20
lib/alfred.py
Normal file
20
lib/alfred.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import subprocess
|
||||
import json
|
||||
|
||||
|
||||
def _fetch(data_type):
|
||||
output = subprocess.check_output(
|
||||
["alfred-json", "-z", "-f", "json", "-r", str(data_type)])
|
||||
return json.loads(output.decode("utf-8")).values()
|
||||
|
||||
|
||||
def nodeinfo():
|
||||
return _fetch(158)
|
||||
|
||||
|
||||
def statistics():
|
||||
return _fetch(159)
|
||||
|
||||
|
||||
def vis():
|
||||
return _fetch(160)
|
Loading…
Add table
Add a link
Reference in a new issue