Skip to content

Commit

Permalink
fix for issue #3 and more readable output for remember-intent
Browse files Browse the repository at this point in the history
  • Loading branch information
luke5sky committed Jan 31, 2019
1 parent 83e224a commit aed6074
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import os
import traceback
import logging
import re

from adapt.intent import IntentBuilder
from mycroft.skills.core import MycroftSkill, intent_handler
Expand Down Expand Up @@ -58,6 +59,10 @@ def WhatToRememberIntent(self, message): # user wants to know what we've got

@intent_handler(IntentBuilder("RememberIntent").require("Remember").require("WhatToRemember").build())
def RememberIntent(self, message): # user wants us to remember something
utt=(message.data.get("utterance"))
if re.match("what did you", utt) is not None: # workaround for what did you remember?
self.WhatToRememberIntent(message)
return None
rememberPhrase = message.data.get("WhatToRemember", None) # get phrase user wants us to remember
try: # if user said something like "remember phrase get some milk" we don't want phrase to be saved, brakes skill a bit, we don't wanna skill broken, we like skill
rememberPhrase = rememberPhrase.replace('phrase ', '') # Phrase Evanesca! if you got this reference, you should stop reading comments in code and go out a bit, have fun with friends or watch birds or something like that
Expand Down
2 changes: 1 addition & 1 deletion dialog/da-dk/gotphrase.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Jeg vil huske {{REMEMBER}} for dig..
Jeg vil huske "{{REMEMBER}}" for dig..
2 changes: 1 addition & 1 deletion dialog/de-de/gotphrase.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Ich werde dich an {{REMEMBER}} erinnern.
Ich werde dich an "{{REMEMBER}}" erinnern.
2 changes: 1 addition & 1 deletion dialog/en-us/gotphrase.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
I will remember {{REMEMBER}} for you.
I will remember "{{REMEMBER}}" for you.
2 changes: 1 addition & 1 deletion dialog/es-es/gotphrase.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Recordaré {{REMEMBER}} por ti.
Recordaré "{{REMEMBER}}" por ti.
2 changes: 1 addition & 1 deletion dialog/it-it/gotphrase.dialog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Ricorderò {{REMEMBER}} per te.
Ricorderò "{{REMEMBER}}" per te.

0 comments on commit aed6074

Please sign in to comment.