__init__.py 697 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import logging
  2. import console
  3. import conf
  4. SERVICES = [
  5. console.Console(),
  6. ]
  7. if conf.ENABLE_SOUND_OUTPUT:
  8. import audio_output
  9. SERVICES.append(audio_output.AudioOutput())
  10. if conf.SLACK_BOT_API_KEY:
  11. import slack_bot
  12. SERVICES.append(slack_bot.SlackBot())
  13. def success():
  14. for service in SERVICES:
  15. service.success()
  16. def failure(s=None):
  17. for service in SERVICES:
  18. service.failure(s)
  19. def cancelled():
  20. for service in SERVICES:
  21. service.cancelled()
  22. def tts(s):
  23. for service in SERVICES:
  24. service.tts(s)
  25. def text(s):
  26. for service in SERVICES:
  27. service.text(s)
  28. def debug(s):
  29. for service in SERVICES:
  30. service.debug(s)