Skip to content

Commit

Permalink
changed dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
the7erm committed Jun 21, 2016
1 parent f4ab27c commit 3080e7b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ def initialize(self):
self.register_intent(custom_intent, self.handle_custom_intent)

def handle_cpu_intent(self, message):
data = {
"percent": psutil.cpu_percent(interval=1)
}
self.speak_dialog("cpu", data)
self.speak_dialog("WorkingHardOn")
output = check_output("ps -eo pcpu,comm --no-headers|"
"sort -t. -nk1,2 -k4,4 -r |"
"head -n 4 |"
"awk '{print $2}'", shell=True)
output = output.strip()
self.speak(and_(output.split("\n")))

def handle_drive_intent(self, message):
partitions = psutil.disk_partitions()
Expand Down
1 change: 1 addition & 0 deletions dialog/en-us/WorkingHardOn.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I'm working hard on:
1 change: 1 addition & 0 deletions dialog/en-us/not.executable.script.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The script {{script}} exists, but mycroft can't run it. You'll need to chmod +x it.

0 comments on commit 3080e7b

Please sign in to comment.