You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the following plugin used to work on IOS 5, but it's not working anymore with IOS6.
It waits endlessly at some point below =>
note_return = self.getResponseForRequest(note_create)
Could anyone please help ?
Thank you
!/usr/bin/python
-- coding: utf-8 --
import re
import urllib2, urllib
import json
import logging
from uuid import uuid4
from plugin import *
from siriObjects.baseObjects import AceObject, ClientBoundCommand
from siriObjects.uiObjects import AddViews, AssistantUtteranceView
from siriObjects.systemObjects import DomainObject
class NoteSnippet(AceObject):
def init(self, notes=None):
super(NoteSnippet, self).init("Snippet", "com.apple.ace.note")
self.notes = notes if notes != None else []
Hi, the following plugin used to work on IOS 5, but it's not working anymore with IOS6.
It waits endlessly at some point below =>
note_return = self.getResponseForRequest(note_create)
Could anyone please help ?
Thank you
!/usr/bin/python
-- coding: utf-8 --
import re
import urllib2, urllib
import json
import logging
from uuid import uuid4
from plugin import *
from siriObjects.baseObjects import AceObject, ClientBoundCommand
from siriObjects.uiObjects import AddViews, AssistantUtteranceView
from siriObjects.systemObjects import DomainObject
class NoteSnippet(AceObject):
def init(self, notes=None):
super(NoteSnippet, self).init("Snippet", "com.apple.ace.note")
self.notes = notes if notes != None else []
class NoteObject(AceObject):
def init(self, contents="", identifier=""):
super(NoteObject, self).init("Object", "com.apple.ace.note")
self.contents = contents
self.identifier = identifier
def to_plist(self):
self.add_property('contents')
self.add_property('identifier')
return super(NoteObject, self).to_plist()
class Create(ClientBoundCommand):
def init(self, refId=None, aceId=None, contents=""):
super(Create, self).init("Create", "com.apple.ace.note", None, None)
self.contents = contents
self.aceId= aceId if aceId != None else str.upper(str(uuid4()))
self.refId = refId if refId != None else str.upper(str(uuid4()))
class note(Plugin):
localizations = {"noteDefaults":
{"searching":{"en-US": "Creating your note ...","fr-FR": u"Création de votre note..."},
"result": {"en-US": "Here is your note:","fr-FR": "Voici votre note :"},
"nothing": {"en-US": "What should I note?","fr-FR": "Que dois-je noter ?"}},
"failure": {
"en-US": "I cannot type your note right now.",
"fr-FR": "Je ne peux pas écrire votre note maintenant."
}
}
@register("en-US", "(._note [a-zA-Z0-9]+)|(._create._note [a-zA-Z0-9]+)|(._write._note [a-zA-Z0-9]+)")
@register("fr-FR", u"(.créer? une note .)|(.note .)")
def writeNote(self, speech, language):
content_raw = re.match("._note (.*)$", speech, re.IGNORECASE)
if content_raw == None:
view_initial = AddViews(self.refId, dialogPhase="Reflection")
view_initial.views = [AssistantUtteranceView(text=note.localizations['noteDefaults']['nothing'][language], speakableText=note.localizations['noteDefaults']['nothing'][language], dialogIdentifier="Note#failed")]
self.sendRequestWithoutAnswer(view_initial)
else:
view_initial = AddViews(self.refId, dialogPhase="Reflection")
view_initial.views = [AssistantUtteranceView(text=note.localizations['noteDefaults']['searching'][language], speakableText=note.localizations['noteDefaults']['searching'][language], dialogIdentifier="Note#creating")]
self.sendRequestWithoutAnswer(view_initial)
The text was updated successfully, but these errors were encountered: