|
|
@@ -1,18 +1,20 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
-from __future__ import print_function, absolute_import, division
|
|
|
+from __future__ import print_function, absolute_import, division, unicode_literals
|
|
|
|
|
|
-from flask import Flask
|
|
|
-from flask_ask import Ask, statement, question, session
|
|
|
+import logging
|
|
|
import json
|
|
|
import time
|
|
|
from random import choice
|
|
|
+from timeit import default_timer
|
|
|
|
|
|
-app = Flask(__name__)
|
|
|
-ask = Ask(app, "/ameise")
|
|
|
+from flask_ask import statement, question, session, context
|
|
|
+from utils import get_alexa_location
|
|
|
|
|
|
-# the Links:
|
|
|
-# Config: https://developer.amazon.com/edw/home.html#/skills
|
|
|
-# Docs: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/supported-phrases-to-begin-a-conversation
|
|
|
+from ameise import app, ask, log
|
|
|
+
|
|
|
+# Intents
|
|
|
+import domo
|
|
|
+import chef
|
|
|
|
|
|
WELCOME = [
|
|
|
'Hast du einen Wunsch?',
|
|
|
@@ -42,17 +44,6 @@ def start_skill():
|
|
|
print('Welcome ...')
|
|
|
return question(choice(WELCOME)).reprompt(choice(REPROMPTS))
|
|
|
|
|
|
-@ask.intent("ChefIntent")
|
|
|
-def declare_chef():
|
|
|
- names = ['Lilith', 'Elise', 'Lars', 'Annelie', 'Mama', 'Papa',
|
|
|
- 'Christine', 'Dirk', 'Lillutschka', 'Larsi', 'Liselchen', 'Annelutschka',
|
|
|
- 'Annelie Rothe', 'Lilith Rothe', 'Christine Rothe', 'Lars Rothe', 'Elise Rothe',
|
|
|
- 'die kleine Annelie', 'der schnelle Lars', 'die schlaue Elise', 'die intelligente Lilith']
|
|
|
- chefs = ['Chef', 'Oberchef', 'Boss', 'Bestimmer', 'Meister',
|
|
|
- 'Leiter', 'Direktor', u'Anführer', 'Oberboss', u'König']
|
|
|
- s = ('%s ist heute der %s, aber morgen ist %s dran!' %
|
|
|
- (choice(names), choice(chefs), choice(names)))
|
|
|
- return statement(s.encode('utf-8'))
|
|
|
|
|
|
@ask.intent("LeaveIntent")
|
|
|
def no_intent():
|