Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.803 kb
#!/usr/bin/python
# -*- coding: utf-8 -*-
from plugin import *
class examplePlugin(Plugin):
@register("de-DE", ".*Sinn.*Leben.*")
@register("en-US", ".*Meaning.*Life.*")
def meaningOfLife(self, speech, language):
if language == 'de-DE':
answer = self.ask(u"Willst du das wirklich wissen?")
self.say(u"Du hast \"{0}\" gesagt!".format(answer))
else:
self.say("I shouldn't tell you!")
self.complete_request()
@register("de-DE", ".*standort.*test.*")
@register("en-US", ".*location.*test.*")
def locationTest(self, speech, language):
location = self.getCurrentLocation(force_reload=True)
self.say(u"lat: {0}, long: {1}".format(location.latitude, location.longitude))
self.complete_request()
Jump to Line
Something went wrong with that request. Please try again.